1//===------- X86InstrOperands.td - X86 Operand Definitions --*- tablegen -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9// A version of ptr_rc which excludes SP, ESP, and RSP. This is used for 10// the index operand of an address, to conform to x86 encoding restrictions. 11def ptr_rc_nosp : PointerLikeRegClass<1>; 12 13// *mem - Operand definitions for the funky X86 addressing mode operands. 14// 15def X86MemAsmOperand : AsmOperandClass { 16 let Name = "Mem"; 17} 18let RenderMethod = "addMemOperands", SuperClasses = [X86MemAsmOperand] in { 19 def X86Mem8AsmOperand : AsmOperandClass { let Name = "Mem8"; } 20 def X86Mem16AsmOperand : AsmOperandClass { let Name = "Mem16"; } 21 def X86Mem32AsmOperand : AsmOperandClass { let Name = "Mem32"; } 22 def X86Mem64AsmOperand : AsmOperandClass { let Name = "Mem64"; } 23 def X86Mem80AsmOperand : AsmOperandClass { let Name = "Mem80"; } 24 def X86Mem128AsmOperand : AsmOperandClass { let Name = "Mem128"; } 25 def X86Mem256AsmOperand : AsmOperandClass { let Name = "Mem256"; } 26 def X86Mem512AsmOperand : AsmOperandClass { let Name = "Mem512"; } 27 // Gather mem operands 28 def X86Mem64_RC128Operand : AsmOperandClass { let Name = "Mem64_RC128"; } 29 def X86Mem128_RC128Operand : AsmOperandClass { let Name = "Mem128_RC128"; } 30 def X86Mem256_RC128Operand : AsmOperandClass { let Name = "Mem256_RC128"; } 31 def X86Mem128_RC256Operand : AsmOperandClass { let Name = "Mem128_RC256"; } 32 def X86Mem256_RC256Operand : AsmOperandClass { let Name = "Mem256_RC256"; } 33 34 def X86Mem64_RC128XOperand : AsmOperandClass { let Name = "Mem64_RC128X"; } 35 def X86Mem128_RC128XOperand : AsmOperandClass { let Name = "Mem128_RC128X"; } 36 def X86Mem256_RC128XOperand : AsmOperandClass { let Name = "Mem256_RC128X"; } 37 def X86Mem128_RC256XOperand : AsmOperandClass { let Name = "Mem128_RC256X"; } 38 def X86Mem256_RC256XOperand : AsmOperandClass { let Name = "Mem256_RC256X"; } 39 def X86Mem512_RC256XOperand : AsmOperandClass { let Name = "Mem512_RC256X"; } 40 def X86Mem256_RC512Operand : AsmOperandClass { let Name = "Mem256_RC512"; } 41 def X86Mem512_RC512Operand : AsmOperandClass { let Name = "Mem512_RC512"; } 42 def X86Mem512_GR16Operand : AsmOperandClass { let Name = "Mem512_GR16"; } 43 def X86Mem512_GR32Operand : AsmOperandClass { let Name = "Mem512_GR32"; } 44 def X86Mem512_GR64Operand : AsmOperandClass { let Name = "Mem512_GR64"; } 45 46 def X86SibMemOperand : AsmOperandClass { let Name = "SibMem"; } 47} 48 49def X86AbsMemAsmOperand : AsmOperandClass { 50 let Name = "AbsMem"; 51 let SuperClasses = [X86MemAsmOperand]; 52} 53 54class X86MemOperand<string printMethod, 55 AsmOperandClass parserMatchClass = X86MemAsmOperand, 56 int size = 0> : Operand<iPTR> { 57 let PrintMethod = printMethod; 58 let MIOperandInfo = (ops ptr_rc, i8imm, ptr_rc_nosp, i32imm, SEGMENT_REG); 59 let ParserMatchClass = parserMatchClass; 60 let OperandType = "OPERAND_MEMORY"; 61 int Size = size; 62} 63 64// Gather mem operands 65class X86VMemOperand<RegisterClass RC, string printMethod, 66 AsmOperandClass parserMatchClass, int size = 0> 67 : X86MemOperand<printMethod, parserMatchClass, size> { 68 let MIOperandInfo = (ops ptr_rc, i8imm, RC, i32imm, SEGMENT_REG); 69} 70 71def anymem : X86MemOperand<"printMemReference">; 72 73// FIXME: Right now we allow any size during parsing, but we might want to 74// restrict to only unsized memory. 75def opaquemem : X86MemOperand<"printMemReference">; 76 77def sibmem: X86MemOperand<"printMemReference", X86SibMemOperand>; 78 79def i8mem : X86MemOperand<"printbytemem", X86Mem8AsmOperand, 8>; 80def i16mem : X86MemOperand<"printwordmem", X86Mem16AsmOperand, 16>; 81def i32mem : X86MemOperand<"printdwordmem", X86Mem32AsmOperand, 32>; 82def i64mem : X86MemOperand<"printqwordmem", X86Mem64AsmOperand, 64>; 83def i128mem : X86MemOperand<"printxmmwordmem", X86Mem128AsmOperand, 128>; 84def i256mem : X86MemOperand<"printymmwordmem", X86Mem256AsmOperand, 256>; 85def i512mem : X86MemOperand<"printzmmwordmem", X86Mem512AsmOperand, 512>; 86def f16mem : X86MemOperand<"printwordmem", X86Mem16AsmOperand, 16>; 87def f32mem : X86MemOperand<"printdwordmem", X86Mem32AsmOperand, 32>; 88def f64mem : X86MemOperand<"printqwordmem", X86Mem64AsmOperand, 64>; 89def f80mem : X86MemOperand<"printtbytemem", X86Mem80AsmOperand, 80>; 90def f128mem : X86MemOperand<"printxmmwordmem", X86Mem128AsmOperand, 128>; 91def f256mem : X86MemOperand<"printymmwordmem", X86Mem256AsmOperand, 256>; 92def f512mem : X86MemOperand<"printzmmwordmem", X86Mem512AsmOperand, 512>; 93 94// 32/64 mode specific mem operands 95def i512mem_GR16 : X86MemOperand<"printzmmwordmem", X86Mem512_GR16Operand, 512>; 96def i512mem_GR32 : X86MemOperand<"printzmmwordmem", X86Mem512_GR32Operand, 512>; 97def i512mem_GR64 : X86MemOperand<"printzmmwordmem", X86Mem512_GR64Operand, 512>; 98 99// Gather mem operands 100def vx64mem : X86VMemOperand<VR128, "printqwordmem", X86Mem64_RC128Operand, 64>; 101def vx128mem : X86VMemOperand<VR128, "printxmmwordmem", X86Mem128_RC128Operand, 128>; 102def vx256mem : X86VMemOperand<VR128, "printymmwordmem", X86Mem256_RC128Operand, 256>; 103def vy128mem : X86VMemOperand<VR256, "printxmmwordmem", X86Mem128_RC256Operand, 128>; 104def vy256mem : X86VMemOperand<VR256, "printymmwordmem", X86Mem256_RC256Operand, 256>; 105 106def vx64xmem : X86VMemOperand<VR128X, "printqwordmem", X86Mem64_RC128XOperand, 64>; 107def vx128xmem : X86VMemOperand<VR128X, "printxmmwordmem", X86Mem128_RC128XOperand, 128>; 108def vx256xmem : X86VMemOperand<VR128X, "printymmwordmem", X86Mem256_RC128XOperand, 256>; 109def vy128xmem : X86VMemOperand<VR256X, "printxmmwordmem", X86Mem128_RC256XOperand, 128>; 110def vy256xmem : X86VMemOperand<VR256X, "printymmwordmem", X86Mem256_RC256XOperand, 256>; 111def vy512xmem : X86VMemOperand<VR256X, "printzmmwordmem", X86Mem512_RC256XOperand, 512>; 112def vz256mem : X86VMemOperand<VR512, "printymmwordmem", X86Mem256_RC512Operand, 256>; 113def vz512mem : X86VMemOperand<VR512, "printzmmwordmem", X86Mem512_RC512Operand, 512>; 114 115def shmem : X86MemOperand<"printwordmem", X86Mem16AsmOperand>; 116def ssmem : X86MemOperand<"printdwordmem", X86Mem32AsmOperand>; 117def sdmem : X86MemOperand<"printqwordmem", X86Mem64AsmOperand>; 118 119// A version of i8mem for use on x86-64 and x32 that uses a NOREX GPR instead 120// of a plain GPR, so that it doesn't potentially require a REX prefix. 121def ptr_rc_norex : PointerLikeRegClass<2>; 122def ptr_rc_norex_nosp : PointerLikeRegClass<3>; 123 124def i8mem_NOREX : X86MemOperand<"printbytemem", X86Mem8AsmOperand, 8> { 125 let MIOperandInfo = (ops ptr_rc_norex, i8imm, ptr_rc_norex_nosp, i32imm, 126 SEGMENT_REG); 127} 128 129// GPRs available for tailcall. 130// It represents GR32_TC, GR64_TC or GR64_TCW64. 131def ptr_rc_tailcall : PointerLikeRegClass<4>; 132 133// Special i32mem for addresses of load folding tail calls. These are not 134// allowed to use callee-saved registers since they must be scheduled 135// after callee-saved register are popped. 136def i32mem_TC : X86MemOperand<"printdwordmem", X86Mem32AsmOperand, 32> { 137 let MIOperandInfo = (ops ptr_rc_tailcall, i8imm, ptr_rc_tailcall, 138 i32imm, SEGMENT_REG); 139} 140 141// Special i64mem for addresses of load folding tail calls. These are not 142// allowed to use callee-saved registers since they must be scheduled 143// after callee-saved register are popped. 144def i64mem_TC : X86MemOperand<"printqwordmem", X86Mem64AsmOperand, 64> { 145 let MIOperandInfo = (ops ptr_rc_tailcall, i8imm, 146 ptr_rc_tailcall, i32imm, SEGMENT_REG); 147} 148 149// Special parser to detect 16-bit mode to select 16-bit displacement. 150def X86AbsMem16AsmOperand : AsmOperandClass { 151 let Name = "AbsMem16"; 152 let RenderMethod = "addAbsMemOperands"; 153 let SuperClasses = [X86AbsMemAsmOperand]; 154} 155 156// Branch targets print as pc-relative values. 157class BranchTargetOperand<ValueType ty> : Operand<ty> { 158 let OperandType = "OPERAND_PCREL"; 159 let PrintMethod = "printPCRelImm"; 160 let ParserMatchClass = X86AbsMemAsmOperand; 161} 162 163def i32imm_brtarget : BranchTargetOperand<i32>; 164def i16imm_brtarget : BranchTargetOperand<i16>; 165 166// 64-bits but only 32 bits are significant, and those bits are treated as being 167// pc relative. 168def i64i32imm_brtarget : BranchTargetOperand<i64>; 169 170def brtarget : BranchTargetOperand<OtherVT>; 171def brtarget8 : BranchTargetOperand<OtherVT>; 172def brtarget16 : BranchTargetOperand<OtherVT> { 173 let ParserMatchClass = X86AbsMem16AsmOperand; 174} 175def brtarget32 : BranchTargetOperand<OtherVT>; 176 177let RenderMethod = "addSrcIdxOperands" in { 178 def X86SrcIdx8Operand : AsmOperandClass { 179 let Name = "SrcIdx8"; 180 let SuperClasses = [X86Mem8AsmOperand]; 181 } 182 def X86SrcIdx16Operand : AsmOperandClass { 183 let Name = "SrcIdx16"; 184 let SuperClasses = [X86Mem16AsmOperand]; 185 } 186 def X86SrcIdx32Operand : AsmOperandClass { 187 let Name = "SrcIdx32"; 188 let SuperClasses = [X86Mem32AsmOperand]; 189 } 190 def X86SrcIdx64Operand : AsmOperandClass { 191 let Name = "SrcIdx64"; 192 let SuperClasses = [X86Mem64AsmOperand]; 193 } 194} // RenderMethod = "addSrcIdxOperands" 195 196let RenderMethod = "addDstIdxOperands" in { 197 def X86DstIdx8Operand : AsmOperandClass { 198 let Name = "DstIdx8"; 199 let SuperClasses = [X86Mem8AsmOperand]; 200 } 201 def X86DstIdx16Operand : AsmOperandClass { 202 let Name = "DstIdx16"; 203 let SuperClasses = [X86Mem16AsmOperand]; 204 } 205 def X86DstIdx32Operand : AsmOperandClass { 206 let Name = "DstIdx32"; 207 let SuperClasses = [X86Mem32AsmOperand]; 208 } 209 def X86DstIdx64Operand : AsmOperandClass { 210 let Name = "DstIdx64"; 211 let SuperClasses = [X86Mem64AsmOperand]; 212 } 213} // RenderMethod = "addDstIdxOperands" 214 215let RenderMethod = "addMemOffsOperands" in { 216 def X86MemOffs16_8AsmOperand : AsmOperandClass { 217 let Name = "MemOffs16_8"; 218 let SuperClasses = [X86Mem8AsmOperand]; 219 } 220 def X86MemOffs16_16AsmOperand : AsmOperandClass { 221 let Name = "MemOffs16_16"; 222 let SuperClasses = [X86Mem16AsmOperand]; 223 } 224 def X86MemOffs16_32AsmOperand : AsmOperandClass { 225 let Name = "MemOffs16_32"; 226 let SuperClasses = [X86Mem32AsmOperand]; 227 } 228 def X86MemOffs32_8AsmOperand : AsmOperandClass { 229 let Name = "MemOffs32_8"; 230 let SuperClasses = [X86Mem8AsmOperand]; 231 } 232 def X86MemOffs32_16AsmOperand : AsmOperandClass { 233 let Name = "MemOffs32_16"; 234 let SuperClasses = [X86Mem16AsmOperand]; 235 } 236 def X86MemOffs32_32AsmOperand : AsmOperandClass { 237 let Name = "MemOffs32_32"; 238 let SuperClasses = [X86Mem32AsmOperand]; 239 } 240 def X86MemOffs32_64AsmOperand : AsmOperandClass { 241 let Name = "MemOffs32_64"; 242 let SuperClasses = [X86Mem64AsmOperand]; 243 } 244 def X86MemOffs64_8AsmOperand : AsmOperandClass { 245 let Name = "MemOffs64_8"; 246 let SuperClasses = [X86Mem8AsmOperand]; 247 } 248 def X86MemOffs64_16AsmOperand : AsmOperandClass { 249 let Name = "MemOffs64_16"; 250 let SuperClasses = [X86Mem16AsmOperand]; 251 } 252 def X86MemOffs64_32AsmOperand : AsmOperandClass { 253 let Name = "MemOffs64_32"; 254 let SuperClasses = [X86Mem32AsmOperand]; 255 } 256 def X86MemOffs64_64AsmOperand : AsmOperandClass { 257 let Name = "MemOffs64_64"; 258 let SuperClasses = [X86Mem64AsmOperand]; 259 } 260} // RenderMethod = "addMemOffsOperands" 261 262class X86SrcIdxOperand<string printMethod, AsmOperandClass parserMatchClass> 263 : X86MemOperand<printMethod, parserMatchClass> { 264 let MIOperandInfo = (ops ptr_rc, SEGMENT_REG); 265} 266 267class X86DstIdxOperand<string printMethod, AsmOperandClass parserMatchClass> 268 : X86MemOperand<printMethod, parserMatchClass> { 269 let MIOperandInfo = (ops ptr_rc); 270} 271 272def srcidx8 : X86SrcIdxOperand<"printSrcIdx8", X86SrcIdx8Operand>; 273def srcidx16 : X86SrcIdxOperand<"printSrcIdx16", X86SrcIdx16Operand>; 274def srcidx32 : X86SrcIdxOperand<"printSrcIdx32", X86SrcIdx32Operand>; 275def srcidx64 : X86SrcIdxOperand<"printSrcIdx64", X86SrcIdx64Operand>; 276def dstidx8 : X86DstIdxOperand<"printDstIdx8", X86DstIdx8Operand>; 277def dstidx16 : X86DstIdxOperand<"printDstIdx16", X86DstIdx16Operand>; 278def dstidx32 : X86DstIdxOperand<"printDstIdx32", X86DstIdx32Operand>; 279def dstidx64 : X86DstIdxOperand<"printDstIdx64", X86DstIdx64Operand>; 280 281class X86MemOffsOperand<Operand immOperand, string printMethod, 282 AsmOperandClass parserMatchClass> 283 : X86MemOperand<printMethod, parserMatchClass> { 284 let MIOperandInfo = (ops immOperand, SEGMENT_REG); 285} 286 287def offset16_8 : X86MemOffsOperand<i16imm, "printMemOffs8", 288 X86MemOffs16_8AsmOperand>; 289def offset16_16 : X86MemOffsOperand<i16imm, "printMemOffs16", 290 X86MemOffs16_16AsmOperand>; 291def offset16_32 : X86MemOffsOperand<i16imm, "printMemOffs32", 292 X86MemOffs16_32AsmOperand>; 293def offset32_8 : X86MemOffsOperand<i32imm, "printMemOffs8", 294 X86MemOffs32_8AsmOperand>; 295def offset32_16 : X86MemOffsOperand<i32imm, "printMemOffs16", 296 X86MemOffs32_16AsmOperand>; 297def offset32_32 : X86MemOffsOperand<i32imm, "printMemOffs32", 298 X86MemOffs32_32AsmOperand>; 299def offset32_64 : X86MemOffsOperand<i32imm, "printMemOffs64", 300 X86MemOffs32_64AsmOperand>; 301def offset64_8 : X86MemOffsOperand<i64imm, "printMemOffs8", 302 X86MemOffs64_8AsmOperand>; 303def offset64_16 : X86MemOffsOperand<i64imm, "printMemOffs16", 304 X86MemOffs64_16AsmOperand>; 305def offset64_32 : X86MemOffsOperand<i64imm, "printMemOffs32", 306 X86MemOffs64_32AsmOperand>; 307def offset64_64 : X86MemOffsOperand<i64imm, "printMemOffs64", 308 X86MemOffs64_64AsmOperand>; 309 310def ccode : Operand<i8> { 311 let PrintMethod = "printCondCode"; 312 let OperandNamespace = "X86"; 313 let OperandType = "OPERAND_COND_CODE"; 314} 315 316class ImmSExtAsmOperandClass : AsmOperandClass { 317 let SuperClasses = [ImmAsmOperand]; 318 let RenderMethod = "addImmOperands"; 319} 320 321def X86GR32orGR64AsmOperand : AsmOperandClass { 322 let Name = "GR32orGR64"; 323} 324def GR32orGR64 : RegisterOperand<GR32> { 325 let ParserMatchClass = X86GR32orGR64AsmOperand; 326} 327 328def X86GR16orGR32orGR64AsmOperand : AsmOperandClass { 329 let Name = "GR16orGR32orGR64"; 330} 331def GR16orGR32orGR64 : RegisterOperand<GR16> { 332 let ParserMatchClass = X86GR16orGR32orGR64AsmOperand; 333} 334 335def AVX512RCOperand : AsmOperandClass { 336 let Name = "AVX512RC"; 337} 338def AVX512RC : Operand<i32> { 339 let PrintMethod = "printRoundingControl"; 340 let OperandNamespace = "X86"; 341 let OperandType = "OPERAND_ROUNDING_CONTROL"; 342 let ParserMatchClass = AVX512RCOperand; 343} 344 345// Sign-extended immediate classes. We don't need to define the full lattice 346// here because there is no instruction with an ambiguity between ImmSExti64i32 347// and ImmSExti32i8. 348// 349// The strange ranges come from the fact that the assembler always works with 350// 64-bit immediates, but for a 16-bit target value we want to accept both "-1" 351// (which will be a -1ULL), and "0xFF" (-1 in 16-bits). 352 353// [0, 0x7FFFFFFF] | 354// [0xFFFFFFFF80000000, 0xFFFFFFFFFFFFFFFF] 355def ImmSExti64i32AsmOperand : ImmSExtAsmOperandClass { 356 let Name = "ImmSExti64i32"; 357} 358 359// [0, 0x0000007F] | [0x000000000000FF80, 0x000000000000FFFF] | 360// [0xFFFFFFFFFFFFFF80, 0xFFFFFFFFFFFFFFFF] 361def ImmSExti16i8AsmOperand : ImmSExtAsmOperandClass { 362 let Name = "ImmSExti16i8"; 363 let SuperClasses = [ImmSExti64i32AsmOperand]; 364} 365 366// [0, 0x0000007F] | [0x00000000FFFFFF80, 0x00000000FFFFFFFF] | 367// [0xFFFFFFFFFFFFFF80, 0xFFFFFFFFFFFFFFFF] 368def ImmSExti32i8AsmOperand : ImmSExtAsmOperandClass { 369 let Name = "ImmSExti32i8"; 370} 371 372// [0, 0x0000007F] | 373// [0xFFFFFFFFFFFFFF80, 0xFFFFFFFFFFFFFFFF] 374def ImmSExti64i8AsmOperand : ImmSExtAsmOperandClass { 375 let Name = "ImmSExti64i8"; 376 let SuperClasses = [ImmSExti16i8AsmOperand, ImmSExti32i8AsmOperand, 377 ImmSExti64i32AsmOperand]; 378} 379 380// 4-bit immediate used by some XOP instructions 381// [0, 0xF] 382def ImmUnsignedi4AsmOperand : AsmOperandClass { 383 let Name = "ImmUnsignedi4"; 384 let RenderMethod = "addImmOperands"; 385 let DiagnosticType = "InvalidImmUnsignedi4"; 386} 387 388// Unsigned immediate used by SSE/AVX instructions 389// [0, 0xFF] 390// [0xFFFFFFFFFFFFFF80, 0xFFFFFFFFFFFFFFFF] 391def ImmUnsignedi8AsmOperand : AsmOperandClass { 392 let Name = "ImmUnsignedi8"; 393 let RenderMethod = "addImmOperands"; 394} 395 396// A couple of more descriptive operand definitions. 397// 16-bits but only 8 bits are significant. 398def i16i8imm : Operand<i16> { 399 let ParserMatchClass = ImmSExti16i8AsmOperand; 400 let OperandType = "OPERAND_IMMEDIATE"; 401} 402// 32-bits but only 8 bits are significant. 403def i32i8imm : Operand<i32> { 404 let ParserMatchClass = ImmSExti32i8AsmOperand; 405 let OperandType = "OPERAND_IMMEDIATE"; 406} 407 408// 64-bits but only 32 bits are significant. 409def i64i32imm : Operand<i64> { 410 let ParserMatchClass = ImmSExti64i32AsmOperand; 411 let OperandType = "OPERAND_IMMEDIATE"; 412} 413 414// 64-bits but only 8 bits are significant. 415def i64i8imm : Operand<i64> { 416 let ParserMatchClass = ImmSExti64i8AsmOperand; 417 let OperandType = "OPERAND_IMMEDIATE"; 418} 419 420// Unsigned 4-bit immediate used by some XOP instructions. 421def u4imm : Operand<i8> { 422 let PrintMethod = "printU8Imm"; 423 let ParserMatchClass = ImmUnsignedi4AsmOperand; 424 let OperandType = "OPERAND_IMMEDIATE"; 425} 426 427def cflags : Operand<i8> { 428 let PrintMethod = "printCondFlags"; 429 let ParserMatchClass = ImmUnsignedi4AsmOperand; 430 let OperandType = "OPERAND_IMMEDIATE"; 431} 432 433// Unsigned 8-bit immediate used by SSE/AVX instructions. 434def u8imm : Operand<i8> { 435 let PrintMethod = "printU8Imm"; 436 let ParserMatchClass = ImmUnsignedi8AsmOperand; 437 let OperandType = "OPERAND_IMMEDIATE"; 438} 439 440// 16-bit immediate but only 8-bits are significant and they are unsigned. 441// Used by BT instructions. 442def i16u8imm : Operand<i16> { 443 let PrintMethod = "printU8Imm"; 444 let ParserMatchClass = ImmUnsignedi8AsmOperand; 445 let OperandType = "OPERAND_IMMEDIATE"; 446} 447 448// 32-bit immediate but only 8-bits are significant and they are unsigned. 449// Used by some SSE/AVX instructions that use intrinsics. 450def i32u8imm : Operand<i32> { 451 let PrintMethod = "printU8Imm"; 452 let ParserMatchClass = ImmUnsignedi8AsmOperand; 453 let OperandType = "OPERAND_IMMEDIATE"; 454} 455 456// 64-bit immediate but only 8-bits are significant and they are unsigned. 457// Used by BT instructions. 458def i64u8imm : Operand<i64> { 459 let PrintMethod = "printU8Imm"; 460 let ParserMatchClass = ImmUnsignedi8AsmOperand; 461 let OperandType = "OPERAND_IMMEDIATE"; 462} 463 464def lea64_32mem : Operand<i32> { 465 let PrintMethod = "printMemReference"; 466 let MIOperandInfo = (ops GR64, i8imm, GR64_NOSP, i32imm, SEGMENT_REG); 467 let ParserMatchClass = X86MemAsmOperand; 468} 469 470// Memory operands that use 64-bit pointers in both ILP32 and LP64. 471def lea64mem : Operand<i64> { 472 let PrintMethod = "printMemReference"; 473 let MIOperandInfo = (ops GR64, i8imm, GR64_NOSP, i32imm, SEGMENT_REG); 474 let ParserMatchClass = X86MemAsmOperand; 475} 476 477let RenderMethod = "addMaskPairOperands" in { 478 def VK1PairAsmOperand : AsmOperandClass { let Name = "VK1Pair"; } 479 def VK2PairAsmOperand : AsmOperandClass { let Name = "VK2Pair"; } 480 def VK4PairAsmOperand : AsmOperandClass { let Name = "VK4Pair"; } 481 def VK8PairAsmOperand : AsmOperandClass { let Name = "VK8Pair"; } 482 def VK16PairAsmOperand : AsmOperandClass { let Name = "VK16Pair"; } 483} 484 485def VK1Pair : RegisterOperand<VK1PAIR, "printVKPair"> { 486 let ParserMatchClass = VK1PairAsmOperand; 487} 488 489def VK2Pair : RegisterOperand<VK2PAIR, "printVKPair"> { 490 let ParserMatchClass = VK2PairAsmOperand; 491} 492 493def VK4Pair : RegisterOperand<VK4PAIR, "printVKPair"> { 494 let ParserMatchClass = VK4PairAsmOperand; 495} 496 497def VK8Pair : RegisterOperand<VK8PAIR, "printVKPair"> { 498 let ParserMatchClass = VK8PairAsmOperand; 499} 500 501def VK16Pair : RegisterOperand<VK16PAIR, "printVKPair"> { 502 let ParserMatchClass = VK16PairAsmOperand; 503} 504