17 #ifndef LLVM_LIB_TARGET_AARCH64_UTILS_AARCH64BASEINFO_H
18 #define LLVM_LIB_TARGET_AARCH64_UTILS_AARCH64BASEINFO_H
32 case AArch64::X0:
return AArch64::W0;
33 case AArch64::X1:
return AArch64::W1;
34 case AArch64::X2:
return AArch64::W2;
35 case AArch64::X3:
return AArch64::W3;
36 case AArch64::X4:
return AArch64::W4;
37 case AArch64::X5:
return AArch64::W5;
38 case AArch64::X6:
return AArch64::W6;
39 case AArch64::X7:
return AArch64::W7;
40 case AArch64::X8:
return AArch64::W8;
41 case AArch64::X9:
return AArch64::W9;
42 case AArch64::X10:
return AArch64::W10;
43 case AArch64::X11:
return AArch64::W11;
44 case AArch64::X12:
return AArch64::W12;
45 case AArch64::X13:
return AArch64::W13;
46 case AArch64::X14:
return AArch64::W14;
47 case AArch64::X15:
return AArch64::W15;
48 case AArch64::X16:
return AArch64::W16;
49 case AArch64::X17:
return AArch64::W17;
50 case AArch64::X18:
return AArch64::W18;
51 case AArch64::X19:
return AArch64::W19;
52 case AArch64::X20:
return AArch64::W20;
53 case AArch64::X21:
return AArch64::W21;
54 case AArch64::X22:
return AArch64::W22;
55 case AArch64::X23:
return AArch64::W23;
56 case AArch64::X24:
return AArch64::W24;
57 case AArch64::X25:
return AArch64::W25;
58 case AArch64::X26:
return AArch64::W26;
59 case AArch64::X27:
return AArch64::W27;
60 case AArch64::X28:
return AArch64::W28;
61 case AArch64::FP:
return AArch64::W29;
62 case AArch64::LR:
return AArch64::W30;
63 case AArch64::SP:
return AArch64::WSP;
64 case AArch64::XZR:
return AArch64::WZR;
72 case AArch64::W0:
return AArch64::X0;
73 case AArch64::W1:
return AArch64::X1;
74 case AArch64::W2:
return AArch64::X2;
75 case AArch64::W3:
return AArch64::X3;
76 case AArch64::W4:
return AArch64::X4;
77 case AArch64::W5:
return AArch64::X5;
78 case AArch64::W6:
return AArch64::X6;
79 case AArch64::W7:
return AArch64::X7;
80 case AArch64::W8:
return AArch64::X8;
81 case AArch64::W9:
return AArch64::X9;
82 case AArch64::W10:
return AArch64::X10;
83 case AArch64::W11:
return AArch64::X11;
84 case AArch64::W12:
return AArch64::X12;
85 case AArch64::W13:
return AArch64::X13;
86 case AArch64::W14:
return AArch64::X14;
87 case AArch64::W15:
return AArch64::X15;
88 case AArch64::W16:
return AArch64::X16;
89 case AArch64::W17:
return AArch64::X17;
90 case AArch64::W18:
return AArch64::X18;
91 case AArch64::W19:
return AArch64::X19;
92 case AArch64::W20:
return AArch64::X20;
93 case AArch64::W21:
return AArch64::X21;
94 case AArch64::W22:
return AArch64::X22;
95 case AArch64::W23:
return AArch64::X23;
96 case AArch64::W24:
return AArch64::X24;
97 case AArch64::W25:
return AArch64::X25;
98 case AArch64::W26:
return AArch64::X26;
99 case AArch64::W27:
return AArch64::X27;
100 case AArch64::W28:
return AArch64::X28;
101 case AArch64::W29:
return AArch64::FP;
102 case AArch64::W30:
return AArch64::LR;
103 case AArch64::WSP:
return AArch64::SP;
104 case AArch64::WZR:
return AArch64::XZR;
112 case AArch64::D0:
return AArch64::B0;
113 case AArch64::D1:
return AArch64::B1;
114 case AArch64::D2:
return AArch64::B2;
115 case AArch64::D3:
return AArch64::B3;
116 case AArch64::D4:
return AArch64::B4;
117 case AArch64::D5:
return AArch64::B5;
118 case AArch64::D6:
return AArch64::B6;
119 case AArch64::D7:
return AArch64::B7;
120 case AArch64::D8:
return AArch64::B8;
121 case AArch64::D9:
return AArch64::B9;
122 case AArch64::D10:
return AArch64::B10;
123 case AArch64::D11:
return AArch64::B11;
124 case AArch64::D12:
return AArch64::B12;
125 case AArch64::D13:
return AArch64::B13;
126 case AArch64::D14:
return AArch64::B14;
127 case AArch64::D15:
return AArch64::B15;
128 case AArch64::D16:
return AArch64::B16;
129 case AArch64::D17:
return AArch64::B17;
130 case AArch64::D18:
return AArch64::B18;
131 case AArch64::D19:
return AArch64::B19;
132 case AArch64::D20:
return AArch64::B20;
133 case AArch64::D21:
return AArch64::B21;
134 case AArch64::D22:
return AArch64::B22;
135 case AArch64::D23:
return AArch64::B23;
136 case AArch64::D24:
return AArch64::B24;
137 case AArch64::D25:
return AArch64::B25;
138 case AArch64::D26:
return AArch64::B26;
139 case AArch64::D27:
return AArch64::B27;
140 case AArch64::D28:
return AArch64::B28;
141 case AArch64::D29:
return AArch64::B29;
142 case AArch64::D30:
return AArch64::B30;
143 case AArch64::D31:
return AArch64::B31;
152 case AArch64::B0:
return AArch64::D0;
153 case AArch64::B1:
return AArch64::D1;
154 case AArch64::B2:
return AArch64::D2;
155 case AArch64::B3:
return AArch64::D3;
156 case AArch64::B4:
return AArch64::D4;
157 case AArch64::B5:
return AArch64::D5;
158 case AArch64::B6:
return AArch64::D6;
159 case AArch64::B7:
return AArch64::D7;
160 case AArch64::B8:
return AArch64::D8;
161 case AArch64::B9:
return AArch64::D9;
162 case AArch64::B10:
return AArch64::D10;
163 case AArch64::B11:
return AArch64::D11;
164 case AArch64::B12:
return AArch64::D12;
165 case AArch64::B13:
return AArch64::D13;
166 case AArch64::B14:
return AArch64::D14;
167 case AArch64::B15:
return AArch64::D15;
168 case AArch64::B16:
return AArch64::D16;
169 case AArch64::B17:
return AArch64::D17;
170 case AArch64::B18:
return AArch64::D18;
171 case AArch64::B19:
return AArch64::D19;
172 case AArch64::B20:
return AArch64::D20;
173 case AArch64::B21:
return AArch64::D21;
174 case AArch64::B22:
return AArch64::D22;
175 case AArch64::B23:
return AArch64::D23;
176 case AArch64::B24:
return AArch64::D24;
177 case AArch64::B25:
return AArch64::D25;
178 case AArch64::B26:
return AArch64::D26;
179 case AArch64::B27:
return AArch64::D27;
180 case AArch64::B28:
return AArch64::D28;
181 case AArch64::B29:
return AArch64::D29;
182 case AArch64::B30:
return AArch64::D30;
183 case AArch64::B31:
return AArch64::D31;
189 namespace AArch64CC {
217 case EQ:
return "eq";
218 case NE:
return "ne";
219 case HS:
return "hs";
220 case LO:
return "lo";
221 case MI:
return "mi";
222 case PL:
return "pl";
223 case VS:
return "vs";
224 case VC:
return "vc";
225 case HI:
return "hi";
226 case LS:
return "ls";
227 case GE:
return "ge";
228 case LT:
return "lt";
229 case GT:
return "gt";
230 case LE:
return "le";
231 case AL:
return "al";
232 case NV:
return "nv";
239 return static_cast<CondCode>(
static_cast<unsigned>(Code) ^ 0x1);
248 enum {
N = 8, Z = 4,
C = 2, V = 1 };
276 #include "AArch64GenSystemOperands.inc"
279 namespace AArch64DB {
286 #include "AArch64GenSystemOperands.inc"
289 namespace AArch64DC {
296 #include "AArch64GenSystemOperands.inc"
299 namespace AArch64IC {
306 #include "AArch64GenSystemOperands.inc"
309 namespace AArch64ISB {
315 #include "AArch64GenSystemOperands.inc"
318 namespace AArch64PRFM {
323 #define GET_PRFM_DECL
324 #include "AArch64GenSystemOperands.inc"
327 namespace AArch64PState {
337 #define GET_PSTATE_DECL
338 #include "AArch64GenSystemOperands.inc"
341 namespace AArch64PSBHint {
347 #include "AArch64GenSystemOperands.inc"
350 namespace AArch64SE {
371 namespace AArch64Layout {
393 inline static const char *
430 namespace AArch64SysReg {
443 #define GET_SYSREG_DECL
444 #include "AArch64GenSystemOperands.inc"
453 namespace AArch64TLBI {
459 #define GET_TLBI_DECL
460 #include "AArch64GenSystemOperands.inc"
463 namespace AArch64II {
MO_G3 - A symbol operand with this flag (granule 3) represents the high 16-bits of a 64-bit address...
static unsigned getBRegFromDReg(unsigned Reg)
MO_PAGE - A symbol operand with this flag represents the pc-relative offset of the 4K page containing...
FeatureBitset FeaturesRequired
static CondCode getInvertedCondCode(CondCode Code)
TOF
Target Operand Flag enum.
static unsigned getXRegFromWReg(unsigned Reg)
MO_G0 - A symbol operand with this flag (granule 0) represents the bits 0-15 of a 64-bit address...
MO_G2 - A symbol operand with this flag (granule 2) represents the bits 32-47 of a 64-bit address...
LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(const T &Value) const
Reg
All possible values of the reg field in the ModR/M byte.
static const char * getCondCodeName(CondCode Code)
FeatureBitset FeaturesRequired
LLVM_ATTRIBUTE_ALWAYS_INLINE StringSwitch & Case(const char(&S)[N], const T &Value)
MO_GOT - This flag indicates that a symbol operand represents the address of the GOT entry for the sy...
static unsigned getWRegFromXReg(unsigned Reg)
A switch()-like statement whose cases are string literals.
bool haveFeatures(FeatureBitset ActiveFeatures) const
MO_G1 - A symbol operand with this flag (granule 1) represents the bits 16-31 of a 64-bit address...
MO_HI12 - This flag indicates that a symbol operand represents the bits 13-24 of a 64-bit address...
MO_TLS - Indicates that the operand being accessed is some kind of thread-local symbol.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool haveFeatures(FeatureBitset ActiveFeatures) const
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
static unsigned getNZCVToSatisfyCondCode(CondCode Code)
Given a condition code, return NZCV flags that would satisfy that condition.
std::string genericRegisterString(uint32_t Bits)
const SysReg * lookupSysRegByName(StringRef)
uint32_t parseGenericRegister(StringRef Name)
static unsigned getDRegFromBReg(unsigned Reg)
MO_PAGEOFF - A symbol operand with this flag represents the offset of that symbol within a 4K page...
static const char * AArch64VectorLayoutToString(AArch64Layout::VectorLayout Layout)
const SysReg * lookupSysRegByEncoding(uint16_t)
static AArch64Layout::VectorLayout AArch64StringToVectorLayout(StringRef LayoutStr)
StringRef - Represent a constant reference to a string, i.e.
MO_NC - Indicates whether the linker is expected to check the symbol reference for overflow...