| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* Target Register and Register Classes Information *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | namespace llvm { |
| 10 | |
| 11 | extern const MCRegisterClass LanaiMCRegisterClasses[]; |
| 12 | |
| 13 | static const MVT::SimpleValueType LanaiVTLists[] = { |
| 14 | /* 0 */ MVT::i32, MVT::Other, |
| 15 | }; |
| 16 | |
| 17 | #ifdef __GNUC__ |
| 18 | #pragma GCC diagnostic push |
| 19 | #pragma GCC diagnostic ignored "-Woverlength-strings" |
| 20 | #endif |
| 21 | static constexpr char LanaiSubRegIndexStrings[] = { |
| 22 | /* 0 */ "sub_32\000" |
| 23 | }; |
| 24 | #ifdef __GNUC__ |
| 25 | #pragma GCC diagnostic pop |
| 26 | #endif |
| 27 | |
| 28 | |
| 29 | static constexpr uint32_t LanaiSubRegIndexNameOffsets[] = { |
| 30 | 0, |
| 31 | }; |
| 32 | |
| 33 | static const TargetRegisterInfo::SubRegCoveredBits LanaiSubRegIdxRangeTable[] = { |
| 34 | { .Offset: 4294967295, .Size: 4294967295 }, |
| 35 | { .Offset: 0, .Size: 32 }, // sub_32 |
| 36 | }; |
| 37 | |
| 38 | |
| 39 | static const LaneBitmask LanaiSubRegIndexLaneMaskTable[] = { |
| 40 | LaneBitmask::getAll(), |
| 41 | LaneBitmask(0x0000000000000001), // sub_32 |
| 42 | }; |
| 43 | |
| 44 | |
| 45 | |
| 46 | static const TargetRegisterInfo::RegClassInfo LanaiRegClassInfos[] = { |
| 47 | // Mode = 0 (DefaultMode) |
| 48 | { .RegSize: 32, .SpillSize: 32, .SpillAlignment: 32, /*LanaiVTLists+*/.VTListOffset: 0 }, // GPR |
| 49 | { .RegSize: 32, .SpillSize: 32, .SpillAlignment: 32, /*LanaiVTLists+*/.VTListOffset: 0 }, // GPR_with_sub_32 |
| 50 | { .RegSize: 32, .SpillSize: 32, .SpillAlignment: 32, /*LanaiVTLists+*/.VTListOffset: 0 }, // CCR |
| 51 | }; |
| 52 | static const uint32_t GPRSubClassMask[] = { |
| 53 | 0x00000003, |
| 54 | 0x00000002, // sub_32 |
| 55 | }; |
| 56 | |
| 57 | static const uint32_t GPR_with_sub_32SubClassMask[] = { |
| 58 | 0x00000002, |
| 59 | }; |
| 60 | |
| 61 | static const uint32_t CCRSubClassMask[] = { |
| 62 | 0x00000004, |
| 63 | }; |
| 64 | |
| 65 | static const uint16_t SuperRegIdxSeqs[] = { |
| 66 | /* 0 */ 1, 0, |
| 67 | }; |
| 68 | |
| 69 | static unsigned const GPR_with_sub_32Superclasses[] = { |
| 70 | Lanai::GPRRegClassID, |
| 71 | }; |
| 72 | |
| 73 | namespace Lanai { |
| 74 | |
| 75 | // Register class instances. |
| 76 | extern const TargetRegisterClass GPRRegClass = { |
| 77 | .MC: &LanaiMCRegisterClasses[GPRRegClassID], |
| 78 | .SubClassMask: GPRSubClassMask, |
| 79 | .SuperRegIndices: SuperRegIdxSeqs + 0, |
| 80 | .LaneMask: LaneBitmask(0x0000000000000001), |
| 81 | .AllocationPriority: 0, |
| 82 | .GlobalPriority: false, |
| 83 | .TSFlags: 0x00, /* TSFlags */ |
| 84 | .SpillStackID: 0, /* SpillStackID */ |
| 85 | .HasDisjunctSubRegs: false, /* HasDisjunctSubRegs */ |
| 86 | .CoveredBySubRegs: false, /* CoveredBySubRegs */ |
| 87 | .SuperClasses: nullptr, .SuperClassesSize: 0, |
| 88 | .OrderFunc: nullptr |
| 89 | }; |
| 90 | |
| 91 | extern const TargetRegisterClass GPR_with_sub_32RegClass = { |
| 92 | .MC: &LanaiMCRegisterClasses[GPR_with_sub_32RegClassID], |
| 93 | .SubClassMask: GPR_with_sub_32SubClassMask, |
| 94 | .SuperRegIndices: SuperRegIdxSeqs + 1, |
| 95 | .LaneMask: LaneBitmask(0x0000000000000001), |
| 96 | .AllocationPriority: 0, |
| 97 | .GlobalPriority: false, |
| 98 | .TSFlags: 0x00, /* TSFlags */ |
| 99 | .SpillStackID: 0, /* SpillStackID */ |
| 100 | .HasDisjunctSubRegs: false, /* HasDisjunctSubRegs */ |
| 101 | .CoveredBySubRegs: false, /* CoveredBySubRegs */ |
| 102 | .SuperClasses: GPR_with_sub_32Superclasses, .SuperClassesSize: 1, |
| 103 | .OrderFunc: nullptr |
| 104 | }; |
| 105 | |
| 106 | extern const TargetRegisterClass CCRRegClass = { |
| 107 | .MC: &LanaiMCRegisterClasses[CCRRegClassID], |
| 108 | .SubClassMask: CCRSubClassMask, |
| 109 | .SuperRegIndices: SuperRegIdxSeqs + 1, |
| 110 | .LaneMask: LaneBitmask(0x0000000000000001), |
| 111 | .AllocationPriority: 0, |
| 112 | .GlobalPriority: false, |
| 113 | .TSFlags: 0x00, /* TSFlags */ |
| 114 | .SpillStackID: 0, /* SpillStackID */ |
| 115 | .HasDisjunctSubRegs: false, /* HasDisjunctSubRegs */ |
| 116 | .CoveredBySubRegs: false, /* CoveredBySubRegs */ |
| 117 | .SuperClasses: nullptr, .SuperClassesSize: 0, |
| 118 | .OrderFunc: nullptr |
| 119 | }; |
| 120 | |
| 121 | |
| 122 | } // namespace Lanai |
| 123 | static const TargetRegisterClass *const LanaiRegisterClasses[] = { |
| 124 | &Lanai::GPRRegClass, |
| 125 | &Lanai::GPR_with_sub_32RegClass, |
| 126 | &Lanai::CCRRegClass, |
| 127 | }; |
| 128 | |
| 129 | static const uint8_t LanaiCostPerUseTable[] = { |
| 130 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; |
| 131 | |
| 132 | |
| 133 | static const bool LanaiInAllocatableClassTable[] = { |
| 134 | false, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, }; |
| 135 | |
| 136 | |
| 137 | static const TargetRegisterInfoDesc LanaiRegInfoDesc = { // Extra Descriptors |
| 138 | .CostPerUse: LanaiCostPerUseTable, .NumCosts: 1, .InAllocatableClass: LanaiInAllocatableClassTable}; |
| 139 | |
| 140 | unsigned LanaiGenRegisterInfo::composeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const { |
| 141 | static const uint8_t Rows[1][1] = { |
| 142 | { 0, }, |
| 143 | }; |
| 144 | |
| 145 | --IdxA; assert(IdxA < 1); (void) IdxA; |
| 146 | --IdxB; assert(IdxB < 1); |
| 147 | return Rows[0][IdxB]; |
| 148 | } |
| 149 | |
| 150 | unsigned LanaiGenRegisterInfo::reverseComposeSubRegIndicesImpl(unsigned IdxA, unsigned IdxB) const { |
| 151 | static const uint8_t Table[1][1] = { |
| 152 | { 0, }, |
| 153 | }; |
| 154 | |
| 155 | --IdxA; assert(IdxA < 1); |
| 156 | --IdxB; assert(IdxB < 1); |
| 157 | return Table[IdxA][IdxB]; |
| 158 | } |
| 159 | |
| 160 | struct MaskRolOp { |
| 161 | LaneBitmask Mask; |
| 162 | uint8_t RotateLeft; |
| 163 | }; |
| 164 | static const MaskRolOp LaneMaskComposeSequences[] = { |
| 165 | { .Mask: LaneBitmask(0xFFFFFFFFFFFFFFFF), .RotateLeft: 0 }, { .Mask: LaneBitmask::getNone(), .RotateLeft: 0 } // Sequence 0 |
| 166 | }; |
| 167 | static const uint8_t CompositeSequences[] = { |
| 168 | 0 // to sub_32 |
| 169 | }; |
| 170 | |
| 171 | LaneBitmask LanaiGenRegisterInfo::composeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const { |
| 172 | --IdxA; assert(IdxA < 1 && "Subregister index out of bounds" ); |
| 173 | LaneBitmask Result; |
| 174 | for (const MaskRolOp *Ops = |
| 175 | &LaneMaskComposeSequences[CompositeSequences[IdxA]]; |
| 176 | Ops->Mask.any(); ++Ops) { |
| 177 | LaneBitmask::Type M = LaneMask.getAsInteger() & Ops->Mask.getAsInteger(); |
| 178 | if (unsigned S = Ops->RotateLeft) |
| 179 | Result |= LaneBitmask((M << S) | (M >> (LaneBitmask::BitWidth - S))); |
| 180 | else |
| 181 | Result |= LaneBitmask(M); |
| 182 | } |
| 183 | return Result; |
| 184 | } |
| 185 | |
| 186 | LaneBitmask LanaiGenRegisterInfo::reverseComposeSubRegIndexLaneMaskImpl(unsigned IdxA, LaneBitmask LaneMask) const { |
| 187 | LaneMask &= getSubRegIndexLaneMask(SubIdx: IdxA); |
| 188 | --IdxA; assert(IdxA < 1 && "Subregister index out of bounds" ); |
| 189 | LaneBitmask Result; |
| 190 | for (const MaskRolOp *Ops = |
| 191 | &LaneMaskComposeSequences[CompositeSequences[IdxA]]; |
| 192 | Ops->Mask.any(); ++Ops) { |
| 193 | LaneBitmask::Type M = LaneMask.getAsInteger(); |
| 194 | if (unsigned S = Ops->RotateLeft) |
| 195 | Result |= LaneBitmask((M >> S) | (M << (LaneBitmask::BitWidth - S))); |
| 196 | else |
| 197 | Result |= LaneBitmask(M); |
| 198 | } |
| 199 | return Result; |
| 200 | } |
| 201 | |
| 202 | const TargetRegisterClass *LanaiGenRegisterInfo::getSubClassWithSubReg(const TargetRegisterClass *RC, unsigned Idx) const { |
| 203 | static constexpr uint8_t Table[3][1] = { |
| 204 | { // GPR |
| 205 | 2, // sub_32 -> GPR_with_sub_32 |
| 206 | }, |
| 207 | { // GPR_with_sub_32 |
| 208 | 2, // sub_32 -> GPR_with_sub_32 |
| 209 | }, |
| 210 | { // CCR |
| 211 | 0, // sub_32 |
| 212 | }, |
| 213 | |
| 214 | }; |
| 215 | assert(RC && "Missing regclass" ); |
| 216 | if (!Idx) return RC; |
| 217 | --Idx; |
| 218 | assert(Idx < 1 && "Bad subreg" ); |
| 219 | unsigned TV = Table[RC->getID()][Idx]; |
| 220 | return TV ? getRegClass(i: TV - 1) : nullptr; |
| 221 | }const TargetRegisterClass *LanaiGenRegisterInfo::getSubRegisterClass(const TargetRegisterClass *RC, unsigned Idx) const { |
| 222 | static constexpr uint8_t Table[3][1] = { |
| 223 | { // GPR |
| 224 | 1, // GPR:sub_32 -> GPR |
| 225 | }, |
| 226 | { // GPR_with_sub_32 |
| 227 | 1, // GPR_with_sub_32:sub_32 -> GPR |
| 228 | }, |
| 229 | { // CCR |
| 230 | 0, // CCR:sub_32 |
| 231 | }, |
| 232 | |
| 233 | }; |
| 234 | assert(RC && "Missing regclass" ); |
| 235 | if (!Idx) return RC; |
| 236 | --Idx; |
| 237 | assert(Idx < 1 && "Bad subreg" ); |
| 238 | unsigned TV = Table[RC->getID()][Idx]; |
| 239 | return TV ? getRegClass(i: TV - 1) : nullptr; |
| 240 | }/// Get the weight in units of pressure for this register class. |
| 241 | const RegClassWeight &LanaiGenRegisterInfo:: |
| 242 | getRegClassWeight(const TargetRegisterClass *RC) const { |
| 243 | static const RegClassWeight RCWeightTable[] = { |
| 244 | {.RegWeight: 1, .WeightLimit: 32}, // GPR |
| 245 | {.RegWeight: 1, .WeightLimit: 7}, // GPR_with_sub_32 |
| 246 | {.RegWeight: 0, .WeightLimit: 0}, // CCR |
| 247 | }; |
| 248 | return RCWeightTable[RC->getID()]; |
| 249 | } |
| 250 | |
| 251 | /// Get the weight in units of pressure for this register unit. |
| 252 | unsigned LanaiGenRegisterInfo:: |
| 253 | getRegUnitWeight(MCRegUnit RegUnit) const { |
| 254 | assert(static_cast<unsigned>(RegUnit) < 33 && "invalid register unit" ); |
| 255 | // All register units have unit weight. |
| 256 | return 1; |
| 257 | } |
| 258 | |
| 259 | |
| 260 | // Get the number of dimensions of register pressure. |
| 261 | unsigned LanaiGenRegisterInfo::getNumRegPressureSets() const { |
| 262 | return 2; |
| 263 | } |
| 264 | |
| 265 | // Get the name of this register unit pressure set. |
| 266 | const char *LanaiGenRegisterInfo:: |
| 267 | getRegPressureSetName(unsigned Idx) const { |
| 268 | static const char *PressureNameTable[] = { |
| 269 | "GPR_with_sub_32" , |
| 270 | "GPR" , |
| 271 | }; |
| 272 | return PressureNameTable[Idx]; |
| 273 | } |
| 274 | |
| 275 | // Get the register unit pressure limit for this dimension. |
| 276 | // This limit must be adjusted dynamically for reserved registers. |
| 277 | unsigned LanaiGenRegisterInfo:: |
| 278 | getRegPressureSetLimit(const MachineFunction &MF, unsigned Idx) const { |
| 279 | static const uint8_t PressureLimitTable[] = { |
| 280 | 7, // 0: GPR_with_sub_32 |
| 281 | 32, // 1: GPR |
| 282 | }; |
| 283 | return PressureLimitTable[Idx]; |
| 284 | } |
| 285 | |
| 286 | /// Table of pressure sets per register class or unit. |
| 287 | static const int RCSetsTable[] = { |
| 288 | /* 0 */ 0, 1, -1, |
| 289 | }; |
| 290 | |
| 291 | /// Get the dimensions of register pressure impacted by this register class. |
| 292 | /// Returns a -1 terminated array of pressure set IDs |
| 293 | const int *LanaiGenRegisterInfo:: |
| 294 | getRegClassPressureSets(const TargetRegisterClass *RC) const { |
| 295 | static const uint8_t RCSetStartTable[] = { |
| 296 | 1,0,2,}; |
| 297 | return &RCSetsTable[RCSetStartTable[RC->getID()]]; |
| 298 | } |
| 299 | |
| 300 | /// Get the dimensions of register pressure impacted by this register unit. |
| 301 | /// Returns a -1 terminated array of pressure set IDs |
| 302 | const int *LanaiGenRegisterInfo:: |
| 303 | getRegUnitPressureSets(MCRegUnit RegUnit) const { |
| 304 | assert(static_cast<unsigned>(RegUnit) < 33 && "invalid register unit" ); |
| 305 | static const uint8_t RUSetStartTable[] = { |
| 306 | 0,0,0,0,0,2,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,}; |
| 307 | return &RCSetsTable[RUSetStartTable[static_cast<unsigned>(RegUnit)]]; |
| 308 | } |
| 309 | |
| 310 | |
| 311 | // Register to minimal register class mapping |
| 312 | |
| 313 | const TargetRegisterClass *LanaiGenRegisterInfo::getMinimalPhysRegClass(MCRegister Reg) const { |
| 314 | static const uint16_t InvalidRegClassID = UINT16_MAX; |
| 315 | |
| 316 | static const uint16_t Mapping[41] = { |
| 317 | InvalidRegClassID, // NoRegister |
| 318 | Lanai::GPR_with_sub_32RegClassID, // FP |
| 319 | Lanai::GPR_with_sub_32RegClassID, // PC |
| 320 | Lanai::GPR_with_sub_32RegClassID, // RCA |
| 321 | Lanai::GPR_with_sub_32RegClassID, // RV |
| 322 | Lanai::GPR_with_sub_32RegClassID, // SP |
| 323 | Lanai::CCRRegClassID, // SR |
| 324 | Lanai::GPRRegClassID, // R0 |
| 325 | Lanai::GPRRegClassID, // R1 |
| 326 | Lanai::GPRRegClassID, // R2 |
| 327 | Lanai::GPRRegClassID, // R3 |
| 328 | Lanai::GPRRegClassID, // R4 |
| 329 | Lanai::GPRRegClassID, // R5 |
| 330 | Lanai::GPRRegClassID, // R6 |
| 331 | Lanai::GPRRegClassID, // R7 |
| 332 | Lanai::GPRRegClassID, // R8 |
| 333 | Lanai::GPRRegClassID, // R9 |
| 334 | Lanai::GPRRegClassID, // R10 |
| 335 | Lanai::GPRRegClassID, // R11 |
| 336 | Lanai::GPRRegClassID, // R12 |
| 337 | Lanai::GPRRegClassID, // R13 |
| 338 | Lanai::GPRRegClassID, // R14 |
| 339 | Lanai::GPRRegClassID, // R15 |
| 340 | Lanai::GPRRegClassID, // R16 |
| 341 | Lanai::GPRRegClassID, // R17 |
| 342 | Lanai::GPRRegClassID, // R18 |
| 343 | Lanai::GPRRegClassID, // R19 |
| 344 | Lanai::GPRRegClassID, // R20 |
| 345 | Lanai::GPRRegClassID, // R21 |
| 346 | Lanai::GPRRegClassID, // R22 |
| 347 | Lanai::GPRRegClassID, // R23 |
| 348 | Lanai::GPRRegClassID, // R24 |
| 349 | Lanai::GPRRegClassID, // R25 |
| 350 | Lanai::GPRRegClassID, // R26 |
| 351 | Lanai::GPRRegClassID, // R27 |
| 352 | Lanai::GPRRegClassID, // R28 |
| 353 | Lanai::GPRRegClassID, // R29 |
| 354 | Lanai::GPRRegClassID, // R30 |
| 355 | Lanai::GPRRegClassID, // R31 |
| 356 | Lanai::GPR_with_sub_32RegClassID, // RR1 |
| 357 | Lanai::GPR_with_sub_32RegClassID, // RR2 |
| 358 | }; |
| 359 | |
| 360 | assert(Reg < ArrayRef(Mapping).size()); |
| 361 | unsigned RCID = Mapping[Reg.id()]; |
| 362 | if (RCID == InvalidRegClassID) |
| 363 | return nullptr; |
| 364 | return LanaiRegisterClasses[RCID]; |
| 365 | } |
| 366 | extern const MCRegisterDesc LanaiRegDesc[]; |
| 367 | extern const int16_t LanaiRegDiffLists[]; |
| 368 | extern const LaneBitmask LanaiLaneMaskLists[]; |
| 369 | extern const char LanaiRegStrings[]; |
| 370 | extern const char LanaiRegClassStrings[]; |
| 371 | extern const MCPhysReg LanaiRegUnitRoots[][2]; |
| 372 | extern const uint16_t LanaiSubRegIdxLists[]; |
| 373 | extern const uint16_t LanaiRegEncodingTable[]; |
| 374 | // Lanai Dwarf<->LLVM register mappings. |
| 375 | extern const MCRegisterInfo::DwarfLLVMRegPair LanaiDwarfFlavour0Dwarf2L[]; |
| 376 | extern const unsigned LanaiDwarfFlavour0Dwarf2LSize; |
| 377 | |
| 378 | extern const MCRegisterInfo::DwarfLLVMRegPair LanaiEHFlavour0Dwarf2L[]; |
| 379 | extern const unsigned LanaiEHFlavour0Dwarf2LSize; |
| 380 | |
| 381 | extern const MCRegisterInfo::DwarfLLVMRegPair LanaiDwarfFlavour0L2Dwarf[]; |
| 382 | extern const unsigned LanaiDwarfFlavour0L2DwarfSize; |
| 383 | |
| 384 | extern const MCRegisterInfo::DwarfLLVMRegPair LanaiEHFlavour0L2Dwarf[]; |
| 385 | extern const unsigned LanaiEHFlavour0L2DwarfSize; |
| 386 | |
| 387 | |
| 388 | LanaiGenRegisterInfo:: |
| 389 | LanaiGenRegisterInfo(unsigned RA, unsigned DwarfFlavour, unsigned EHFlavour, |
| 390 | unsigned PC, unsigned HwMode) |
| 391 | : TargetRegisterInfo(&LanaiRegInfoDesc, LanaiRegisterClasses, |
| 392 | LanaiSubRegIndexStrings, LanaiSubRegIndexNameOffsets, |
| 393 | LanaiSubRegIdxRangeTable, LanaiSubRegIndexLaneMaskTable, |
| 394 | |
| 395 | LaneBitmask(0xFFFFFFFFFFFFFFFE), LanaiRegClassInfos, LanaiVTLists, HwMode) { |
| 396 | InitMCRegisterInfo(D: LanaiRegDesc, NR: 41, RA, PC, |
| 397 | C: LanaiMCRegisterClasses, NC: 3, RURoots: LanaiRegUnitRoots, NRU: 33, DL: LanaiRegDiffLists, |
| 398 | RUMS: LanaiLaneMaskLists, Strings: LanaiRegStrings, ClassStrings: LanaiRegClassStrings, SubIndices: LanaiSubRegIdxLists, NumIndices: 2, |
| 399 | RET: LanaiRegEncodingTable, RUI: nullptr); |
| 400 | |
| 401 | switch (DwarfFlavour) { |
| 402 | default: |
| 403 | llvm_unreachable("Unknown DWARF flavour" ); |
| 404 | case 0: |
| 405 | mapDwarfRegsToLLVMRegs(Map: LanaiDwarfFlavour0Dwarf2L, Size: LanaiDwarfFlavour0Dwarf2LSize, isEH: false); |
| 406 | break; |
| 407 | } |
| 408 | switch (EHFlavour) { |
| 409 | default: |
| 410 | llvm_unreachable("Unknown DWARF flavour" ); |
| 411 | case 0: |
| 412 | mapDwarfRegsToLLVMRegs(Map: LanaiEHFlavour0Dwarf2L, Size: LanaiEHFlavour0Dwarf2LSize, isEH: true); |
| 413 | break; |
| 414 | } |
| 415 | switch (DwarfFlavour) { |
| 416 | default: |
| 417 | llvm_unreachable("Unknown DWARF flavour" ); |
| 418 | case 0: |
| 419 | mapLLVMRegsToDwarfRegs(Map: LanaiDwarfFlavour0L2Dwarf, Size: LanaiDwarfFlavour0L2DwarfSize, isEH: false); |
| 420 | break; |
| 421 | } |
| 422 | switch (EHFlavour) { |
| 423 | default: |
| 424 | llvm_unreachable("Unknown DWARF flavour" ); |
| 425 | case 0: |
| 426 | mapLLVMRegsToDwarfRegs(Map: LanaiEHFlavour0L2Dwarf, Size: LanaiEHFlavour0L2DwarfSize, isEH: true); |
| 427 | break; |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | static const MCPhysReg CSR_SaveList[] = { 0 }; |
| 432 | static const uint32_t CSR_RegMask[] = { 0x00000000, 0x00000000, }; |
| 433 | |
| 434 | |
| 435 | ArrayRef<const uint32_t *> LanaiGenRegisterInfo::getRegMasks() const { |
| 436 | static const uint32_t *const Masks[] = { |
| 437 | CSR_RegMask, |
| 438 | }; |
| 439 | return ArrayRef(Masks); |
| 440 | } |
| 441 | |
| 442 | bool LanaiGenRegisterInfo:: |
| 443 | isGeneralPurposeRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
| 444 | return |
| 445 | false; |
| 446 | } |
| 447 | |
| 448 | bool LanaiGenRegisterInfo:: |
| 449 | isGeneralPurposeRegisterClass(const TargetRegisterClass *RC) const { |
| 450 | return |
| 451 | false; |
| 452 | } |
| 453 | |
| 454 | bool LanaiGenRegisterInfo:: |
| 455 | isFixedRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
| 456 | return |
| 457 | false; |
| 458 | } |
| 459 | |
| 460 | bool LanaiGenRegisterInfo:: |
| 461 | isArgumentRegister(const MachineFunction &MF, MCRegister PhysReg) const { |
| 462 | return |
| 463 | false; |
| 464 | } |
| 465 | |
| 466 | bool LanaiGenRegisterInfo:: |
| 467 | isConstantPhysReg(MCRegister PhysReg) const { |
| 468 | return |
| 469 | false; |
| 470 | } |
| 471 | |
| 472 | ArrayRef<const char *> LanaiGenRegisterInfo::getRegMaskNames() const { |
| 473 | static const char *Names[] = { |
| 474 | "CSR" , |
| 475 | }; |
| 476 | return ArrayRef(Names); |
| 477 | } |
| 478 | |
| 479 | const LanaiFrameLowering * |
| 480 | LanaiGenRegisterInfo::getFrameLowering(const MachineFunction &MF) { |
| 481 | return static_cast<const LanaiFrameLowering *>( |
| 482 | MF.getSubtarget().getFrameLowering()); |
| 483 | } |
| 484 | |
| 485 | |
| 486 | } // namespace llvm |
| 487 | |