1 //===-- X86InstrFormats.td - X86 Instruction Formats -------*- tablegen -*-===//
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
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
10 // X86 Instruction Format Definitions.
13 // Format specifies the encoding used by the instruction. This is part of the
14 // ad-hoc solution used to emit machine instruction encodings by our machine
16 class Format<bits<7> val> {
20 def Pseudo : Format<0>;
21 def RawFrm : Format<1>;
22 def AddRegFrm : Format<2>;
23 def RawFrmMemOffs : Format<3>;
24 def RawFrmSrc : Format<4>;
25 def RawFrmDst : Format<5>;
26 def RawFrmDstSrc : Format<6>;
27 def RawFrmImm8 : Format<7>;
28 def RawFrmImm16 : Format<8>;
29 def AddCCFrm : Format<9>;
30 def PrefixByte : Format<10>;
31 def MRMr0 : Format<21>;
32 def MRMSrcMemFSIB : Format<22>;
33 def MRMDestMemFSIB : Format<23>;
34 def MRMDestMem : Format<24>;
35 def MRMSrcMem : Format<25>;
36 def MRMSrcMem4VOp3 : Format<26>;
37 def MRMSrcMemOp4 : Format<27>;
38 def MRMSrcMemCC : Format<28>;
39 def MRMXmCC: Format<30>;
40 def MRMXm : Format<31>;
41 def MRM0m : Format<32>; def MRM1m : Format<33>; def MRM2m : Format<34>;
42 def MRM3m : Format<35>; def MRM4m : Format<36>; def MRM5m : Format<37>;
43 def MRM6m : Format<38>; def MRM7m : Format<39>;
44 def MRMDestReg : Format<40>;
45 def MRMSrcReg : Format<41>;
46 def MRMSrcReg4VOp3 : Format<42>;
47 def MRMSrcRegOp4 : Format<43>;
48 def MRMSrcRegCC : Format<44>;
49 def MRMXrCC: Format<46>;
50 def MRMXr : Format<47>;
51 def MRM0r : Format<48>; def MRM1r : Format<49>; def MRM2r : Format<50>;
52 def MRM3r : Format<51>; def MRM4r : Format<52>; def MRM5r : Format<53>;
53 def MRM6r : Format<54>; def MRM7r : Format<55>;
54 def MRM0X : Format<56>; def MRM1X : Format<57>; def MRM2X : Format<58>;
55 def MRM3X : Format<59>; def MRM4X : Format<60>; def MRM5X : Format<61>;
56 def MRM6X : Format<62>; def MRM7X : Format<63>;
57 def MRM_C0 : Format<64>; def MRM_C1 : Format<65>; def MRM_C2 : Format<66>;
58 def MRM_C3 : Format<67>; def MRM_C4 : Format<68>; def MRM_C5 : Format<69>;
59 def MRM_C6 : Format<70>; def MRM_C7 : Format<71>; def MRM_C8 : Format<72>;
60 def MRM_C9 : Format<73>; def MRM_CA : Format<74>; def MRM_CB : Format<75>;
61 def MRM_CC : Format<76>; def MRM_CD : Format<77>; def MRM_CE : Format<78>;
62 def MRM_CF : Format<79>; def MRM_D0 : Format<80>; def MRM_D1 : Format<81>;
63 def MRM_D2 : Format<82>; def MRM_D3 : Format<83>; def MRM_D4 : Format<84>;
64 def MRM_D5 : Format<85>; def MRM_D6 : Format<86>; def MRM_D7 : Format<87>;
65 def MRM_D8 : Format<88>; def MRM_D9 : Format<89>; def MRM_DA : Format<90>;
66 def MRM_DB : Format<91>; def MRM_DC : Format<92>; def MRM_DD : Format<93>;
67 def MRM_DE : Format<94>; def MRM_DF : Format<95>; def MRM_E0 : Format<96>;
68 def MRM_E1 : Format<97>; def MRM_E2 : Format<98>; def MRM_E3 : Format<99>;
69 def MRM_E4 : Format<100>; def MRM_E5 : Format<101>; def MRM_E6 : Format<102>;
70 def MRM_E7 : Format<103>; def MRM_E8 : Format<104>; def MRM_E9 : Format<105>;
71 def MRM_EA : Format<106>; def MRM_EB : Format<107>; def MRM_EC : Format<108>;
72 def MRM_ED : Format<109>; def MRM_EE : Format<110>; def MRM_EF : Format<111>;
73 def MRM_F0 : Format<112>; def MRM_F1 : Format<113>; def MRM_F2 : Format<114>;
74 def MRM_F3 : Format<115>; def MRM_F4 : Format<116>; def MRM_F5 : Format<117>;
75 def MRM_F6 : Format<118>; def MRM_F7 : Format<119>; def MRM_F8 : Format<120>;
76 def MRM_F9 : Format<121>; def MRM_FA : Format<122>; def MRM_FB : Format<123>;
77 def MRM_FC : Format<124>; def MRM_FD : Format<125>; def MRM_FE : Format<126>;
78 def MRM_FF : Format<127>;
80 // ImmType - This specifies the immediate type used by an instruction. This is
81 // part of the ad-hoc solution used to emit machine instruction encodings by our
82 // machine code emitter.
83 class ImmType<bits<4> val> {
86 def NoImm : ImmType<0>;
87 def Imm8 : ImmType<1>;
88 def Imm8PCRel : ImmType<2>;
89 def Imm8Reg : ImmType<3>; // Register encoded in [7:4].
90 def Imm16 : ImmType<4>;
91 def Imm16PCRel : ImmType<5>;
92 def Imm32 : ImmType<6>;
93 def Imm32PCRel : ImmType<7>;
94 def Imm32S : ImmType<8>;
95 def Imm64 : ImmType<9>;
97 // FPFormat - This specifies what form this FP instruction has. This is used by
98 // the Floating-Point stackifier pass.
99 class FPFormat<bits<3> val> {
102 def NotFP : FPFormat<0>;
103 def ZeroArgFP : FPFormat<1>;
104 def OneArgFP : FPFormat<2>;
105 def OneArgFPRW : FPFormat<3>;
106 def TwoArgFP : FPFormat<4>;
107 def CompareFP : FPFormat<5>;
108 def CondMovFP : FPFormat<6>;
109 def SpecialFP : FPFormat<7>;
111 // Class specifying the SSE execution domain, used by the SSEDomainFix pass.
112 // Keep in sync with tables in X86InstrInfo.cpp.
113 class Domain<bits<2> val> {
116 def GenericDomain : Domain<0>;
117 def SSEPackedSingle : Domain<1>;
118 def SSEPackedDouble : Domain<2>;
119 def SSEPackedInt : Domain<3>;
121 // Class specifying the vector form of the decompressed
122 // displacement of 8-bit.
123 class CD8VForm<bits<3> val> {
126 def CD8VF : CD8VForm<0>; // v := VL
127 def CD8VH : CD8VForm<1>; // v := VL/2
128 def CD8VQ : CD8VForm<2>; // v := VL/4
129 def CD8VO : CD8VForm<3>; // v := VL/8
130 // The tuple (subvector) forms.
131 def CD8VT1 : CD8VForm<4>; // v := 1
132 def CD8VT2 : CD8VForm<5>; // v := 2
133 def CD8VT4 : CD8VForm<6>; // v := 4
134 def CD8VT8 : CD8VForm<7>; // v := 8
136 // Class specifying the prefix used an opcode extension.
137 class Prefix<bits<3> val> {
140 def NoPrfx : Prefix<0>;
144 def PS : Prefix<4>; // Similar to NoPrfx, but disassembler uses this to know
145 // that other instructions with this opcode use PD/XS/XD
146 // and if any of those is not supported they shouldn't
147 // decode to this instruction. e.g. ANDSS/ANDSD don't
148 // exist, but the 0xf2/0xf3 encoding shouldn't
151 // Class specifying the opcode map.
152 class Map<bits<4> val> {
162 def ThreeDNow : Map<7>;
166 // Class specifying the encoding
167 class Encoding<bits<2> val> {
170 def EncNormal : Encoding<0>;
171 def EncVEX : Encoding<1>;
172 def EncXOP : Encoding<2>;
173 def EncEVEX : Encoding<3>;
175 // Operand size for encodings that change based on mode.
176 class OperandSize<bits<2> val> {
179 def OpSizeFixed : OperandSize<0>; // Never needs a 0x66 prefix.
180 def OpSize16 : OperandSize<1>; // Needs 0x66 prefix in 32-bit mode.
181 def OpSize32 : OperandSize<2>; // Needs 0x66 prefix in 16-bit mode.
183 // Address size for encodings that change based on mode.
184 class AddressSize<bits<2> val> {
187 def AdSizeX : AddressSize<0>; // Address size determined using addr operand.
188 def AdSize16 : AddressSize<1>; // Encodes a 16-bit address.
189 def AdSize32 : AddressSize<2>; // Encodes a 32-bit address.
190 def AdSize64 : AddressSize<3>; // Encodes a 64-bit address.
192 // Prefix byte classes which are used to indicate to the ad-hoc machine code
193 // emitter that various prefix bytes are required.
194 class OpSize16 { OperandSize OpSize = OpSize16; }
195 class OpSize32 { OperandSize OpSize = OpSize32; }
196 class AdSize16 { AddressSize AdSize = AdSize16; }
197 class AdSize32 { AddressSize AdSize = AdSize32; }
198 class AdSize64 { AddressSize AdSize = AdSize64; }
199 class REX_W { bit hasREX_WPrefix = 1; }
200 class LOCK { bit hasLockPrefix = 1; }
201 class REP { bit hasREPPrefix = 1; }
202 class TB { Map OpMap = TB; }
203 class T8 { Map OpMap = T8; }
204 class TA { Map OpMap = TA; }
205 class XOP8 { Map OpMap = XOP8; Prefix OpPrefix = PS; }
206 class XOP9 { Map OpMap = XOP9; Prefix OpPrefix = PS; }
207 class XOPA { Map OpMap = XOPA; Prefix OpPrefix = PS; }
208 class ThreeDNow { Map OpMap = ThreeDNow; }
209 class T_MAP5 { Map OpMap = T_MAP5; }
210 class T_MAP5PS : T_MAP5 { Prefix OpPrefix = PS; } // none
211 class T_MAP5PD : T_MAP5 { Prefix OpPrefix = PD; } // 0x66
212 class T_MAP5XS : T_MAP5 { Prefix OpPrefix = XS; } // 0xF3
213 class T_MAP5XD : T_MAP5 { Prefix OpPrefix = XD; } // 0xF2
214 class T_MAP6 { Map OpMap = T_MAP6; }
215 class T_MAP6PS : T_MAP6 { Prefix OpPrefix = PS; }
216 class T_MAP6PD : T_MAP6 { Prefix OpPrefix = PD; }
217 class T_MAP6XS : T_MAP6 { Prefix OpPrefix = XS; }
218 class T_MAP6XD : T_MAP6 { Prefix OpPrefix = XD; }
219 class OBXS { Prefix OpPrefix = XS; }
220 class PS : TB { Prefix OpPrefix = PS; }
221 class PD : TB { Prefix OpPrefix = PD; }
222 class XD : TB { Prefix OpPrefix = XD; }
223 class XS : TB { Prefix OpPrefix = XS; }
224 class T8PS : T8 { Prefix OpPrefix = PS; }
225 class T8PD : T8 { Prefix OpPrefix = PD; }
226 class T8XD : T8 { Prefix OpPrefix = XD; }
227 class T8XS : T8 { Prefix OpPrefix = XS; }
228 class TAPS : TA { Prefix OpPrefix = PS; }
229 class TAPD : TA { Prefix OpPrefix = PD; }
230 class TAXD : TA { Prefix OpPrefix = XD; }
231 class TAXS : TA { Prefix OpPrefix = XS; }
232 class VEX { Encoding OpEnc = EncVEX; }
233 class VEX_W { bit HasVEX_W = 1; }
234 class VEX_WIG { bit IgnoresVEX_W = 1; }
235 // Special version of VEX_W that can be changed to VEX.W==0 for EVEX2VEX.
236 class VEX_W1X { bit HasVEX_W = 1; bit EVEX_W1_VEX_W0 = 1; }
237 class VEX_4V : VEX { bit hasVEX_4V = 1; }
238 class VEX_L { bit hasVEX_L = 1; }
239 class VEX_LIG { bit ignoresVEX_L = 1; }
240 class EVEX { Encoding OpEnc = EncEVEX; }
241 class EVEX_4V : EVEX { bit hasVEX_4V = 1; }
242 class EVEX_K { bit hasEVEX_K = 1; }
243 class EVEX_KZ : EVEX_K { bit hasEVEX_Z = 1; }
244 class EVEX_B { bit hasEVEX_B = 1; }
245 class EVEX_RC { bit hasEVEX_RC = 1; }
246 class EVEX_V512 { bit hasEVEX_L2 = 1; bit hasVEX_L = 0; }
247 class EVEX_V256 { bit hasEVEX_L2 = 0; bit hasVEX_L = 1; }
248 class EVEX_V128 { bit hasEVEX_L2 = 0; bit hasVEX_L = 0; }
249 class NOTRACK { bit hasNoTrackPrefix = 1; }
250 class SIMD_EXC { list<Register> Uses = [MXCSR]; bit mayRaiseFPException = 1; }
252 // Specify AVX512 8-bit compressed displacement encoding based on the vector
253 // element size in bits (8, 16, 32, 64) and the CDisp8 form.
254 class EVEX_CD8<int esize, CD8VForm form> {
255 int CD8_EltSize = !srl(esize, 3);
256 bits<3> CD8_Form = form.Value;
259 class XOP { Encoding OpEnc = EncXOP; }
260 class XOP_4V : XOP { bit hasVEX_4V = 1; }
262 // Specify the alternative register form instruction to replace the current
263 // instruction in case it was picked during generation of memory folding tables
264 class FoldGenData<string _RegisterForm> {
265 string FoldGenRegForm = _RegisterForm;
268 // Provide a specific instruction to be used by the EVEX2VEX conversion.
269 class EVEX2VEXOverride<string VEXInstrName> {
270 string EVEX2VEXOverride = VEXInstrName;
273 // Mark the instruction as "illegal to memory fold/unfold"
274 class NotMemoryFoldable { bit isMemoryFoldable = 0; }
276 // Prevent EVEX->VEX conversion from considering this instruction.
277 class NotEVEX2VEXConvertible { bit notEVEX2VEXConvertible = 1; }
279 // Force the instruction to use VEX encoding.
280 class ExplicitVEXPrefix { bit ExplicitVEXPrefix = 1; }
282 class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
283 string AsmStr, Domain d = GenericDomain>
285 let Namespace = "X86";
287 bits<8> Opcode = opcod;
289 bits<7> FormBits = Form.Value;
292 dag OutOperandList = outs;
293 dag InOperandList = ins;
294 string AsmString = AsmStr;
296 // If this is a pseudo instruction, mark it isCodeGenOnly.
297 let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
300 // Attributes specific to X86 instructions...
302 bit ForceDisassemble = 0; // Force instruction to disassemble even though it's
303 // isCodeGenonly. Needed to hide an ambiguous
304 // AsmString from the parser, but still disassemble.
306 OperandSize OpSize = OpSizeFixed; // Does this instruction's encoding change
307 // based on operand size of the mode?
308 bits<2> OpSizeBits = OpSize.Value;
309 AddressSize AdSize = AdSizeX; // Does this instruction's encoding change
310 // based on address size of the mode?
311 bits<2> AdSizeBits = AdSize.Value;
313 Prefix OpPrefix = NoPrfx; // Which prefix byte does this inst have?
314 bits<3> OpPrefixBits = OpPrefix.Value;
315 Map OpMap = OB; // Which opcode map does this inst have?
316 bits<4> OpMapBits = OpMap.Value;
317 bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix?
318 FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
319 bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
320 Domain ExeDomain = d;
321 bit hasREPPrefix = 0; // Does this inst have a REP prefix?
322 Encoding OpEnc = EncNormal; // Encoding used by this instruction
323 bits<2> OpEncBits = OpEnc.Value;
324 bit HasVEX_W = 0; // Does this inst set the VEX_W field?
325 bit IgnoresVEX_W = 0; // Does this inst ignore VEX_W field?
326 bit EVEX_W1_VEX_W0 = 0; // This EVEX inst with VEX.W==1 can become a VEX
327 // instruction with VEX.W == 0.
328 bit hasVEX_4V = 0; // Does this inst require the VEX.VVVV field?
329 bit hasVEX_L = 0; // Does this inst use large (256-bit) registers?
330 bit ignoresVEX_L = 0; // Does this instruction ignore the L-bit
331 bit hasEVEX_K = 0; // Does this inst require masking?
332 bit hasEVEX_Z = 0; // Does this inst set the EVEX_Z field?
333 bit hasEVEX_L2 = 0; // Does this inst set the EVEX_L2 field?
334 bit hasEVEX_B = 0; // Does this inst set the EVEX_B field?
335 bits<3> CD8_Form = 0; // Compressed disp8 form - vector-width.
336 // Declare it int rather than bits<4> so that all bits are defined when
337 // assigning to bits<7>.
338 int CD8_EltSize = 0; // Compressed disp8 form - element-size in bytes.
339 bit hasEVEX_RC = 0; // Explicitly specified rounding control in FP instruction.
340 bit hasNoTrackPrefix = 0; // Does this inst has 0x3E (NoTrack) prefix?
342 // Vector size in bytes.
343 bits<7> VectSize = !if(hasEVEX_L2, 64, !if(hasVEX_L, 32, 16));
345 // The scaling factor for AVX512's compressed displacement is either
346 // - the size of a power-of-two number of elements or
347 // - the size of a single element for broadcasts or
348 // - the total vector size divided by a power-of-two number.
349 // Possible values are: 0 (non-AVX512 inst), 1, 2, 4, 8, 16, 32 and 64.
350 bits<7> CD8_Scale = !if (!eq (OpEnc.Value, EncEVEX.Value),
352 !shl(CD8_EltSize, CD8_Form{1-0}),
355 !srl(VectSize, CD8_Form{1-0}))), 0);
357 // Used in the memory folding generation (TableGen backend) to point to an alternative
358 // instruction to replace the current one in case it got picked during generation.
359 string FoldGenRegForm = ?;
361 // Used to prevent an explicit EVEX2VEX override for this instruction.
362 string EVEX2VEXOverride = ?;
364 bit isMemoryFoldable = 1; // Is it allowed to memory fold/unfold this instruction?
365 bit notEVEX2VEXConvertible = 0; // Prevent EVEX->VEX conversion.
366 bit ExplicitVEXPrefix = 0; // Force the instruction to use VEX encoding.
367 // Force to check predicate before compress EVEX to VEX encoding.
368 bit checkVEXPredicate = 0;
369 // TSFlags layout should be kept in sync with X86BaseInfo.h.
370 let TSFlags{6-0} = FormBits;
371 let TSFlags{8-7} = OpSizeBits;
372 let TSFlags{10-9} = AdSizeBits;
373 // No need for 3rd bit, we don't need to distinguish NoPrfx from PS.
374 let TSFlags{12-11} = OpPrefixBits{1-0};
375 let TSFlags{16-13} = OpMapBits;
376 let TSFlags{17} = hasREX_WPrefix;
377 let TSFlags{21-18} = ImmT.Value;
378 let TSFlags{24-22} = FPForm.Value;
379 let TSFlags{25} = hasLockPrefix;
380 let TSFlags{26} = hasREPPrefix;
381 let TSFlags{28-27} = ExeDomain.Value;
382 let TSFlags{30-29} = OpEncBits;
383 let TSFlags{38-31} = Opcode;
384 // Currently no need for second bit in TSFlags - W Ignore is equivalent to 0.
385 let TSFlags{39} = HasVEX_W;
386 let TSFlags{40} = hasVEX_4V;
387 let TSFlags{41} = hasVEX_L;
388 let TSFlags{42} = hasEVEX_K;
389 let TSFlags{43} = hasEVEX_Z;
390 let TSFlags{44} = hasEVEX_L2;
391 let TSFlags{45} = hasEVEX_B;
392 // If we run out of TSFlags bits, it's possible to encode this in 3 bits.
393 let TSFlags{52-46} = CD8_Scale;
394 let TSFlags{53} = hasEVEX_RC;
395 let TSFlags{54} = hasNoTrackPrefix;
396 let TSFlags{55} = ExplicitVEXPrefix;
399 class PseudoI<dag oops, dag iops, list<dag> pattern>
400 : X86Inst<0, Pseudo, NoImm, oops, iops, ""> {
401 let Pattern = pattern;
404 class I<bits<8> o, Format f, dag outs, dag ins, string asm,
405 list<dag> pattern, Domain d = GenericDomain>
406 : X86Inst<o, f, NoImm, outs, ins, asm, d> {
407 let Pattern = pattern;
410 class Ii8<bits<8> o, Format f, dag outs, dag ins, string asm,
411 list<dag> pattern, Domain d = GenericDomain>
412 : X86Inst<o, f, Imm8, outs, ins, asm, d> {
413 let Pattern = pattern;
416 class Ii8Reg<bits<8> o, Format f, dag outs, dag ins, string asm,
417 list<dag> pattern, Domain d = GenericDomain>
418 : X86Inst<o, f, Imm8Reg, outs, ins, asm, d> {
419 let Pattern = pattern;
422 class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
424 : X86Inst<o, f, Imm8PCRel, outs, ins, asm> {
425 let Pattern = pattern;
428 class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
430 : X86Inst<o, f, Imm16, outs, ins, asm> {
431 let Pattern = pattern;
434 class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
436 : X86Inst<o, f, Imm32, outs, ins, asm> {
437 let Pattern = pattern;
440 class Ii32S<bits<8> o, Format f, dag outs, dag ins, string asm,
442 : X86Inst<o, f, Imm32S, outs, ins, asm> {
443 let Pattern = pattern;
447 class Ii64<bits<8> o, Format f, dag outs, dag ins, string asm,
449 : X86Inst<o, f, Imm64, outs, ins, asm> {
450 let Pattern = pattern;
454 class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
456 : X86Inst<o, f, Imm16PCRel, outs, ins, asm> {
457 let Pattern = pattern;
461 class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
463 : X86Inst<o, f, Imm32PCRel, outs, ins, asm> {
464 let Pattern = pattern;
468 // FPStack Instruction Templates:
469 // FPI - Floating Point Instruction template.
470 class FPI<bits<8> o, Format F, dag outs, dag ins, string asm>
471 : I<o, F, outs, ins, asm, []> {
475 // FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
476 class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern>
477 : PseudoI<outs, ins, pattern> {
482 // Templates for instructions that use a 16- or 32-bit segmented address as
483 // their only operand: lcall (FAR CALL) and ljmp (FAR JMP)
485 // Iseg16 - 16-bit segment selector, 16-bit offset
486 // Iseg32 - 16-bit segment selector, 32-bit offset
488 class Iseg16 <bits<8> o, Format f, dag outs, dag ins, string asm,
490 : X86Inst<o, f, Imm16, outs, ins, asm> {
491 let Pattern = pattern;
495 class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
497 : X86Inst<o, f, Imm32, outs, ins, asm> {
498 let Pattern = pattern;
502 // SI - SSE 1 & 2 scalar instructions
503 class SI<bits<8> o, Format F, dag outs, dag ins, string asm,
504 list<dag> pattern, Domain d = GenericDomain>
505 : I<o, F, outs, ins, asm, pattern, d> {
506 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
507 !if(!eq(OpEnc.Value, EncVEX.Value), [UseAVX],
508 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
509 !if(!eq(OpPrefix.Value, XD.Value), [UseSSE2],
510 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
513 // AVX instructions have a 'v' prefix in the mnemonic
514 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
515 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
519 // SI - SSE 1 & 2 scalar intrinsics - vex form available on AVX512
520 class SI_Int<bits<8> o, Format F, dag outs, dag ins, string asm,
521 list<dag> pattern, Domain d = GenericDomain>
522 : I<o, F, outs, ins, asm, pattern, d> {
523 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
524 !if(!eq(OpEnc.Value, EncVEX.Value), [UseAVX],
525 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
526 !if(!eq(OpPrefix.Value, XD.Value), [UseSSE2],
527 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
530 // AVX instructions have a 'v' prefix in the mnemonic
531 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
532 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
535 // SIi8 - SSE 1 & 2 scalar instructions - vex form available on AVX512
536 class SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
538 : Ii8<o, F, outs, ins, asm, pattern> {
539 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
540 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
541 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
544 // AVX instructions have a 'v' prefix in the mnemonic
545 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
546 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
550 // PI - SSE 1 & 2 packed instructions
551 class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
553 : I<o, F, outs, ins, asm, pattern, d> {
554 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
555 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
556 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
559 // AVX instructions have a 'v' prefix in the mnemonic
560 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
561 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
565 // MMXPI - SSE 1 & 2 packed instructions with MMX operands
566 class MMXPI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
568 : I<o, F, outs, ins, asm, pattern, d> {
569 let Predicates = !if(!eq(OpPrefix.Value, PD.Value), [HasMMX, HasSSE2],
573 // PIi8 - SSE 1 & 2 packed instructions with immediate
574 class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
575 list<dag> pattern, Domain d>
576 : Ii8<o, F, outs, ins, asm, pattern, d> {
577 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
578 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
579 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
582 // AVX instructions have a 'v' prefix in the mnemonic
583 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
584 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
588 // SSE1 Instruction Templates:
590 // SSI - SSE1 instructions with XS prefix.
591 // PSI - SSE1 instructions with PS prefix.
592 // PSIi8 - SSE1 instructions with ImmT == Imm8 and PS prefix.
593 // VSSI - SSE1 instructions with XS prefix in AVX form.
594 // VPSI - SSE1 instructions with PS prefix in AVX form, packed single.
596 class SSI<bits<8> o, Format F, dag outs, dag ins, string asm,
598 : I<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE1]>;
599 class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
601 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE1]>;
602 class PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
604 : I<o, F, outs, ins, asm, pattern, SSEPackedSingle>, PS,
606 class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
608 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedSingle>, PS,
610 class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
612 : I<o, F, outs, ins, !strconcat("v", asm), pattern>, XS,
614 class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
616 : I<o, F, outs, ins, !strconcat("v", asm), pattern, SSEPackedSingle>, PS,
619 // SSE2 Instruction Templates:
621 // SDI - SSE2 instructions with XD prefix.
622 // SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
623 // S2SI - SSE2 instructions with XS prefix.
624 // SSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix.
625 // PDI - SSE2 instructions with PD prefix, packed double domain.
626 // PDIi8 - SSE2 instructions with ImmT == Imm8 and PD prefix.
627 // VSDI - SSE2 scalar instructions with XD prefix in AVX form.
628 // VPDI - SSE2 vector instructions with PD prefix in AVX form,
629 // packed double domain.
630 // VS2I - SSE2 scalar instructions with PD prefix in AVX form.
631 // S2I - SSE2 scalar instructions with PD prefix.
632 // MMXSDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix as well as
634 // MMXSSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix as well as
637 class SDI<bits<8> o, Format F, dag outs, dag ins, string asm,
639 : I<o, F, outs, ins, asm, pattern>, XD, Requires<[UseSSE2]>;
640 class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
642 : Ii8<o, F, outs, ins, asm, pattern>, XD, Requires<[UseSSE2]>;
643 class S2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
645 : I<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE2]>;
646 class S2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
648 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE2]>;
649 class PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
651 : I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, PD,
653 class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
655 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedDouble>, PD,
657 class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
659 : I<o, F, outs, ins, !strconcat("v", asm), pattern>, XD,
661 class VS2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
663 : I<o, F, outs, ins, !strconcat("v", asm), pattern>, XS,
665 class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
667 : I<o, F, outs, ins, !strconcat("v", asm), pattern, SSEPackedDouble>,
668 PD, Requires<[HasAVX]>;
669 class VS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
671 : I<o, F, outs, ins, !strconcat("v", asm), pattern>, PD,
673 class S2I<bits<8> o, Format F, dag outs, dag ins, string asm,
675 : I<o, F, outs, ins, asm, pattern>, PD, Requires<[UseSSE2]>;
676 class MMXSDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
678 : Ii8<o, F, outs, ins, asm, pattern>, XD, Requires<[HasMMX, HasSSE2]>;
679 class MMXS2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
681 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasMMX, HasSSE2]>;
683 // SSE3 Instruction Templates:
685 // S3I - SSE3 instructions with PD prefixes.
686 // S3SI - SSE3 instructions with XS prefix.
687 // S3DI - SSE3 instructions with XD prefix.
689 class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
691 : I<o, F, outs, ins, asm, pattern, SSEPackedSingle>, XS,
693 class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
695 : I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, XD,
697 class S3I<bits<8> o, Format F, dag outs, dag ins, string asm,
699 : I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, PD,
703 // SSSE3 Instruction Templates:
705 // SS38I - SSSE3 instructions with T8 prefix.
706 // SS3AI - SSSE3 instructions with TA prefix.
707 // MMXSS38I - SSSE3 instructions with T8 prefix and MMX operands.
708 // MMXSS3AI - SSSE3 instructions with TA prefix and MMX operands.
710 // Note: SSSE3 instructions have 64-bit and 128-bit versions. The 64-bit version
711 // uses the MMX registers. The 64-bit versions are grouped with the MMX
712 // classes. They need to be enabled even if AVX is enabled.
714 class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
716 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
717 Requires<[UseSSSE3]>;
718 class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
720 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
721 Requires<[UseSSSE3]>;
722 class MMXSS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
724 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PS,
725 Requires<[HasMMX, HasSSSE3]>;
726 class MMXSS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
728 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPS,
729 Requires<[HasMMX, HasSSSE3]>;
731 // SSE4.1 Instruction Templates:
733 // SS48I - SSE 4.1 instructions with T8 prefix.
734 // SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
736 class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
738 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
739 Requires<[UseSSE41]>;
740 class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
742 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
743 Requires<[UseSSE41]>;
745 // SSE4.2 Instruction Templates:
747 // SS428I - SSE 4.2 instructions with T8 prefix.
748 class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
750 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
751 Requires<[UseSSE42]>;
753 // SS42FI - SSE 4.2 instructions with T8XD prefix.
754 // NOTE: 'HasSSE42' is used as SS42FI is only used for CRC32 insns.
755 class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
757 : I<o, F, outs, ins, asm, pattern>, T8XD, Requires<[HasSSE42]>;
759 // SS42AI = SSE 4.2 instructions with TA prefix
760 class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
762 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
763 Requires<[UseSSE42]>;
765 // AVX Instruction Templates:
766 // Instructions introduced in AVX (no SSE equivalent forms)
768 // AVX8I - AVX instructions with T8PD prefix.
769 // AVXAIi8 - AVX instructions with TAPD prefix and ImmT = Imm8.
770 class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
772 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
774 class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
776 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
779 // AVX2 Instruction Templates:
780 // Instructions introduced in AVX2 (no SSE equivalent forms)
782 // AVX28I - AVX2 instructions with T8PD prefix.
783 // AVX2AIi8 - AVX2 instructions with TAPD prefix and ImmT = Imm8.
784 class AVX28I<bits<8> o, Format F, dag outs, dag ins, string asm,
786 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
788 class AVX2AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
790 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
794 // AVX-512 Instruction Templates:
795 // Instructions introduced in AVX-512 (no SSE equivalent forms)
797 // AVX5128I - AVX-512 instructions with T8PD prefix.
798 // AVX512AIi8 - AVX-512 instructions with TAPD prefix and ImmT = Imm8.
799 // AVX512PDI - AVX-512 instructions with PD, double packed.
800 // AVX512PSI - AVX-512 instructions with PS, single packed.
801 // AVX512XS8I - AVX-512 instructions with T8 and XS prefixes.
802 // AVX512XSI - AVX-512 instructions with XS prefix, generic domain.
803 // AVX512BI - AVX-512 instructions with PD, int packed domain.
804 // AVX512SI - AVX-512 scalar instructions with PD prefix.
806 class AVX5128I<bits<8> o, Format F, dag outs, dag ins, string asm,
808 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
809 Requires<[HasAVX512]>;
810 class AVX5128IBase : T8PD {
811 Domain ExeDomain = SSEPackedInt;
813 class AVX512XS8I<bits<8> o, Format F, dag outs, dag ins, string asm,
815 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8XS,
816 Requires<[HasAVX512]>;
817 class AVX512XSI<bits<8> o, Format F, dag outs, dag ins, string asm,
819 : I<o, F, outs, ins, asm, pattern>, XS,
820 Requires<[HasAVX512]>;
821 class AVX512XDI<bits<8> o, Format F, dag outs, dag ins, string asm,
823 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, XD,
824 Requires<[HasAVX512]>;
825 class AVX512BI<bits<8> o, Format F, dag outs, dag ins, string asm,
827 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, PD,
828 Requires<[HasAVX512]>;
829 class AVX512BIBase : PD {
830 Domain ExeDomain = SSEPackedInt;
832 class AVX512BIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
834 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, PD,
835 Requires<[HasAVX512]>;
836 class AVX512BIi8Base : PD {
837 Domain ExeDomain = SSEPackedInt;
840 class AVX512XSIi8Base : XS {
841 Domain ExeDomain = SSEPackedInt;
844 class AVX512XDIi8Base : XD {
845 Domain ExeDomain = SSEPackedInt;
848 class AVX512PSIi8Base : PS {
849 Domain ExeDomain = SSEPackedSingle;
852 class AVX512PDIi8Base : PD {
853 Domain ExeDomain = SSEPackedDouble;
856 class AVX512AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
858 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
859 Requires<[HasAVX512]>;
860 class AVX512AIi8Base : TAPD {
863 class AVX512Ii8<bits<8> o, Format F, dag outs, dag ins, string asm,
865 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>,
866 Requires<[HasAVX512]>;
867 class AVX512PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
869 : I<o, F, outs, ins, asm, pattern, SSEPackedDouble>, PD,
870 Requires<[HasAVX512]>;
871 class AVX512PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
873 : I<o, F, outs, ins, asm, pattern, SSEPackedSingle>, PS,
874 Requires<[HasAVX512]>;
875 class AVX512PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
876 list<dag> pattern, Domain d>
877 : Ii8<o, F, outs, ins, asm, pattern, d>, Requires<[HasAVX512]>;
878 class AVX512PI<bits<8> o, Format F, dag outs, dag ins, string asm,
879 list<dag> pattern, Domain d>
880 : I<o, F, outs, ins, asm, pattern, d>, Requires<[HasAVX512]>;
881 class AVX512FMA3S<bits<8> o, Format F, dag outs, dag ins, string asm,
883 : I<o, F, outs, ins, asm, pattern>, T8PD,
884 EVEX_4V, Requires<[HasAVX512]>;
885 class AVX512FMA3Base : T8PD, EVEX_4V;
887 class AVX512<bits<8> o, Format F, dag outs, dag ins, string asm,
889 : I<o, F, outs, ins, asm, pattern>, Requires<[HasAVX512]>;
891 // AES Instruction Templates:
894 // These use the same encoding as the SSE4.2 T8 and TA encodings.
895 class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
897 : I<o, F, outs, ins, asm, pattern, SSEPackedInt>, T8PD,
898 Requires<[NoAVX, HasAES]>;
900 class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
902 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
903 Requires<[NoAVX, HasAES]>;
905 // PCLMUL Instruction Templates
906 class PCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
908 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD;
910 // FMA3 Instruction Templates
911 class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
913 : I<o, F, outs, ins, asm, pattern>, T8PD,
914 VEX_4V, FMASC, Requires<[HasFMA, NoFMA4, NoVLX]>;
915 class FMA3S<bits<8> o, Format F, dag outs, dag ins, string asm,
917 : I<o, F, outs, ins, asm, pattern>, T8PD,
918 VEX_4V, FMASC, Requires<[HasFMA, NoFMA4, NoAVX512]>;
919 class FMA3S_Int<bits<8> o, Format F, dag outs, dag ins, string asm,
921 : I<o, F, outs, ins, asm, pattern>, T8PD,
922 VEX_4V, FMASC, Requires<[HasFMA, NoAVX512]>;
924 // FMA4 Instruction Templates
925 class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
927 : Ii8Reg<o, F, outs, ins, asm, pattern>, TAPD,
928 VEX_4V, FMASC, Requires<[HasFMA4, NoVLX]>;
929 class FMA4S<bits<8> o, Format F, dag outs, dag ins, string asm,
931 : Ii8Reg<o, F, outs, ins, asm, pattern>, TAPD,
932 VEX_4V, FMASC, Requires<[HasFMA4, NoAVX512]>;
933 class FMA4S_Int<bits<8> o, Format F, dag outs, dag ins, string asm,
935 : Ii8Reg<o, F, outs, ins, asm, pattern>, TAPD,
936 VEX_4V, FMASC, Requires<[HasFMA4]>;
938 // XOP 2, 3 and 4 Operand Instruction Template
939 class IXOP<bits<8> o, Format F, dag outs, dag ins, string asm,
941 : I<o, F, outs, ins, asm, pattern, SSEPackedDouble>,
942 XOP9, Requires<[HasXOP]>;
944 // XOP 2 and 3 Operand Instruction Templates with imm byte
945 class IXOPi8<bits<8> o, Format F, dag outs, dag ins, string asm,
947 : Ii8<o, F, outs, ins, asm, pattern, SSEPackedDouble>,
948 XOP8, Requires<[HasXOP]>;
949 // XOP 4 Operand Instruction Templates with imm byte
950 class IXOPi8Reg<bits<8> o, Format F, dag outs, dag ins, string asm,
952 : Ii8Reg<o, F, outs, ins, asm, pattern, SSEPackedDouble>,
953 XOP8, Requires<[HasXOP]>;
955 // XOP 5 operand instruction (VEX encoding!)
956 class IXOP5<bits<8> o, Format F, dag outs, dag ins, string asm,
958 : Ii8Reg<o, F, outs, ins, asm, pattern, SSEPackedInt>, TAPD,
959 VEX_4V, Requires<[HasXOP]>;
961 // X86-64 Instruction templates...
964 class RI<bits<8> o, Format F, dag outs, dag ins, string asm,
966 : I<o, F, outs, ins, asm, pattern>, REX_W;
967 class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
969 : Ii8<o, F, outs, ins, asm, pattern>, REX_W;
970 class RIi16 <bits<8> o, Format F, dag outs, dag ins, string asm,
972 : Ii16<o, F, outs, ins, asm, pattern>, REX_W;
973 class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
975 : Ii32<o, F, outs, ins, asm, pattern>, REX_W;
976 class RIi32S <bits<8> o, Format F, dag outs, dag ins, string asm,
978 : Ii32S<o, F, outs, ins, asm, pattern>, REX_W;
979 class RIi64<bits<8> o, Format F, dag outs, dag ins, string asm,
981 : Ii64<o, F, outs, ins, asm, pattern>, REX_W;
983 class RS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
985 : S2I<o, F, outs, ins, asm, pattern>, REX_W;
986 class VRS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
988 : VS2I<o, F, outs, ins, asm, pattern>, VEX_W;
990 // MMX Instruction templates
993 // MMXI - MMX instructions with TB prefix.
994 // MMXI32 - MMX instructions with TB prefix valid only in 32 bit mode.
995 // MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
996 // MMX2I - MMX / SSE2 instructions with PD prefix.
997 // MMXIi8 - MMX instructions with ImmT == Imm8 and PS prefix.
998 // MMXIi8 - MMX instructions with ImmT == Imm8 and PS prefix.
999 // MMXID - MMX instructions with XD prefix.
1000 // MMXIS - MMX instructions with XS prefix.
1001 class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
1003 : I<o, F, outs, ins, asm, pattern>, PS, Requires<[HasMMX]>;
1004 class MMXI32<bits<8> o, Format F, dag outs, dag ins, string asm,
1006 : I<o, F, outs, ins, asm, pattern>, PS, Requires<[HasMMX,Not64BitMode]>;
1007 class MMXI64<bits<8> o, Format F, dag outs, dag ins, string asm,
1009 : I<o, F, outs, ins, asm, pattern>, PS, Requires<[HasMMX,In64BitMode]>;
1010 class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
1012 : I<o, F, outs, ins, asm, pattern>, PS, REX_W, Requires<[HasMMX]>;
1013 class MMX2I<bits<8> o, Format F, dag outs, dag ins, string asm,
1015 : I<o, F, outs, ins, asm, pattern>, PD, Requires<[HasMMX]>;
1016 class MMXIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
1018 : Ii8<o, F, outs, ins, asm, pattern>, PS, Requires<[HasMMX]>;
1019 class MMXID<bits<8> o, Format F, dag outs, dag ins, string asm,
1021 : Ii8<o, F, outs, ins, asm, pattern>, XD, Requires<[HasMMX]>;
1022 class MMXIS<bits<8> o, Format F, dag outs, dag ins, string asm,
1024 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasMMX]>;