OLD | NEW |
1 //===- subzero/src/IceRegistersARM32.h - Register information ---*- C++ -*-===// | 1 //===- subzero/src/IceRegistersARM32.h - Register information ---*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
11 /// \brief Declares the registers and their encodings for ARM32. | 11 /// \brief Declares the registers and their encodings for ARM32. |
12 /// | 12 /// |
13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
14 | 14 |
15 #ifndef SUBZERO_SRC_ICEREGISTERSARM32_H | 15 #ifndef SUBZERO_SRC_ICEREGISTERSARM32_H |
16 #define SUBZERO_SRC_ICEREGISTERSARM32_H | 16 #define SUBZERO_SRC_ICEREGISTERSARM32_H |
17 | 17 |
18 #include "IceDefs.h" | 18 #include "IceDefs.h" |
19 #include "IceInstARM32.def" | 19 #include "IceInstARM32.def" |
20 #include "IceOperand.h" // RC_Target | 20 #include "IceOperand.h" // RC_Target |
21 #include "IceTypes.h" | 21 #include "IceTypes.h" |
22 | 22 |
23 namespace Ice { | 23 namespace Ice { |
| 24 namespace ARM32 { |
24 | 25 |
25 class RegARM32 { | 26 class RegARM32 { |
26 public: | 27 public: |
27 /// An enum of every register. The enum value may not match the encoding used | 28 /// An enum of every register. The enum value may not match the encoding used |
28 /// to binary encode register operands in instructions. | 29 /// to binary encode register operands in instructions. |
29 enum AllRegisters { | 30 enum AllRegisters { |
30 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ | 31 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ |
31 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ | 32 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ |
32 val, | 33 val, |
33 REGARM32_TABLE | 34 REGARM32_TABLE |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 assert(RegNum <= Reg_QREG_Last); | 130 assert(RegNum <= Reg_QREG_Last); |
130 return QRegister(RegNum - Reg_QREG_First); | 131 return QRegister(RegNum - Reg_QREG_First); |
131 } | 132 } |
132 | 133 |
133 static const char *RegNames[]; | 134 static const char *RegNames[]; |
134 }; | 135 }; |
135 | 136 |
136 // Extend enum RegClass with ARM32-specific register classes (if any). | 137 // Extend enum RegClass with ARM32-specific register classes (if any). |
137 enum RegClassARM32 : uint8_t { RCARM32_NUM = RC_Target }; | 138 enum RegClassARM32 : uint8_t { RCARM32_NUM = RC_Target }; |
138 | 139 |
| 140 } // end of namespace ARM32 |
139 } // end of namespace Ice | 141 } // end of namespace Ice |
140 | 142 |
141 #endif // SUBZERO_SRC_ICEREGISTERSARM32_H | 143 #endif // SUBZERO_SRC_ICEREGISTERSARM32_H |
OLD | NEW |