MipsRegisterInfo.td revision 249423
1234353Sdim//===-- MipsRegisterInfo.td - Mips Register defs -----------*- tablegen -*-===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed 10193323Sed//===----------------------------------------------------------------------===// 11193323Sed// Declarations that describe the MIPS register file 12193323Sed//===----------------------------------------------------------------------===// 13226633Sdimlet Namespace = "Mips" in { 14226633Sdimdef sub_fpeven : SubRegIndex; 15226633Sdimdef sub_fpodd : SubRegIndex; 16226633Sdimdef sub_32 : SubRegIndex; 17243830Sdimdef sub_lo : SubRegIndex; 18243830Sdimdef sub_hi : SubRegIndex; 19226633Sdim} 20193323Sed 21249423Sdimclass Unallocatable { 22249423Sdim bit isAllocatable = 0; 23249423Sdim} 24249423Sdim 25193323Sed// We have banks of 32 registers each. 26249423Sdimclass MipsReg<bits<16> Enc, string n> : Register<n> { 27249423Sdim let HWEncoding = Enc; 28193323Sed let Namespace = "Mips"; 29193323Sed} 30193323Sed 31249423Sdimclass MipsRegWithSubRegs<bits<16> Enc, string n, list<Register> subregs> 32199511Srdivacky : RegisterWithSubRegs<n, subregs> { 33249423Sdim let HWEncoding = Enc; 34199511Srdivacky let Namespace = "Mips"; 35199511Srdivacky} 36199511Srdivacky 37193323Sed// Mips CPU Registers 38249423Sdimclass MipsGPRReg<bits<16> Enc, string n> : MipsReg<Enc, n>; 39193323Sed 40226633Sdim// Mips 64-bit CPU Registers 41249423Sdimclass Mips64GPRReg<bits<16> Enc, string n, list<Register> subregs> 42249423Sdim : MipsRegWithSubRegs<Enc, n, subregs> { 43226633Sdim let SubRegIndices = [sub_32]; 44226633Sdim} 45226633Sdim 46193323Sed// Mips 32-bit FPU Registers 47249423Sdimclass FPR<bits<16> Enc, string n> : MipsReg<Enc, n>; 48193323Sed 49193323Sed// Mips 64-bit (aliased) FPU Registers 50249423Sdimclass AFPR<bits<16> Enc, string n, list<Register> subregs> 51249423Sdim : MipsRegWithSubRegs<Enc, n, subregs> { 52208599Srdivacky let SubRegIndices = [sub_fpeven, sub_fpodd]; 53234353Sdim let CoveredBySubRegs = 1; 54193323Sed} 55193323Sed 56249423Sdimclass AFPR64<bits<16> Enc, string n, list<Register> subregs> 57249423Sdim : MipsRegWithSubRegs<Enc, n, subregs> { 58226633Sdim let SubRegIndices = [sub_32]; 59226633Sdim} 60226633Sdim 61249423Sdim// Accumulator Registers 62249423Sdimclass ACC<bits<16> Enc, string n, list<Register> subregs> 63249423Sdim : MipsRegWithSubRegs<Enc, n, subregs> { 64249423Sdim let SubRegIndices = [sub_lo, sub_hi]; 65249423Sdim let CoveredBySubRegs = 1; 66223017Sdim} 67223017Sdim 68249423Sdim// Mips Hardware Registers 69249423Sdimclass HWR<bits<16> Enc, string n> : MipsReg<Enc, n>; 70249423Sdim 71193323Sed//===----------------------------------------------------------------------===// 72193323Sed// Registers 73193323Sed//===----------------------------------------------------------------------===// 74193323Sed 75193323Sedlet Namespace = "Mips" in { 76193323Sed // General Purpose Registers 77239462Sdim def ZERO : MipsGPRReg< 0, "zero">, DwarfRegNum<[0]>; 78243830Sdim def AT : MipsGPRReg< 1, "1">, DwarfRegNum<[1]>; 79193323Sed def V0 : MipsGPRReg< 2, "2">, DwarfRegNum<[2]>; 80193323Sed def V1 : MipsGPRReg< 3, "3">, DwarfRegNum<[3]>; 81223017Sdim def A0 : MipsGPRReg< 4, "4">, DwarfRegNum<[4]>; 82193323Sed def A1 : MipsGPRReg< 5, "5">, DwarfRegNum<[5]>; 83193323Sed def A2 : MipsGPRReg< 6, "6">, DwarfRegNum<[6]>; 84193323Sed def A3 : MipsGPRReg< 7, "7">, DwarfRegNum<[7]>; 85193323Sed def T0 : MipsGPRReg< 8, "8">, DwarfRegNum<[8]>; 86193323Sed def T1 : MipsGPRReg< 9, "9">, DwarfRegNum<[9]>; 87193323Sed def T2 : MipsGPRReg< 10, "10">, DwarfRegNum<[10]>; 88193323Sed def T3 : MipsGPRReg< 11, "11">, DwarfRegNum<[11]>; 89193323Sed def T4 : MipsGPRReg< 12, "12">, DwarfRegNum<[12]>; 90193323Sed def T5 : MipsGPRReg< 13, "13">, DwarfRegNum<[13]>; 91193323Sed def T6 : MipsGPRReg< 14, "14">, DwarfRegNum<[14]>; 92193323Sed def T7 : MipsGPRReg< 15, "15">, DwarfRegNum<[15]>; 93193323Sed def S0 : MipsGPRReg< 16, "16">, DwarfRegNum<[16]>; 94193323Sed def S1 : MipsGPRReg< 17, "17">, DwarfRegNum<[17]>; 95193323Sed def S2 : MipsGPRReg< 18, "18">, DwarfRegNum<[18]>; 96193323Sed def S3 : MipsGPRReg< 19, "19">, DwarfRegNum<[19]>; 97193323Sed def S4 : MipsGPRReg< 20, "20">, DwarfRegNum<[20]>; 98193323Sed def S5 : MipsGPRReg< 21, "21">, DwarfRegNum<[21]>; 99193323Sed def S6 : MipsGPRReg< 22, "22">, DwarfRegNum<[22]>; 100193323Sed def S7 : MipsGPRReg< 23, "23">, DwarfRegNum<[23]>; 101193323Sed def T8 : MipsGPRReg< 24, "24">, DwarfRegNum<[24]>; 102193323Sed def T9 : MipsGPRReg< 25, "25">, DwarfRegNum<[25]>; 103193323Sed def K0 : MipsGPRReg< 26, "26">, DwarfRegNum<[26]>; 104193323Sed def K1 : MipsGPRReg< 27, "27">, DwarfRegNum<[27]>; 105239462Sdim def GP : MipsGPRReg< 28, "gp">, DwarfRegNum<[28]>; 106239462Sdim def SP : MipsGPRReg< 29, "sp">, DwarfRegNum<[29]>; 107239462Sdim def FP : MipsGPRReg< 30, "fp">, DwarfRegNum<[30]>; 108239462Sdim def RA : MipsGPRReg< 31, "ra">, DwarfRegNum<[31]>; 109221345Sdim 110226633Sdim // General Purpose 64-bit Registers 111239462Sdim def ZERO_64 : Mips64GPRReg< 0, "zero", [ZERO]>, DwarfRegNum<[0]>; 112243830Sdim def AT_64 : Mips64GPRReg< 1, "1", [AT]>, DwarfRegNum<[1]>; 113234353Sdim def V0_64 : Mips64GPRReg< 2, "2", [V0]>, DwarfRegNum<[2]>; 114234353Sdim def V1_64 : Mips64GPRReg< 3, "3", [V1]>, DwarfRegNum<[3]>; 115234353Sdim def A0_64 : Mips64GPRReg< 4, "4", [A0]>, DwarfRegNum<[4]>; 116234353Sdim def A1_64 : Mips64GPRReg< 5, "5", [A1]>, DwarfRegNum<[5]>; 117234353Sdim def A2_64 : Mips64GPRReg< 6, "6", [A2]>, DwarfRegNum<[6]>; 118234353Sdim def A3_64 : Mips64GPRReg< 7, "7", [A3]>, DwarfRegNum<[7]>; 119234353Sdim def T0_64 : Mips64GPRReg< 8, "8", [T0]>, DwarfRegNum<[8]>; 120234353Sdim def T1_64 : Mips64GPRReg< 9, "9", [T1]>, DwarfRegNum<[9]>; 121234353Sdim def T2_64 : Mips64GPRReg< 10, "10", [T2]>, DwarfRegNum<[10]>; 122234353Sdim def T3_64 : Mips64GPRReg< 11, "11", [T3]>, DwarfRegNum<[11]>; 123234353Sdim def T4_64 : Mips64GPRReg< 12, "12", [T4]>, DwarfRegNum<[12]>; 124234353Sdim def T5_64 : Mips64GPRReg< 13, "13", [T5]>, DwarfRegNum<[13]>; 125234353Sdim def T6_64 : Mips64GPRReg< 14, "14", [T6]>, DwarfRegNum<[14]>; 126234353Sdim def T7_64 : Mips64GPRReg< 15, "15", [T7]>, DwarfRegNum<[15]>; 127234353Sdim def S0_64 : Mips64GPRReg< 16, "16", [S0]>, DwarfRegNum<[16]>; 128234353Sdim def S1_64 : Mips64GPRReg< 17, "17", [S1]>, DwarfRegNum<[17]>; 129234353Sdim def S2_64 : Mips64GPRReg< 18, "18", [S2]>, DwarfRegNum<[18]>; 130234353Sdim def S3_64 : Mips64GPRReg< 19, "19", [S3]>, DwarfRegNum<[19]>; 131234353Sdim def S4_64 : Mips64GPRReg< 20, "20", [S4]>, DwarfRegNum<[20]>; 132234353Sdim def S5_64 : Mips64GPRReg< 21, "21", [S5]>, DwarfRegNum<[21]>; 133234353Sdim def S6_64 : Mips64GPRReg< 22, "22", [S6]>, DwarfRegNum<[22]>; 134234353Sdim def S7_64 : Mips64GPRReg< 23, "23", [S7]>, DwarfRegNum<[23]>; 135234353Sdim def T8_64 : Mips64GPRReg< 24, "24", [T8]>, DwarfRegNum<[24]>; 136234353Sdim def T9_64 : Mips64GPRReg< 25, "25", [T9]>, DwarfRegNum<[25]>; 137234353Sdim def K0_64 : Mips64GPRReg< 26, "26", [K0]>, DwarfRegNum<[26]>; 138234353Sdim def K1_64 : Mips64GPRReg< 27, "27", [K1]>, DwarfRegNum<[27]>; 139239462Sdim def GP_64 : Mips64GPRReg< 28, "gp", [GP]>, DwarfRegNum<[28]>; 140239462Sdim def SP_64 : Mips64GPRReg< 29, "sp", [SP]>, DwarfRegNum<[29]>; 141239462Sdim def FP_64 : Mips64GPRReg< 30, "fp", [FP]>, DwarfRegNum<[30]>; 142239462Sdim def RA_64 : Mips64GPRReg< 31, "ra", [RA]>, DwarfRegNum<[31]>; 143226633Sdim 144193323Sed /// Mips Single point precision FPU Registers 145239462Sdim def F0 : FPR< 0, "f0">, DwarfRegNum<[32]>; 146239462Sdim def F1 : FPR< 1, "f1">, DwarfRegNum<[33]>; 147239462Sdim def F2 : FPR< 2, "f2">, DwarfRegNum<[34]>; 148239462Sdim def F3 : FPR< 3, "f3">, DwarfRegNum<[35]>; 149239462Sdim def F4 : FPR< 4, "f4">, DwarfRegNum<[36]>; 150239462Sdim def F5 : FPR< 5, "f5">, DwarfRegNum<[37]>; 151239462Sdim def F6 : FPR< 6, "f6">, DwarfRegNum<[38]>; 152239462Sdim def F7 : FPR< 7, "f7">, DwarfRegNum<[39]>; 153239462Sdim def F8 : FPR< 8, "f8">, DwarfRegNum<[40]>; 154239462Sdim def F9 : FPR< 9, "f9">, DwarfRegNum<[41]>; 155239462Sdim def F10 : FPR<10, "f10">, DwarfRegNum<[42]>; 156239462Sdim def F11 : FPR<11, "f11">, DwarfRegNum<[43]>; 157239462Sdim def F12 : FPR<12, "f12">, DwarfRegNum<[44]>; 158239462Sdim def F13 : FPR<13, "f13">, DwarfRegNum<[45]>; 159239462Sdim def F14 : FPR<14, "f14">, DwarfRegNum<[46]>; 160239462Sdim def F15 : FPR<15, "f15">, DwarfRegNum<[47]>; 161239462Sdim def F16 : FPR<16, "f16">, DwarfRegNum<[48]>; 162239462Sdim def F17 : FPR<17, "f17">, DwarfRegNum<[49]>; 163239462Sdim def F18 : FPR<18, "f18">, DwarfRegNum<[50]>; 164239462Sdim def F19 : FPR<19, "f19">, DwarfRegNum<[51]>; 165239462Sdim def F20 : FPR<20, "f20">, DwarfRegNum<[52]>; 166239462Sdim def F21 : FPR<21, "f21">, DwarfRegNum<[53]>; 167239462Sdim def F22 : FPR<22, "f22">, DwarfRegNum<[54]>; 168239462Sdim def F23 : FPR<23, "f23">, DwarfRegNum<[55]>; 169239462Sdim def F24 : FPR<24, "f24">, DwarfRegNum<[56]>; 170239462Sdim def F25 : FPR<25, "f25">, DwarfRegNum<[57]>; 171239462Sdim def F26 : FPR<26, "f26">, DwarfRegNum<[58]>; 172239462Sdim def F27 : FPR<27, "f27">, DwarfRegNum<[59]>; 173239462Sdim def F28 : FPR<28, "f28">, DwarfRegNum<[60]>; 174239462Sdim def F29 : FPR<29, "f29">, DwarfRegNum<[61]>; 175239462Sdim def F30 : FPR<30, "f30">, DwarfRegNum<[62]>; 176239462Sdim def F31 : FPR<31, "f31">, DwarfRegNum<[63]>; 177221345Sdim 178193323Sed /// Mips Double point precision FPU Registers (aliased 179193323Sed /// with the single precision to hold 64 bit values) 180239462Sdim def D0 : AFPR< 0, "f0", [F0, F1]>; 181239462Sdim def D1 : AFPR< 2, "f2", [F2, F3]>; 182239462Sdim def D2 : AFPR< 4, "f4", [F4, F5]>; 183239462Sdim def D3 : AFPR< 6, "f6", [F6, F7]>; 184239462Sdim def D4 : AFPR< 8, "f8", [F8, F9]>; 185239462Sdim def D5 : AFPR<10, "f10", [F10, F11]>; 186239462Sdim def D6 : AFPR<12, "f12", [F12, F13]>; 187239462Sdim def D7 : AFPR<14, "f14", [F14, F15]>; 188239462Sdim def D8 : AFPR<16, "f16", [F16, F17]>; 189239462Sdim def D9 : AFPR<18, "f18", [F18, F19]>; 190239462Sdim def D10 : AFPR<20, "f20", [F20, F21]>; 191239462Sdim def D11 : AFPR<22, "f22", [F22, F23]>; 192239462Sdim def D12 : AFPR<24, "f24", [F24, F25]>; 193239462Sdim def D13 : AFPR<26, "f26", [F26, F27]>; 194239462Sdim def D14 : AFPR<28, "f28", [F28, F29]>; 195239462Sdim def D15 : AFPR<30, "f30", [F30, F31]>; 196193323Sed 197226633Sdim /// Mips Double point precision FPU Registers in MFP64 mode. 198239462Sdim def D0_64 : AFPR64<0, "f0", [F0]>, DwarfRegNum<[32]>; 199239462Sdim def D1_64 : AFPR64<1, "f1", [F1]>, DwarfRegNum<[33]>; 200239462Sdim def D2_64 : AFPR64<2, "f2", [F2]>, DwarfRegNum<[34]>; 201239462Sdim def D3_64 : AFPR64<3, "f3", [F3]>, DwarfRegNum<[35]>; 202239462Sdim def D4_64 : AFPR64<4, "f4", [F4]>, DwarfRegNum<[36]>; 203239462Sdim def D5_64 : AFPR64<5, "f5", [F5]>, DwarfRegNum<[37]>; 204239462Sdim def D6_64 : AFPR64<6, "f6", [F6]>, DwarfRegNum<[38]>; 205239462Sdim def D7_64 : AFPR64<7, "f7", [F7]>, DwarfRegNum<[39]>; 206239462Sdim def D8_64 : AFPR64<8, "f8", [F8]>, DwarfRegNum<[40]>; 207239462Sdim def D9_64 : AFPR64<9, "f9", [F9]>, DwarfRegNum<[41]>; 208239462Sdim def D10_64 : AFPR64<10, "f10", [F10]>, DwarfRegNum<[42]>; 209239462Sdim def D11_64 : AFPR64<11, "f11", [F11]>, DwarfRegNum<[43]>; 210239462Sdim def D12_64 : AFPR64<12, "f12", [F12]>, DwarfRegNum<[44]>; 211239462Sdim def D13_64 : AFPR64<13, "f13", [F13]>, DwarfRegNum<[45]>; 212239462Sdim def D14_64 : AFPR64<14, "f14", [F14]>, DwarfRegNum<[46]>; 213239462Sdim def D15_64 : AFPR64<15, "f15", [F15]>, DwarfRegNum<[47]>; 214239462Sdim def D16_64 : AFPR64<16, "f16", [F16]>, DwarfRegNum<[48]>; 215239462Sdim def D17_64 : AFPR64<17, "f17", [F17]>, DwarfRegNum<[49]>; 216239462Sdim def D18_64 : AFPR64<18, "f18", [F18]>, DwarfRegNum<[50]>; 217239462Sdim def D19_64 : AFPR64<19, "f19", [F19]>, DwarfRegNum<[51]>; 218239462Sdim def D20_64 : AFPR64<20, "f20", [F20]>, DwarfRegNum<[52]>; 219239462Sdim def D21_64 : AFPR64<21, "f21", [F21]>, DwarfRegNum<[53]>; 220239462Sdim def D22_64 : AFPR64<22, "f22", [F22]>, DwarfRegNum<[54]>; 221239462Sdim def D23_64 : AFPR64<23, "f23", [F23]>, DwarfRegNum<[55]>; 222239462Sdim def D24_64 : AFPR64<24, "f24", [F24]>, DwarfRegNum<[56]>; 223239462Sdim def D25_64 : AFPR64<25, "f25", [F25]>, DwarfRegNum<[57]>; 224239462Sdim def D26_64 : AFPR64<26, "f26", [F26]>, DwarfRegNum<[58]>; 225239462Sdim def D27_64 : AFPR64<27, "f27", [F27]>, DwarfRegNum<[59]>; 226239462Sdim def D28_64 : AFPR64<28, "f28", [F28]>, DwarfRegNum<[60]>; 227239462Sdim def D29_64 : AFPR64<29, "f29", [F29]>, DwarfRegNum<[61]>; 228239462Sdim def D30_64 : AFPR64<30, "f30", [F30]>, DwarfRegNum<[62]>; 229239462Sdim def D31_64 : AFPR64<31, "f31", [F31]>, DwarfRegNum<[63]>; 230226633Sdim 231193323Sed // Hi/Lo registers 232193323Sed def HI : Register<"hi">, DwarfRegNum<[64]>; 233249423Sdim def HI1 : Register<"hi1">, DwarfRegNum<[176]>; 234249423Sdim def HI2 : Register<"hi2">, DwarfRegNum<[178]>; 235249423Sdim def HI3 : Register<"hi3">, DwarfRegNum<[180]>; 236193323Sed def LO : Register<"lo">, DwarfRegNum<[65]>; 237249423Sdim def LO1 : Register<"lo1">, DwarfRegNum<[177]>; 238249423Sdim def LO2 : Register<"lo2">, DwarfRegNum<[179]>; 239249423Sdim def LO3 : Register<"lo3">, DwarfRegNum<[181]>; 240193323Sed 241226633Sdim let SubRegIndices = [sub_32] in { 242226633Sdim def HI64 : RegisterWithSubRegs<"hi", [HI]>; 243226633Sdim def LO64 : RegisterWithSubRegs<"lo", [LO]>; 244226633Sdim } 245226633Sdim 246193323Sed // Status flags register 247193323Sed def FCR31 : Register<"31">; 248223017Sdim 249239462Sdim // fcc0 register 250249423Sdim def FCC0 : MipsReg<0, "fcc0">; 251239462Sdim 252243830Sdim // PC register 253243830Sdim def PC : Register<"pc">; 254243830Sdim 255223017Sdim // Hardware register $29 256249423Sdim def HWR29 : MipsReg<29, "29">; 257249423Sdim def HWR29_64 : MipsReg<29, "29">; 258243830Sdim 259243830Sdim // Accum registers 260249423Sdim def AC0 : ACC<0, "ac0", [LO, HI]>; 261249423Sdim def AC1 : ACC<1, "ac1", [LO1, HI1]>; 262249423Sdim def AC2 : ACC<2, "ac2", [LO2, HI2]>; 263249423Sdim def AC3 : ACC<3, "ac3", [LO3, HI3]>; 264243830Sdim 265249423Sdim def AC0_64 : ACC<0, "ac0", [LO64, HI64]>; 266249423Sdim 267243830Sdim def DSPCtrl : Register<"dspctrl">; 268193323Sed} 269193323Sed 270193323Sed//===----------------------------------------------------------------------===// 271193323Sed// Register Classes 272193323Sed//===----------------------------------------------------------------------===// 273193323Sed 274243830Sdimclass CPURegsClass<list<ValueType> regTypes> : 275243830Sdim RegisterClass<"Mips", regTypes, 32, (add 276239462Sdim // Reserved 277239462Sdim ZERO, AT, 278193323Sed // Return Values and Arguments 279224145Sdim V0, V1, A0, A1, A2, A3, 280193323Sed // Not preserved across procedure calls 281239462Sdim T0, T1, T2, T3, T4, T5, T6, T7, 282193323Sed // Callee save 283193323Sed S0, S1, S2, S3, S4, S5, S6, S7, 284239462Sdim // Not preserved across procedure calls 285239462Sdim T8, T9, 286193323Sed // Reserved 287239462Sdim K0, K1, GP, SP, FP, RA)>; 288193323Sed 289243830Sdimdef CPURegs : CPURegsClass<[i32]>; 290243830Sdimdef DSPRegs : CPURegsClass<[v4i8, v2i16]>; 291243830Sdim 292226633Sdimdef CPU64Regs : RegisterClass<"Mips", [i64], 64, (add 293239462Sdim// Reserved 294239462Sdim ZERO_64, AT_64, 295226633Sdim // Return Values and Arguments 296226633Sdim V0_64, V1_64, A0_64, A1_64, A2_64, A3_64, 297226633Sdim // Not preserved across procedure calls 298239462Sdim T0_64, T1_64, T2_64, T3_64, T4_64, T5_64, T6_64, T7_64, 299226633Sdim // Callee save 300226633Sdim S0_64, S1_64, S2_64, S3_64, S4_64, S5_64, S6_64, S7_64, 301239462Sdim // Not preserved across procedure calls 302239462Sdim T8_64, T9_64, 303226633Sdim // Reserved 304239462Sdim K0_64, K1_64, GP_64, SP_64, FP_64, RA_64)>; 305226633Sdim 306239462Sdimdef CPU16Regs : RegisterClass<"Mips", [i32], 32, (add 307239462Sdim // Return Values and Arguments 308239462Sdim V0, V1, A0, A1, A2, A3, 309239462Sdim // Callee save 310239462Sdim S0, S1)>; 311239462Sdim 312249423Sdimdef CPURAReg : RegisterClass<"Mips", [i32], 32, (add RA)>, Unallocatable; 313239462Sdim 314249423Sdimdef CPUSPReg : RegisterClass<"Mips", [i32], 32, (add SP)>, Unallocatable; 315239462Sdim 316193323Sed// 64bit fp: 317193323Sed// * FGR64 - 32 64-bit registers 318221345Sdim// * AFGR64 - 16 32-bit even registers (32-bit FP Mode) 319193323Sed// 320193323Sed// 32bit fp: 321193323Sed// * FGR32 - 16 32-bit even registers 322193323Sed// * FGR32 - 32 32-bit registers (single float only mode) 323224145Sdimdef FGR32 : RegisterClass<"Mips", [f32], 32, (sequence "F%u", 0, 31)>; 324193323Sed 325224145Sdimdef AFGR64 : RegisterClass<"Mips", [f64], 64, (add 326193323Sed // Return Values and Arguments 327239462Sdim D0, D1, 328193323Sed // Not preserved across procedure calls 329239462Sdim D2, D3, D4, D5, 330239462Sdim // Return Values and Arguments 331239462Sdim D6, D7, 332239462Sdim // Not preserved across procedure calls 333239462Sdim D8, D9, 334193323Sed // Callee save 335239462Sdim D10, D11, D12, D13, D14, D15)>; 336193323Sed 337239462Sdimdef FGR64 : RegisterClass<"Mips", [f64], 64, (sequence "D%u_64", 0, 31)>; 338226633Sdim 339193323Sed// Condition Register for floating point operations 340249423Sdimdef CCR : RegisterClass<"Mips", [i32], 32, (add FCR31,FCC0)>, Unallocatable; 341193323Sed 342193323Sed// Hi/Lo Registers 343249423Sdimdef HILO : RegisterClass<"Mips", [i32], 32, (add HI, LO)>, Unallocatable; 344249423Sdimdef HILO64 : RegisterClass<"Mips", [i64], 64, (add HI64, LO64)>, Unallocatable; 345193323Sed 346223017Sdim// Hardware registers 347249423Sdimdef HWRegs : RegisterClass<"Mips", [i32], 32, (add HWR29)>, Unallocatable; 348249423Sdimdef HWRegs64 : RegisterClass<"Mips", [i64], 64, (add HWR29_64)>, Unallocatable; 349234353Sdim 350243830Sdim// Accumulator Registers 351249423Sdimdef ACRegs : RegisterClass<"Mips", [untyped], 64, (add AC0)> { 352249423Sdim let Size = 64; 353249423Sdim} 354249423Sdim 355249423Sdimdef ACRegs128 : RegisterClass<"Mips", [untyped], 128, (add AC0_64)> { 356249423Sdim let Size = 128; 357249423Sdim} 358249423Sdim 359249423Sdimdef ACRegsDSP : RegisterClass<"Mips", [untyped], 64, (sequence "AC%u", 0, 3)> { 360249423Sdim let Size = 64; 361249423Sdim} 362249423Sdim 363249423Sdimdef CPURegsAsmOperand : AsmOperandClass { 364249423Sdim let Name = "CPURegsAsm"; 365249423Sdim let ParserMethod = "parseCPURegs"; 366249423Sdim} 367249423Sdim 368249423Sdimdef CPU64RegsAsmOperand : AsmOperandClass { 369249423Sdim let Name = "CPU64RegsAsm"; 370249423Sdim let ParserMethod = "parseCPU64Regs"; 371249423Sdim} 372249423Sdim 373249423Sdimdef CCRAsmOperand : AsmOperandClass { 374249423Sdim let Name = "CCRAsm"; 375249423Sdim let ParserMethod = "parseCCRRegs"; 376249423Sdim} 377249423Sdim 378249423Sdimdef CPURegsOpnd : RegisterOperand<CPURegs, "printCPURegs"> { 379249423Sdim let ParserMatchClass = CPURegsAsmOperand; 380249423Sdim} 381249423Sdim 382249423Sdimdef CPU64RegsOpnd : RegisterOperand<CPU64Regs, "printCPURegs"> { 383249423Sdim let ParserMatchClass = CPU64RegsAsmOperand; 384249423Sdim} 385249423Sdim 386249423Sdimdef CCROpnd : RegisterOperand<CCR, "printCPURegs"> { 387249423Sdim let ParserMatchClass = CCRAsmOperand; 388249423Sdim} 389249423Sdim 390249423Sdimdef HWRegsAsmOperand : AsmOperandClass { 391249423Sdim let Name = "HWRegsAsm"; 392249423Sdim let ParserMethod = "parseHWRegs"; 393249423Sdim} 394249423Sdim 395249423Sdimdef HW64RegsAsmOperand : AsmOperandClass { 396249423Sdim let Name = "HW64RegsAsm"; 397249423Sdim let ParserMethod = "parseHW64Regs"; 398249423Sdim} 399249423Sdim 400249423Sdimdef HWRegsOpnd : RegisterOperand<HWRegs, "printCPURegs"> { 401249423Sdim let ParserMatchClass = HWRegsAsmOperand; 402249423Sdim} 403249423Sdim 404249423Sdimdef HW64RegsOpnd : RegisterOperand<HWRegs64, "printCPURegs"> { 405249423Sdim let ParserMatchClass = HW64RegsAsmOperand; 406249423Sdim} 407