| OLD | NEW |
| 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// | 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// |
| 2 // | 2 // |
| 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
| 5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
| 6 // | 6 // |
| 7 // Modified by the Subzero authors. | 7 // Modified by the Subzero authors. |
| 8 // | 8 // |
| 9 //===----------------------------------------------------------------------===// | 9 //===----------------------------------------------------------------------===// |
| 10 // | 10 // |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "IceConditionCodesARM32.h" | 31 #include "IceConditionCodesARM32.h" |
| 32 #include "IceDefs.h" | 32 #include "IceDefs.h" |
| 33 #include "IceFixups.h" | 33 #include "IceFixups.h" |
| 34 #include "IceInstARM32.h" | 34 #include "IceInstARM32.h" |
| 35 #include "IceRegistersARM32.h" | 35 #include "IceRegistersARM32.h" |
| 36 #include "IceTargetLowering.h" | 36 #include "IceTargetLowering.h" |
| 37 | 37 |
| 38 namespace Ice { | 38 namespace Ice { |
| 39 namespace ARM32 { | 39 namespace ARM32 { |
| 40 | 40 |
| 41 /// Encoding of an ARM 32-bit instruction. | |
| 42 using IValueT = uint32_t; | |
| 43 | |
| 44 /// An Offset value (+/-) used in an ARM 32-bit instruction. | |
| 45 using IOffsetT = int32_t; | |
| 46 | |
| 47 /// Handles encoding of bottom/top 16 bits of an address using movw/movt. | 41 /// Handles encoding of bottom/top 16 bits of an address using movw/movt. |
| 48 class MoveRelocatableFixup final : public AssemblerFixup { | 42 class MoveRelocatableFixup final : public AssemblerFixup { |
| 49 MoveRelocatableFixup &operator=(const MoveRelocatableFixup &) = delete; | 43 MoveRelocatableFixup &operator=(const MoveRelocatableFixup &) = delete; |
| 50 MoveRelocatableFixup(const MoveRelocatableFixup &) = default; | 44 MoveRelocatableFixup(const MoveRelocatableFixup &) = default; |
| 51 | 45 |
| 52 public: | 46 public: |
| 53 MoveRelocatableFixup() = default; | 47 MoveRelocatableFixup() = default; |
| 54 size_t emit(GlobalContext *Ctx, const Assembler &Asm) const final; | 48 size_t emit(GlobalContext *Ctx, const Assembler &Asm) const final; |
| 55 }; | 49 }; |
| 56 | 50 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 242 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
| 249 bool SetFlags, CondARM32::Cond Cond); | 243 bool SetFlags, CondARM32::Cond Cond); |
| 250 | 244 |
| 251 void mvn(const Operand *OpRd, const Operand *OpScc, CondARM32::Cond Cond); | 245 void mvn(const Operand *OpRd, const Operand *OpScc, CondARM32::Cond Cond); |
| 252 | 246 |
| 253 void nop(); | 247 void nop(); |
| 254 | 248 |
| 255 void orr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, | 249 void orr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, |
| 256 bool SetFlags, CondARM32::Cond Cond); | 250 bool SetFlags, CondARM32::Cond Cond); |
| 257 | 251 |
| 258 void pop(const Operand *OpRt, CondARM32::Cond Cond); | 252 void pop(const Variable *OpRt, CondARM32::Cond Cond); |
| 259 | 253 |
| 260 // Note: Registers is a bitset, where bit n corresponds to register Rn. | 254 // Note: Registers is a bitset, where bit n corresponds to register Rn. |
| 261 void popList(const IValueT Registers, CondARM32::Cond Cond); | 255 void popList(const IValueT Registers, CondARM32::Cond Cond); |
| 262 | 256 |
| 263 void push(const Operand *OpRt, CondARM32::Cond Cond); | 257 void push(const Operand *OpRt, CondARM32::Cond Cond); |
| 264 | 258 |
| 265 // Note: Registers is a bitset, where bit n corresponds to register Rn. | 259 // Note: Registers is a bitset, where bit n corresponds to register Rn. |
| 266 void pushList(const IValueT Registers, CondARM32::Cond Cond); | 260 void pushList(const IValueT Registers, CondARM32::Cond Cond); |
| 267 | 261 |
| 268 void rbit(const Operand *OpRd, const Operand *OpRm, CondARM32::Cond Cond); | 262 void rbit(const Operand *OpRd, const Operand *OpRm, CondARM32::Cond Cond); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and | 464 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and |
| 471 // iiiiiiiiiiiiiiii=Imm16. | 465 // iiiiiiiiiiiiiiii=Imm16. |
| 472 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, | 466 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, |
| 473 const Operand *OpSrc, const char *MovName); | 467 const Operand *OpSrc, const char *MovName); |
| 474 }; | 468 }; |
| 475 | 469 |
| 476 } // end of namespace ARM32 | 470 } // end of namespace ARM32 |
| 477 } // end of namespace Ice | 471 } // end of namespace Ice |
| 478 | 472 |
| 479 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H | 473 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H |
| OLD | NEW |