X86RegisterInfo.td revision b555609e73f5091bf8180c0875fb1fa6c5ad0e7a
1//===- X86RegisterInfo.td - Describe the X86 Register File --*- tablegen -*-==// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file describes the X86 Register file, defining the registers themselves, 11// aliases between the registers, and the register classes built out of the 12// registers. 13// 14//===----------------------------------------------------------------------===// 15 16//===----------------------------------------------------------------------===// 17// Register definitions... 18// 19let Namespace = "X86" in { 20 21 // Subregister indices. 22 def sub_8bit : SubRegIndex; 23 def sub_8bit_hi : SubRegIndex; 24 def sub_16bit : SubRegIndex; 25 def sub_32bit : SubRegIndex; 26 27 def sub_ss : SubRegIndex; 28 def sub_sd : SubRegIndex; 29 def sub_xmm : SubRegIndex; 30 31 32 // In the register alias definitions below, we define which registers alias 33 // which others. We only specify which registers the small registers alias, 34 // because the register file generator is smart enough to figure out that 35 // AL aliases AX if we tell it that AX aliased AL (for example). 36 37 // Dwarf numbering is different for 32-bit and 64-bit, and there are 38 // variations by target as well. Currently the first entry is for X86-64, 39 // second - for EH on X86-32/Darwin and third is 'generic' one (X86-32/Linux 40 // and debug information on X86-32/Darwin) 41 42 // 8-bit registers 43 // Low registers 44 def AL : Register<"al">, DwarfRegNum<[0, 0, 0]>; 45 def DL : Register<"dl">, DwarfRegNum<[1, 2, 2]>; 46 def CL : Register<"cl">, DwarfRegNum<[2, 1, 1]>; 47 def BL : Register<"bl">, DwarfRegNum<[3, 3, 3]>; 48 49 // X86-64 only 50 def SIL : Register<"sil">, DwarfRegNum<[4, 6, 6]>; 51 def DIL : Register<"dil">, DwarfRegNum<[5, 7, 7]>; 52 def BPL : Register<"bpl">, DwarfRegNum<[6, 4, 5]>; 53 def SPL : Register<"spl">, DwarfRegNum<[7, 5, 4]>; 54 def R8B : Register<"r8b">, DwarfRegNum<[8, -2, -2]>; 55 def R9B : Register<"r9b">, DwarfRegNum<[9, -2, -2]>; 56 def R10B : Register<"r10b">, DwarfRegNum<[10, -2, -2]>; 57 def R11B : Register<"r11b">, DwarfRegNum<[11, -2, -2]>; 58 def R12B : Register<"r12b">, DwarfRegNum<[12, -2, -2]>; 59 def R13B : Register<"r13b">, DwarfRegNum<[13, -2, -2]>; 60 def R14B : Register<"r14b">, DwarfRegNum<[14, -2, -2]>; 61 def R15B : Register<"r15b">, DwarfRegNum<[15, -2, -2]>; 62 63 // High registers. On x86-64, these cannot be used in any instruction 64 // with a REX prefix. 65 def AH : Register<"ah">, DwarfRegNum<[0, 0, 0]>; 66 def DH : Register<"dh">, DwarfRegNum<[1, 2, 2]>; 67 def CH : Register<"ch">, DwarfRegNum<[2, 1, 1]>; 68 def BH : Register<"bh">, DwarfRegNum<[3, 3, 3]>; 69 70 // 16-bit registers 71 def AX : RegisterWithSubRegs<"ax", [AL,AH]>, DwarfRegNum<[0, 0, 0]>; 72 def DX : RegisterWithSubRegs<"dx", [DL,DH]>, DwarfRegNum<[1, 2, 2]>; 73 def CX : RegisterWithSubRegs<"cx", [CL,CH]>, DwarfRegNum<[2, 1, 1]>; 74 def BX : RegisterWithSubRegs<"bx", [BL,BH]>, DwarfRegNum<[3, 3, 3]>; 75 def SI : RegisterWithSubRegs<"si", [SIL]>, DwarfRegNum<[4, 6, 6]>; 76 def DI : RegisterWithSubRegs<"di", [DIL]>, DwarfRegNum<[5, 7, 7]>; 77 def BP : RegisterWithSubRegs<"bp", [BPL]>, DwarfRegNum<[6, 4, 5]>; 78 def SP : RegisterWithSubRegs<"sp", [SPL]>, DwarfRegNum<[7, 5, 4]>; 79 def IP : Register<"ip">, DwarfRegNum<[16]>; 80 81 // X86-64 only 82 def R8W : RegisterWithSubRegs<"r8w", [R8B]>, DwarfRegNum<[8, -2, -2]>; 83 def R9W : RegisterWithSubRegs<"r9w", [R9B]>, DwarfRegNum<[9, -2, -2]>; 84 def R10W : RegisterWithSubRegs<"r10w", [R10B]>, DwarfRegNum<[10, -2, -2]>; 85 def R11W : RegisterWithSubRegs<"r11w", [R11B]>, DwarfRegNum<[11, -2, -2]>; 86 def R12W : RegisterWithSubRegs<"r12w", [R12B]>, DwarfRegNum<[12, -2, -2]>; 87 def R13W : RegisterWithSubRegs<"r13w", [R13B]>, DwarfRegNum<[13, -2, -2]>; 88 def R14W : RegisterWithSubRegs<"r14w", [R14B]>, DwarfRegNum<[14, -2, -2]>; 89 def R15W : RegisterWithSubRegs<"r15w", [R15B]>, DwarfRegNum<[15, -2, -2]>; 90 91 // 32-bit registers 92 def EAX : RegisterWithSubRegs<"eax", [AX]>, DwarfRegNum<[0, 0, 0]>; 93 def EDX : RegisterWithSubRegs<"edx", [DX]>, DwarfRegNum<[1, 2, 2]>; 94 def ECX : RegisterWithSubRegs<"ecx", [CX]>, DwarfRegNum<[2, 1, 1]>; 95 def EBX : RegisterWithSubRegs<"ebx", [BX]>, DwarfRegNum<[3, 3, 3]>; 96 def ESI : RegisterWithSubRegs<"esi", [SI]>, DwarfRegNum<[4, 6, 6]>; 97 def EDI : RegisterWithSubRegs<"edi", [DI]>, DwarfRegNum<[5, 7, 7]>; 98 def EBP : RegisterWithSubRegs<"ebp", [BP]>, DwarfRegNum<[6, 4, 5]>; 99 def ESP : RegisterWithSubRegs<"esp", [SP]>, DwarfRegNum<[7, 5, 4]>; 100 def EIP : RegisterWithSubRegs<"eip", [IP]>, DwarfRegNum<[16, 8, 8]>; 101 102 // X86-64 only 103 def R8D : RegisterWithSubRegs<"r8d", [R8W]>, DwarfRegNum<[8, -2, -2]>; 104 def R9D : RegisterWithSubRegs<"r9d", [R9W]>, DwarfRegNum<[9, -2, -2]>; 105 def R10D : RegisterWithSubRegs<"r10d", [R10W]>, DwarfRegNum<[10, -2, -2]>; 106 def R11D : RegisterWithSubRegs<"r11d", [R11W]>, DwarfRegNum<[11, -2, -2]>; 107 def R12D : RegisterWithSubRegs<"r12d", [R12W]>, DwarfRegNum<[12, -2, -2]>; 108 def R13D : RegisterWithSubRegs<"r13d", [R13W]>, DwarfRegNum<[13, -2, -2]>; 109 def R14D : RegisterWithSubRegs<"r14d", [R14W]>, DwarfRegNum<[14, -2, -2]>; 110 def R15D : RegisterWithSubRegs<"r15d", [R15W]>, DwarfRegNum<[15, -2, -2]>; 111 112 // 64-bit registers, X86-64 only 113 def RAX : RegisterWithSubRegs<"rax", [EAX]>, DwarfRegNum<[0, -2, -2]>; 114 def RDX : RegisterWithSubRegs<"rdx", [EDX]>, DwarfRegNum<[1, -2, -2]>; 115 def RCX : RegisterWithSubRegs<"rcx", [ECX]>, DwarfRegNum<[2, -2, -2]>; 116 def RBX : RegisterWithSubRegs<"rbx", [EBX]>, DwarfRegNum<[3, -2, -2]>; 117 def RSI : RegisterWithSubRegs<"rsi", [ESI]>, DwarfRegNum<[4, -2, -2]>; 118 def RDI : RegisterWithSubRegs<"rdi", [EDI]>, DwarfRegNum<[5, -2, -2]>; 119 def RBP : RegisterWithSubRegs<"rbp", [EBP]>, DwarfRegNum<[6, -2, -2]>; 120 def RSP : RegisterWithSubRegs<"rsp", [ESP]>, DwarfRegNum<[7, -2, -2]>; 121 122 def R8 : RegisterWithSubRegs<"r8", [R8D]>, DwarfRegNum<[8, -2, -2]>; 123 def R9 : RegisterWithSubRegs<"r9", [R9D]>, DwarfRegNum<[9, -2, -2]>; 124 def R10 : RegisterWithSubRegs<"r10", [R10D]>, DwarfRegNum<[10, -2, -2]>; 125 def R11 : RegisterWithSubRegs<"r11", [R11D]>, DwarfRegNum<[11, -2, -2]>; 126 def R12 : RegisterWithSubRegs<"r12", [R12D]>, DwarfRegNum<[12, -2, -2]>; 127 def R13 : RegisterWithSubRegs<"r13", [R13D]>, DwarfRegNum<[13, -2, -2]>; 128 def R14 : RegisterWithSubRegs<"r14", [R14D]>, DwarfRegNum<[14, -2, -2]>; 129 def R15 : RegisterWithSubRegs<"r15", [R15D]>, DwarfRegNum<[15, -2, -2]>; 130 def RIP : RegisterWithSubRegs<"rip", [EIP]>, DwarfRegNum<[16, -2, -2]>; 131 132 // MMX Registers. These are actually aliased to ST0 .. ST7 133 def MM0 : Register<"mm0">, DwarfRegNum<[41, 29, 29]>; 134 def MM1 : Register<"mm1">, DwarfRegNum<[42, 30, 30]>; 135 def MM2 : Register<"mm2">, DwarfRegNum<[43, 31, 31]>; 136 def MM3 : Register<"mm3">, DwarfRegNum<[44, 32, 32]>; 137 def MM4 : Register<"mm4">, DwarfRegNum<[45, 33, 33]>; 138 def MM5 : Register<"mm5">, DwarfRegNum<[46, 34, 34]>; 139 def MM6 : Register<"mm6">, DwarfRegNum<[47, 35, 35]>; 140 def MM7 : Register<"mm7">, DwarfRegNum<[48, 36, 36]>; 141 142 // Pseudo Floating Point registers 143 def FP0 : Register<"fp0">; 144 def FP1 : Register<"fp1">; 145 def FP2 : Register<"fp2">; 146 def FP3 : Register<"fp3">; 147 def FP4 : Register<"fp4">; 148 def FP5 : Register<"fp5">; 149 def FP6 : Register<"fp6">; 150 151 // XMM Registers, used by the various SSE instruction set extensions 152 def XMM0: Register<"xmm0">, DwarfRegNum<[17, 21, 21]>; 153 def XMM1: Register<"xmm1">, DwarfRegNum<[18, 22, 22]>; 154 def XMM2: Register<"xmm2">, DwarfRegNum<[19, 23, 23]>; 155 def XMM3: Register<"xmm3">, DwarfRegNum<[20, 24, 24]>; 156 def XMM4: Register<"xmm4">, DwarfRegNum<[21, 25, 25]>; 157 def XMM5: Register<"xmm5">, DwarfRegNum<[22, 26, 26]>; 158 def XMM6: Register<"xmm6">, DwarfRegNum<[23, 27, 27]>; 159 def XMM7: Register<"xmm7">, DwarfRegNum<[24, 28, 28]>; 160 161 // X86-64 only 162 def XMM8: Register<"xmm8">, DwarfRegNum<[25, -2, -2]>; 163 def XMM9: Register<"xmm9">, DwarfRegNum<[26, -2, -2]>; 164 def XMM10: Register<"xmm10">, DwarfRegNum<[27, -2, -2]>; 165 def XMM11: Register<"xmm11">, DwarfRegNum<[28, -2, -2]>; 166 def XMM12: Register<"xmm12">, DwarfRegNum<[29, -2, -2]>; 167 def XMM13: Register<"xmm13">, DwarfRegNum<[30, -2, -2]>; 168 def XMM14: Register<"xmm14">, DwarfRegNum<[31, -2, -2]>; 169 def XMM15: Register<"xmm15">, DwarfRegNum<[32, -2, -2]>; 170 171 // YMM Registers, used by AVX instructions 172 def YMM0: RegisterWithSubRegs<"ymm0", [XMM0]>, DwarfRegNum<[17, 21, 21]>; 173 def YMM1: RegisterWithSubRegs<"ymm1", [XMM1]>, DwarfRegNum<[18, 22, 22]>; 174 def YMM2: RegisterWithSubRegs<"ymm2", [XMM2]>, DwarfRegNum<[19, 23, 23]>; 175 def YMM3: RegisterWithSubRegs<"ymm3", [XMM3]>, DwarfRegNum<[20, 24, 24]>; 176 def YMM4: RegisterWithSubRegs<"ymm4", [XMM4]>, DwarfRegNum<[21, 25, 25]>; 177 def YMM5: RegisterWithSubRegs<"ymm5", [XMM5]>, DwarfRegNum<[22, 26, 26]>; 178 def YMM6: RegisterWithSubRegs<"ymm6", [XMM6]>, DwarfRegNum<[23, 27, 27]>; 179 def YMM7: RegisterWithSubRegs<"ymm7", [XMM7]>, DwarfRegNum<[24, 28, 28]>; 180 def YMM8: RegisterWithSubRegs<"ymm8", [XMM8]>, DwarfRegNum<[25, -2, -2]>; 181 def YMM9: RegisterWithSubRegs<"ymm9", [XMM9]>, DwarfRegNum<[26, -2, -2]>; 182 def YMM10: RegisterWithSubRegs<"ymm10", [XMM10]>, DwarfRegNum<[27, -2, -2]>; 183 def YMM11: RegisterWithSubRegs<"ymm11", [XMM11]>, DwarfRegNum<[28, -2, -2]>; 184 def YMM12: RegisterWithSubRegs<"ymm12", [XMM12]>, DwarfRegNum<[29, -2, -2]>; 185 def YMM13: RegisterWithSubRegs<"ymm13", [XMM13]>, DwarfRegNum<[30, -2, -2]>; 186 def YMM14: RegisterWithSubRegs<"ymm14", [XMM14]>, DwarfRegNum<[31, -2, -2]>; 187 def YMM15: RegisterWithSubRegs<"ymm15", [XMM15]>, DwarfRegNum<[32, -2, -2]>; 188 189 // Floating point stack registers 190 def ST0 : Register<"st(0)">, DwarfRegNum<[33, 12, 11]>; 191 def ST1 : Register<"st(1)">, DwarfRegNum<[34, 13, 12]>; 192 def ST2 : Register<"st(2)">, DwarfRegNum<[35, 14, 13]>; 193 def ST3 : Register<"st(3)">, DwarfRegNum<[36, 15, 14]>; 194 def ST4 : Register<"st(4)">, DwarfRegNum<[37, 16, 15]>; 195 def ST5 : Register<"st(5)">, DwarfRegNum<[38, 17, 16]>; 196 def ST6 : Register<"st(6)">, DwarfRegNum<[39, 18, 17]>; 197 def ST7 : Register<"st(7)">, DwarfRegNum<[40, 19, 18]>; 198 199 // Status flags register 200 def EFLAGS : Register<"flags">; 201 202 // Segment registers 203 def CS : Register<"cs">; 204 def DS : Register<"ds">; 205 def SS : Register<"ss">; 206 def ES : Register<"es">; 207 def FS : Register<"fs">; 208 def GS : Register<"gs">; 209 210 // Debug registers 211 def DR0 : Register<"dr0">; 212 def DR1 : Register<"dr1">; 213 def DR2 : Register<"dr2">; 214 def DR3 : Register<"dr3">; 215 def DR4 : Register<"dr4">; 216 def DR5 : Register<"dr5">; 217 def DR6 : Register<"dr6">; 218 def DR7 : Register<"dr7">; 219 220 // Condition registers 221 def CR0 : Register<"cr0">; 222 def CR1 : Register<"cr1">; 223 def CR2 : Register<"cr2">; 224 def CR3 : Register<"cr3">; 225 def CR4 : Register<"cr4">; 226 def CR5 : Register<"cr5">; 227 def CR6 : Register<"cr6">; 228 def CR7 : Register<"cr7">; 229 def CR8 : Register<"cr8">; 230} 231 232 233//===----------------------------------------------------------------------===// 234// Subregister Set Definitions... now that we have all of the pieces, define the 235// sub registers for each register. 236// 237 238def : SubRegSet<sub_8bit, [AX, CX, DX, BX, SP, BP, SI, DI, 239 R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W], 240 [AL, CL, DL, BL, SPL, BPL, SIL, DIL, 241 R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; 242 243def : SubRegSet<sub_8bit_hi, [AX, CX, DX, BX], 244 [AH, CH, DH, BH]>; 245 246def : SubRegSet<sub_8bit, [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, 247 R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D], 248 [AL, CL, DL, BL, SPL, BPL, SIL, DIL, 249 R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; 250 251def : SubRegSet<sub_8bit_hi, [EAX, ECX, EDX, EBX], 252 [AH, CH, DH, BH]>; 253 254def : SubRegSet<sub_16bit, [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, 255 R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D], 256 [AX, CX, DX, BX, SP, BP, SI, DI, 257 R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W]>; 258 259def : SubRegSet<sub_8bit, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, 260 R8, R9, R10, R11, R12, R13, R14, R15], 261 [AL, CL, DL, BL, SPL, BPL, SIL, DIL, 262 R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; 263 264def : SubRegSet<sub_8bit_hi, [RAX, RCX, RDX, RBX], 265 [AH, CH, DH, BH]>; 266 267def : SubRegSet<sub_16bit, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, 268 R8, R9, R10, R11, R12, R13, R14, R15], 269 [AX, CX, DX, BX, SP, BP, SI, DI, 270 R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W]>; 271 272def : SubRegSet<sub_32bit, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, 273 R8, R9, R10, R11, R12, R13, R14, R15], 274 [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, 275 R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D]>; 276 277def : SubRegSet<sub_ss, [YMM0, YMM1, YMM2, YMM3, YMM4, YMM5, YMM6, YMM7, 278 YMM8, YMM9, YMM10, YMM11, YMM12, YMM13, YMM14, YMM15], 279 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 280 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15]>; 281 282def : SubRegSet<sub_sd, [YMM0, YMM1, YMM2, YMM3, YMM4, YMM5, YMM6, YMM7, 283 YMM8, YMM9, YMM10, YMM11, YMM12, YMM13, YMM14, YMM15], 284 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 285 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15]>; 286 287def : SubRegSet<sub_xmm, [YMM0, YMM1, YMM2, YMM3, YMM4, YMM5, YMM6, YMM7, 288 YMM8, YMM9, YMM10, YMM11, YMM12, YMM13, YMM14, YMM15], 289 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 290 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15]>; 291 292def : SubRegSet<sub_ss, [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 293 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15], 294 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 295 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15]>; 296 297def : SubRegSet<sub_sd, [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 298 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15], 299 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 300 XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15]>; 301 302//===----------------------------------------------------------------------===// 303// Register Class Definitions... now that we have all of the pieces, define the 304// top-level register classes. The order specified in the register list is 305// implicitly defined to be the register allocation order. 306// 307 308// List call-clobbered registers before callee-save registers. RBX, RBP, (and 309// R12, R13, R14, and R15 for X86-64) are callee-save registers. 310// In 64-mode, there are 12 additional i8 registers, SIL, DIL, BPL, SPL, and 311// R8B, ... R15B. 312// Allocate R12 and R13 last, as these require an extra byte when 313// encoded in x86_64 instructions. 314// FIXME: Allow AH, CH, DH, BH to be used as general-purpose registers in 315// 64-bit mode. The main complication is that they cannot be encoded in an 316// instruction requiring a REX prefix, while SIL, DIL, BPL, R8D, etc. 317// require a REX prefix. For example, "addb %ah, %dil" and "movzbl %ah, %r8d" 318// cannot be encoded. 319def GR8 : RegisterClass<"X86", [i8], 8, 320 [AL, CL, DL, AH, CH, DH, BL, BH, SIL, DIL, BPL, SPL, 321 R8B, R9B, R10B, R11B, R14B, R15B, R12B, R13B]> { 322 let MethodProtos = [{ 323 iterator allocation_order_begin(const MachineFunction &MF) const; 324 iterator allocation_order_end(const MachineFunction &MF) const; 325 }]; 326 let MethodBodies = [{ 327 static const unsigned X86_GR8_AO_64[] = { 328 X86::AL, X86::CL, X86::DL, X86::SIL, X86::DIL, 329 X86::R8B, X86::R9B, X86::R10B, X86::R11B, 330 X86::BL, X86::R14B, X86::R15B, X86::R12B, X86::R13B, X86::BPL 331 }; 332 333 GR8Class::iterator 334 GR8Class::allocation_order_begin(const MachineFunction &MF) const { 335 const TargetMachine &TM = MF.getTarget(); 336 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 337 if (Subtarget.is64Bit()) 338 return X86_GR8_AO_64; 339 else 340 return begin(); 341 } 342 343 GR8Class::iterator 344 GR8Class::allocation_order_end(const MachineFunction &MF) const { 345 const TargetMachine &TM = MF.getTarget(); 346 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 347 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 348 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 349 // Does the function dedicate RBP / EBP to being a frame ptr? 350 if (!Subtarget.is64Bit()) 351 // In 32-mode, none of the 8-bit registers aliases EBP or ESP. 352 return begin() + 8; 353 else if (RI->hasFP(MF) || MFI->getReserveFP()) 354 // If so, don't allocate SPL or BPL. 355 return array_endof(X86_GR8_AO_64) - 1; 356 else 357 // If not, just don't allocate SPL. 358 return array_endof(X86_GR8_AO_64); 359 } 360 }]; 361} 362 363def GR16 : RegisterClass<"X86", [i16], 16, 364 [AX, CX, DX, SI, DI, BX, BP, SP, 365 R8W, R9W, R10W, R11W, R14W, R15W, R12W, R13W]> { 366 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi)]; 367 let MethodProtos = [{ 368 iterator allocation_order_begin(const MachineFunction &MF) const; 369 iterator allocation_order_end(const MachineFunction &MF) const; 370 }]; 371 let MethodBodies = [{ 372 static const unsigned X86_GR16_AO_64[] = { 373 X86::AX, X86::CX, X86::DX, X86::SI, X86::DI, 374 X86::R8W, X86::R9W, X86::R10W, X86::R11W, 375 X86::BX, X86::R14W, X86::R15W, X86::R12W, X86::R13W, X86::BP 376 }; 377 378 GR16Class::iterator 379 GR16Class::allocation_order_begin(const MachineFunction &MF) const { 380 const TargetMachine &TM = MF.getTarget(); 381 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 382 if (Subtarget.is64Bit()) 383 return X86_GR16_AO_64; 384 else 385 return begin(); 386 } 387 388 GR16Class::iterator 389 GR16Class::allocation_order_end(const MachineFunction &MF) const { 390 const TargetMachine &TM = MF.getTarget(); 391 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 392 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 393 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 394 if (Subtarget.is64Bit()) { 395 // Does the function dedicate RBP to being a frame ptr? 396 if (RI->hasFP(MF) || MFI->getReserveFP()) 397 // If so, don't allocate SP or BP. 398 return array_endof(X86_GR16_AO_64) - 1; 399 else 400 // If not, just don't allocate SP. 401 return array_endof(X86_GR16_AO_64); 402 } else { 403 // Does the function dedicate EBP to being a frame ptr? 404 if (RI->hasFP(MF) || MFI->getReserveFP()) 405 // If so, don't allocate SP or BP. 406 return begin() + 6; 407 else 408 // If not, just don't allocate SP. 409 return begin() + 7; 410 } 411 } 412 }]; 413} 414 415def GR32 : RegisterClass<"X86", [i32], 32, 416 [EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP, 417 R8D, R9D, R10D, R11D, R14D, R15D, R12D, R13D]> { 418 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), (GR16 sub_16bit)]; 419 let MethodProtos = [{ 420 iterator allocation_order_begin(const MachineFunction &MF) const; 421 iterator allocation_order_end(const MachineFunction &MF) const; 422 }]; 423 let MethodBodies = [{ 424 static const unsigned X86_GR32_AO_64[] = { 425 X86::EAX, X86::ECX, X86::EDX, X86::ESI, X86::EDI, 426 X86::R8D, X86::R9D, X86::R10D, X86::R11D, 427 X86::EBX, X86::R14D, X86::R15D, X86::R12D, X86::R13D, X86::EBP 428 }; 429 430 GR32Class::iterator 431 GR32Class::allocation_order_begin(const MachineFunction &MF) const { 432 const TargetMachine &TM = MF.getTarget(); 433 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 434 if (Subtarget.is64Bit()) 435 return X86_GR32_AO_64; 436 else 437 return begin(); 438 } 439 440 GR32Class::iterator 441 GR32Class::allocation_order_end(const MachineFunction &MF) const { 442 const TargetMachine &TM = MF.getTarget(); 443 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 444 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 445 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 446 if (Subtarget.is64Bit()) { 447 // Does the function dedicate RBP to being a frame ptr? 448 if (RI->hasFP(MF) || MFI->getReserveFP()) 449 // If so, don't allocate ESP or EBP. 450 return array_endof(X86_GR32_AO_64) - 1; 451 else 452 // If not, just don't allocate ESP. 453 return array_endof(X86_GR32_AO_64); 454 } else { 455 // Does the function dedicate EBP to being a frame ptr? 456 if (RI->hasFP(MF) || MFI->getReserveFP()) 457 // If so, don't allocate ESP or EBP. 458 return begin() + 6; 459 else 460 // If not, just don't allocate ESP. 461 return begin() + 7; 462 } 463 } 464 }]; 465} 466 467// GR64 - 64-bit GPRs. This oddly includes RIP, which isn't accurate, since 468// RIP isn't really a register and it can't be used anywhere except in an 469// address, but it doesn't cause trouble. 470def GR64 : RegisterClass<"X86", [i64], 64, 471 [RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, 472 RBX, R14, R15, R12, R13, RBP, RSP, RIP]> { 473 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), 474 (GR16 sub_16bit), 475 (GR32 sub_32bit)]; 476 let MethodProtos = [{ 477 iterator allocation_order_end(const MachineFunction &MF) const; 478 }]; 479 let MethodBodies = [{ 480 GR64Class::iterator 481 GR64Class::allocation_order_end(const MachineFunction &MF) const { 482 const TargetMachine &TM = MF.getTarget(); 483 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 484 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 485 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 486 if (!Subtarget.is64Bit()) 487 return begin(); // None of these are allocatable in 32-bit. 488 // Does the function dedicate RBP to being a frame ptr? 489 if (RI->hasFP(MF) || MFI->getReserveFP()) 490 return end()-3; // If so, don't allocate RIP, RSP or RBP 491 else 492 return end()-2; // If not, just don't allocate RIP or RSP 493 } 494 }]; 495} 496 497// Segment registers for use by MOV instructions (and others) that have a 498// segment register as one operand. Always contain a 16-bit segment 499// descriptor. 500def SEGMENT_REG : RegisterClass<"X86", [i16], 16, [CS, DS, SS, ES, FS, GS]> { 501} 502 503// Debug registers. 504def DEBUG_REG : RegisterClass<"X86", [i32], 32, 505 [DR0, DR1, DR2, DR3, DR4, DR5, DR6, DR7]> { 506} 507 508// Control registers. 509def CONTROL_REG : RegisterClass<"X86", [i64], 64, 510 [CR0, CR1, CR2, CR3, CR4, CR5, CR6, CR7, CR8]> { 511} 512 513// GR8_ABCD_L, GR8_ABCD_H, GR16_ABCD, GR32_ABCD, GR64_ABCD - Subclasses of 514// GR8, GR16, GR32, and GR64 which contain just the "a" "b", "c", and "d" 515// registers. On x86-32, GR16_ABCD and GR32_ABCD are classes for registers 516// that support 8-bit subreg operations. On x86-64, GR16_ABCD, GR32_ABCD, 517// and GR64_ABCD are classes for registers that support 8-bit h-register 518// operations. 519def GR8_ABCD_L : RegisterClass<"X86", [i8], 8, [AL, CL, DL, BL]> { 520} 521def GR8_ABCD_H : RegisterClass<"X86", [i8], 8, [AH, CH, DH, BH]> { 522} 523def GR16_ABCD : RegisterClass<"X86", [i16], 16, [AX, CX, DX, BX]> { 524 let SubRegClasses = [(GR8_ABCD_L sub_8bit), (GR8_ABCD_H sub_8bit_hi)]; 525} 526def GR32_ABCD : RegisterClass<"X86", [i32], 32, [EAX, ECX, EDX, EBX]> { 527 let SubRegClasses = [(GR8_ABCD_L sub_8bit), 528 (GR8_ABCD_H sub_8bit_hi), 529 (GR16_ABCD sub_16bit)]; 530} 531def GR64_ABCD : RegisterClass<"X86", [i64], 64, [RAX, RCX, RDX, RBX]> { 532 let SubRegClasses = [(GR8_ABCD_L sub_8bit), 533 (GR8_ABCD_H sub_8bit_hi), 534 (GR16_ABCD sub_16bit), 535 (GR32_ABCD sub_32bit)]; 536} 537def GR32_TC : RegisterClass<"X86", [i32], 32, [EAX, ECX, EDX]> { 538 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), (GR16 sub_16bit)]; 539} 540def GR64_TC : RegisterClass<"X86", [i64], 64, [RAX, RCX, RDX, RSI, RDI, 541 R8, R9, R11]> { 542 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), 543 (GR16 sub_16bit), 544 (GR32_TC sub_32bit)]; 545} 546 547// GR8_NOREX - GR8 registers which do not require a REX prefix. 548def GR8_NOREX : RegisterClass<"X86", [i8], 8, 549 [AL, CL, DL, AH, CH, DH, BL, BH]> { 550 let MethodProtos = [{ 551 iterator allocation_order_begin(const MachineFunction &MF) const; 552 iterator allocation_order_end(const MachineFunction &MF) const; 553 }]; 554 let MethodBodies = [{ 555 // In 64-bit mode, it's not safe to blindly allocate H registers. 556 static const unsigned X86_GR8_NOREX_AO_64[] = { 557 X86::AL, X86::CL, X86::DL, X86::BL 558 }; 559 560 GR8_NOREXClass::iterator 561 GR8_NOREXClass::allocation_order_begin(const MachineFunction &MF) const { 562 const TargetMachine &TM = MF.getTarget(); 563 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 564 if (Subtarget.is64Bit()) 565 return X86_GR8_NOREX_AO_64; 566 else 567 return begin(); 568 } 569 570 GR8_NOREXClass::iterator 571 GR8_NOREXClass::allocation_order_end(const MachineFunction &MF) const { 572 const TargetMachine &TM = MF.getTarget(); 573 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 574 if (Subtarget.is64Bit()) 575 return array_endof(X86_GR8_NOREX_AO_64); 576 else 577 return end(); 578 } 579 }]; 580} 581// GR16_NOREX - GR16 registers which do not require a REX prefix. 582def GR16_NOREX : RegisterClass<"X86", [i16], 16, 583 [AX, CX, DX, SI, DI, BX, BP, SP]> { 584 let SubRegClasses = [(GR8_NOREX sub_8bit, sub_8bit_hi)]; 585 let MethodProtos = [{ 586 iterator allocation_order_end(const MachineFunction &MF) const; 587 }]; 588 let MethodBodies = [{ 589 GR16_NOREXClass::iterator 590 GR16_NOREXClass::allocation_order_end(const MachineFunction &MF) const { 591 const TargetMachine &TM = MF.getTarget(); 592 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 593 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 594 // Does the function dedicate RBP / EBP to being a frame ptr? 595 if (RI->hasFP(MF) || MFI->getReserveFP()) 596 // If so, don't allocate SP or BP. 597 return end() - 2; 598 else 599 // If not, just don't allocate SP. 600 return end() - 1; 601 } 602 }]; 603} 604// GR32_NOREX - GR32 registers which do not require a REX prefix. 605def GR32_NOREX : RegisterClass<"X86", [i32], 32, 606 [EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP]> { 607 let SubRegClasses = [(GR8_NOREX sub_8bit, sub_8bit_hi), 608 (GR16_NOREX sub_16bit)]; 609 let MethodProtos = [{ 610 iterator allocation_order_end(const MachineFunction &MF) const; 611 }]; 612 let MethodBodies = [{ 613 GR32_NOREXClass::iterator 614 GR32_NOREXClass::allocation_order_end(const MachineFunction &MF) const { 615 const TargetMachine &TM = MF.getTarget(); 616 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 617 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 618 // Does the function dedicate RBP / EBP to being a frame ptr? 619 if (RI->hasFP(MF) || MFI->getReserveFP()) 620 // If so, don't allocate ESP or EBP. 621 return end() - 2; 622 else 623 // If not, just don't allocate ESP. 624 return end() - 1; 625 } 626 }]; 627} 628// GR64_NOREX - GR64 registers which do not require a REX prefix. 629def GR64_NOREX : RegisterClass<"X86", [i64], 64, 630 [RAX, RCX, RDX, RSI, RDI, RBX, RBP, RSP, RIP]> { 631 let SubRegClasses = [(GR8_NOREX sub_8bit, sub_8bit_hi), 632 (GR16_NOREX sub_16bit), 633 (GR32_NOREX sub_32bit)]; 634 let MethodProtos = [{ 635 iterator allocation_order_end(const MachineFunction &MF) const; 636 }]; 637 let MethodBodies = [{ 638 GR64_NOREXClass::iterator 639 GR64_NOREXClass::allocation_order_end(const MachineFunction &MF) const { 640 const TargetMachine &TM = MF.getTarget(); 641 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 642 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 643 // Does the function dedicate RBP to being a frame ptr? 644 if (RI->hasFP(MF) || MFI->getReserveFP()) 645 // If so, don't allocate RIP, RSP or RBP. 646 return end() - 3; 647 else 648 // If not, just don't allocate RIP or RSP. 649 return end() - 2; 650 } 651 }]; 652} 653 654// GR32_NOSP - GR32 registers except ESP. 655def GR32_NOSP : RegisterClass<"X86", [i32], 32, 656 [EAX, ECX, EDX, ESI, EDI, EBX, EBP, 657 R8D, R9D, R10D, R11D, R14D, R15D, R12D, R13D]> { 658 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), (GR16 sub_16bit)]; 659 let MethodProtos = [{ 660 iterator allocation_order_begin(const MachineFunction &MF) const; 661 iterator allocation_order_end(const MachineFunction &MF) const; 662 }]; 663 let MethodBodies = [{ 664 static const unsigned X86_GR32_NOSP_AO_64[] = { 665 X86::EAX, X86::ECX, X86::EDX, X86::ESI, X86::EDI, 666 X86::R8D, X86::R9D, X86::R10D, X86::R11D, 667 X86::EBX, X86::R14D, X86::R15D, X86::R12D, X86::R13D, X86::EBP 668 }; 669 670 GR32_NOSPClass::iterator 671 GR32_NOSPClass::allocation_order_begin(const MachineFunction &MF) const { 672 const TargetMachine &TM = MF.getTarget(); 673 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 674 if (Subtarget.is64Bit()) 675 return X86_GR32_NOSP_AO_64; 676 else 677 return begin(); 678 } 679 680 GR32_NOSPClass::iterator 681 GR32_NOSPClass::allocation_order_end(const MachineFunction &MF) const { 682 const TargetMachine &TM = MF.getTarget(); 683 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 684 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 685 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 686 if (Subtarget.is64Bit()) { 687 // Does the function dedicate RBP to being a frame ptr? 688 if (RI->hasFP(MF) || MFI->getReserveFP()) 689 // If so, don't allocate EBP. 690 return array_endof(X86_GR32_NOSP_AO_64) - 1; 691 else 692 // If not, any reg in this class is ok. 693 return array_endof(X86_GR32_NOSP_AO_64); 694 } else { 695 // Does the function dedicate EBP to being a frame ptr? 696 if (RI->hasFP(MF) || MFI->getReserveFP()) 697 // If so, don't allocate EBP. 698 return begin() + 6; 699 else 700 // If not, any reg in this class is ok. 701 return begin() + 7; 702 } 703 } 704 }]; 705} 706 707// GR64_NOSP - GR64 registers except RSP (and RIP). 708def GR64_NOSP : RegisterClass<"X86", [i64], 64, 709 [RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, 710 RBX, R14, R15, R12, R13, RBP]> { 711 let SubRegClasses = [(GR8 sub_8bit, sub_8bit_hi), 712 (GR16 sub_16bit), 713 (GR32_NOSP sub_32bit)]; 714 let MethodProtos = [{ 715 iterator allocation_order_end(const MachineFunction &MF) const; 716 }]; 717 let MethodBodies = [{ 718 GR64_NOSPClass::iterator 719 GR64_NOSPClass::allocation_order_end(const MachineFunction &MF) const { 720 const TargetMachine &TM = MF.getTarget(); 721 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 722 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 723 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 724 if (!Subtarget.is64Bit()) 725 return begin(); // None of these are allocatable in 32-bit. 726 // Does the function dedicate RBP to being a frame ptr? 727 if (RI->hasFP(MF) || MFI->getReserveFP()) 728 return end()-1; // If so, don't allocate RBP 729 else 730 return end(); // If not, any reg in this class is ok. 731 } 732 }]; 733} 734 735// GR64_NOREX_NOSP - GR64_NOREX registers except RSP. 736def GR64_NOREX_NOSP : RegisterClass<"X86", [i64], 64, 737 [RAX, RCX, RDX, RSI, RDI, RBX, RBP]> { 738 let SubRegClasses = [(GR8_NOREX sub_8bit, sub_8bit_hi), 739 (GR16_NOREX sub_16bit), 740 (GR32_NOREX sub_32bit)]; 741 let MethodProtos = [{ 742 iterator allocation_order_end(const MachineFunction &MF) const; 743 }]; 744 let MethodBodies = [{ 745 GR64_NOREX_NOSPClass::iterator 746 GR64_NOREX_NOSPClass::allocation_order_end(const MachineFunction &MF) const 747 { 748 const TargetMachine &TM = MF.getTarget(); 749 const TargetRegisterInfo *RI = TM.getRegisterInfo(); 750 const X86MachineFunctionInfo *MFI = MF.getInfo<X86MachineFunctionInfo>(); 751 // Does the function dedicate RBP to being a frame ptr? 752 if (RI->hasFP(MF) || MFI->getReserveFP()) 753 // If so, don't allocate RBP. 754 return end() - 1; 755 else 756 // If not, any reg in this class is ok. 757 return end(); 758 } 759 }]; 760} 761 762// A class to support the 'A' assembler constraint: EAX then EDX. 763def GR32_AD : RegisterClass<"X86", [i32], 32, [EAX, EDX]> { 764 let SubRegClasses = [(GR8_ABCD_L sub_8bit), 765 (GR8_ABCD_H sub_8bit_hi), 766 (GR16_ABCD sub_16bit)]; 767} 768 769// Scalar SSE2 floating point registers. 770def FR32 : RegisterClass<"X86", [f32], 32, 771 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 772 XMM8, XMM9, XMM10, XMM11, 773 XMM12, XMM13, XMM14, XMM15]> { 774 let MethodProtos = [{ 775 iterator allocation_order_end(const MachineFunction &MF) const; 776 }]; 777 let MethodBodies = [{ 778 FR32Class::iterator 779 FR32Class::allocation_order_end(const MachineFunction &MF) const { 780 const TargetMachine &TM = MF.getTarget(); 781 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 782 if (!Subtarget.is64Bit()) 783 return end()-8; // Only XMM0 to XMM7 are available in 32-bit mode. 784 else 785 return end(); 786 } 787 }]; 788} 789 790def FR64 : RegisterClass<"X86", [f64], 64, 791 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 792 XMM8, XMM9, XMM10, XMM11, 793 XMM12, XMM13, XMM14, XMM15]> { 794 let MethodProtos = [{ 795 iterator allocation_order_end(const MachineFunction &MF) const; 796 }]; 797 let MethodBodies = [{ 798 FR64Class::iterator 799 FR64Class::allocation_order_end(const MachineFunction &MF) const { 800 const TargetMachine &TM = MF.getTarget(); 801 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 802 if (!Subtarget.is64Bit()) 803 return end()-8; // Only XMM0 to XMM7 are available in 32-bit mode. 804 else 805 return end(); 806 } 807 }]; 808} 809 810 811// FIXME: This sets up the floating point register files as though they are f64 812// values, though they really are f80 values. This will cause us to spill 813// values as 64-bit quantities instead of 80-bit quantities, which is much much 814// faster on common hardware. In reality, this should be controlled by a 815// command line option or something. 816 817def RFP32 : RegisterClass<"X86",[f32], 32, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>; 818def RFP64 : RegisterClass<"X86",[f64], 32, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>; 819def RFP80 : RegisterClass<"X86",[f80], 32, [FP0, FP1, FP2, FP3, FP4, FP5, FP6]>; 820 821// Floating point stack registers (these are not allocatable by the 822// register allocator - the floating point stackifier is responsible 823// for transforming FPn allocations to STn registers) 824def RST : RegisterClass<"X86", [f80, f64, f32], 32, 825 [ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7]> { 826 let MethodProtos = [{ 827 iterator allocation_order_end(const MachineFunction &MF) const; 828 }]; 829 let MethodBodies = [{ 830 RSTClass::iterator 831 RSTClass::allocation_order_end(const MachineFunction &MF) const { 832 return begin(); 833 } 834 }]; 835} 836 837// Generic vector registers: VR64 and VR128. 838def VR64 : RegisterClass<"X86", [v8i8, v4i16, v2i32, v1i64, v2f32], 64, 839 [MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7]>; 840def VR128 : RegisterClass<"X86", [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],128, 841 [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, 842 XMM8, XMM9, XMM10, XMM11, 843 XMM12, XMM13, XMM14, XMM15]> { 844 let SubRegClasses = [(FR32 sub_ss), (FR64 sub_sd)]; 845 846 let MethodProtos = [{ 847 iterator allocation_order_end(const MachineFunction &MF) const; 848 }]; 849 let MethodBodies = [{ 850 VR128Class::iterator 851 VR128Class::allocation_order_end(const MachineFunction &MF) const { 852 const TargetMachine &TM = MF.getTarget(); 853 const X86Subtarget &Subtarget = TM.getSubtarget<X86Subtarget>(); 854 if (!Subtarget.is64Bit()) 855 return end()-8; // Only XMM0 to XMM7 are available in 32-bit mode. 856 else 857 return end(); 858 } 859 }]; 860} 861def VR256 : RegisterClass<"X86", [ v8i32, v4i64, v8f32, v4f64],256, 862 [YMM0, YMM1, YMM2, YMM3, YMM4, YMM5, YMM6, YMM7, 863 YMM8, YMM9, YMM10, YMM11, 864 YMM12, YMM13, YMM14, YMM15]> { 865 let SubRegClasses = [(FR32 sub_ss), (FR64 sub_sd), (VR128 sub_xmm)]; 866} 867 868// Status flags registers. 869def CCR : RegisterClass<"X86", [i32], 32, [EFLAGS]> { 870 let CopyCost = -1; // Don't allow copying of status registers. 871} 872