blob: 105fa0c9a98068ea69ccce79e9bc42a47e6a09a2 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- X86InstrFormats.td - X86 Instruction Formats -------*- tablegen -*-===//
2//
Evan Cheng12c6be82007-07-31 08:04:03 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jia Liub22310f2012-02-18 12:03:15 +00007//
Evan Cheng12c6be82007-07-31 08:04:03 +00008//===----------------------------------------------------------------------===//
9
10//===----------------------------------------------------------------------===//
11// X86 Instruction Format Definitions.
12//
13
14// Format specifies the encoding used by the instruction. This is part of the
15// ad-hoc solution used to emit machine instruction encodings by our machine
16// code emitter.
17class Format<bits<6> val> {
18 bits<6> Value = val;
19}
20
21def Pseudo : Format<0>; def RawFrm : Format<1>;
22def AddRegFrm : Format<2>; def MRMDestReg : Format<3>;
23def MRMDestMem : Format<4>; def MRMSrcReg : Format<5>;
24def MRMSrcMem : Format<6>;
25def MRM0r : Format<16>; def MRM1r : Format<17>; def MRM2r : Format<18>;
26def MRM3r : Format<19>; def MRM4r : Format<20>; def MRM5r : Format<21>;
27def MRM6r : Format<22>; def MRM7r : Format<23>;
28def MRM0m : Format<24>; def MRM1m : Format<25>; def MRM2m : Format<26>;
29def MRM3m : Format<27>; def MRM4m : Format<28>; def MRM5m : Format<29>;
30def MRM6m : Format<30>; def MRM7m : Format<31>;
Chris Lattnerf7477e52010-02-12 02:06:33 +000031def MRM_C1 : Format<33>;
Chris Lattner140caa72010-02-13 00:41:14 +000032def MRM_C2 : Format<34>;
33def MRM_C3 : Format<35>;
34def MRM_C4 : Format<36>;
35def MRM_C8 : Format<37>;
36def MRM_C9 : Format<38>;
Michael Liao95d944032013-04-11 04:52:28 +000037def MRM_CA : Format<39>;
38def MRM_CB : Format<40>;
39def MRM_E8 : Format<41>;
40def MRM_F0 : Format<42>;
Chris Lattnercea0a8d2010-09-17 18:02:29 +000041def RawFrmImm8 : Format<43>;
42def RawFrmImm16 : Format<44>;
Michael Liao95d944032013-04-11 04:52:28 +000043def MRM_F8 : Format<45>;
44def MRM_F9 : Format<46>;
45def MRM_D0 : Format<47>;
46def MRM_D1 : Format<48>;
47def MRM_D4 : Format<49>;
48def MRM_D5 : Format<50>;
49def MRM_D6 : Format<51>;
50def MRM_D8 : Format<52>;
51def MRM_D9 : Format<53>;
52def MRM_DA : Format<54>;
53def MRM_DB : Format<55>;
54def MRM_DC : Format<56>;
55def MRM_DD : Format<57>;
56def MRM_DE : Format<58>;
57def MRM_DF : Format<59>;
Evan Cheng12c6be82007-07-31 08:04:03 +000058
59// ImmType - This specifies the immediate type used by an instruction. This is
60// part of the ad-hoc solution used to emit machine instruction encodings by our
61// machine code emitter.
62class ImmType<bits<3> val> {
63 bits<3> Value = val;
64}
Chris Lattner12455ca2010-02-12 22:27:07 +000065def NoImm : ImmType<0>;
66def Imm8 : ImmType<1>;
67def Imm8PCRel : ImmType<2>;
68def Imm16 : ImmType<3>;
Chris Lattnerac588122010-07-07 22:27:31 +000069def Imm16PCRel : ImmType<4>;
70def Imm32 : ImmType<5>;
71def Imm32PCRel : ImmType<6>;
72def Imm64 : ImmType<7>;
Evan Cheng12c6be82007-07-31 08:04:03 +000073
74// FPFormat - This specifies what form this FP instruction has. This is used by
75// the Floating-Point stackifier pass.
76class FPFormat<bits<3> val> {
77 bits<3> Value = val;
78}
79def NotFP : FPFormat<0>;
80def ZeroArgFP : FPFormat<1>;
81def OneArgFP : FPFormat<2>;
82def OneArgFPRW : FPFormat<3>;
83def TwoArgFP : FPFormat<4>;
84def CompareFP : FPFormat<5>;
85def CondMovFP : FPFormat<6>;
86def SpecialFP : FPFormat<7>;
87
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000088// Class specifying the SSE execution domain, used by the SSEDomainFix pass.
Jakob Stoklund Olesendbff4e82010-03-30 22:46:53 +000089// Keep in sync with tables in X86InstrInfo.cpp.
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000090class Domain<bits<2> val> {
91 bits<2> Value = val;
92}
93def GenericDomain : Domain<0>;
Jakob Stoklund Olesendbff4e82010-03-30 22:46:53 +000094def SSEPackedSingle : Domain<1>;
95def SSEPackedDouble : Domain<2>;
96def SSEPackedInt : Domain<3>;
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000097
Elena Demikhovsky003e7d72013-07-28 08:28:38 +000098// Class specifying the vector form of the decompressed
99// displacement of 8-bit.
100class CD8VForm<bits<3> val> {
101 bits<3> Value = val;
102}
103def CD8VF : CD8VForm<0>; // v := VL
104def CD8VH : CD8VForm<1>; // v := VL/2
105def CD8VQ : CD8VForm<2>; // v := VL/4
106def CD8VO : CD8VForm<3>; // v := VL/8
107def CD8VT1 : CD8VForm<4>; // v := 1
108def CD8VT2 : CD8VForm<5>; // v := 2
109def CD8VT4 : CD8VForm<6>; // v := 4
110def CD8VT8 : CD8VForm<7>; // v := 8
111
Evan Cheng12c6be82007-07-31 08:04:03 +0000112// Prefix byte classes which are used to indicate to the ad-hoc machine code
113// emitter that various prefix bytes are required.
114class OpSize { bit hasOpSizePrefix = 1; }
Craig Topper7ceb54a2014-01-06 06:02:58 +0000115class OpSize16 { bit hasOpSize16Prefix = 1; }
Evan Cheng12c6be82007-07-31 08:04:03 +0000116class AdSize { bit hasAdSizePrefix = 1; }
117class REX_W { bit hasREX_WPrefix = 1; }
Andrew Lenharth0070dd12008-03-01 13:37:02 +0000118class LOCK { bit hasLockPrefix = 1; }
Joerg Sonnenbergercc53d992011-04-04 15:58:30 +0000119class TB { bits<5> Prefix = 1; }
120class REP { bits<5> Prefix = 2; }
121class D8 { bits<5> Prefix = 3; }
122class D9 { bits<5> Prefix = 4; }
123class DA { bits<5> Prefix = 5; }
124class DB { bits<5> Prefix = 6; }
125class DC { bits<5> Prefix = 7; }
126class DD { bits<5> Prefix = 8; }
127class DE { bits<5> Prefix = 9; }
128class DF { bits<5> Prefix = 10; }
129class XD { bits<5> Prefix = 11; }
130class XS { bits<5> Prefix = 12; }
131class T8 { bits<5> Prefix = 13; }
132class TA { bits<5> Prefix = 14; }
Joerg Sonnenbergerfc4789d2011-04-04 16:58:13 +0000133class A6 { bits<5> Prefix = 15; }
134class A7 { bits<5> Prefix = 16; }
Craig Topper96fa5972011-10-16 16:50:08 +0000135class T8XD { bits<5> Prefix = 17; }
136class T8XS { bits<5> Prefix = 18; }
Craig Topper980d5982011-10-23 07:34:00 +0000137class TAXD { bits<5> Prefix = 19; }
Jan Sjödin6dd24882011-12-12 19:12:26 +0000138class XOP8 { bits<5> Prefix = 20; }
139class XOP9 { bits<5> Prefix = 21; }
Yunzhong Gaob8bbcbf2013-09-27 18:38:42 +0000140class XOPA { bits<5> Prefix = 22; }
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000141class VEX { bit hasVEXPrefix = 1; }
Bruno Cardoso Lopes05166742010-07-01 01:20:06 +0000142class VEX_W { bit hasVEX_WPrefix = 1; }
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000143class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; }
Craig Topperaea148c2011-10-16 07:55:05 +0000144class VEX_4VOp3 : VEX { bit hasVEX_4VOp3Prefix = 1; }
Bruno Cardoso Lopese2bd0582010-07-06 22:36:24 +0000145class VEX_I8IMM { bit hasVEX_i8ImmReg = 1; }
Bruno Cardoso Lopesfd8bfcd2010-07-13 21:07:28 +0000146class VEX_L { bit hasVEX_L = 1; }
Craig Topperf18c8962011-10-04 06:30:42 +0000147class VEX_LIG { bit ignoresVEX_L = 1; }
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000148class EVEX : VEX { bit hasEVEXPrefix = 1; }
149class EVEX_4V : VEX_4V { bit hasEVEXPrefix = 1; }
150class EVEX_K { bit hasEVEX_K = 1; }
151class EVEX_KZ : EVEX_K { bit hasEVEX_Z = 1; }
152class EVEX_B { bit hasEVEX_B = 1; }
153class EVEX_V512 { bit hasEVEX_L2 = 1; bit hasVEX_L = 0; }
154class EVEX_CD8<int esize, CD8VForm form> {
155 bits<2> EVEX_CD8E = !if(!eq(esize, 8), 0b00,
156 !if(!eq(esize, 16), 0b01,
157 !if(!eq(esize, 32), 0b10,
158 !if(!eq(esize, 64), 0b11, ?))));
159 bits<3> EVEX_CD8V = form.Value;
160}
Chris Lattner45270db2010-10-03 18:08:05 +0000161class Has3DNow0F0FOpcode { bit has3DNow0F0FOpcode = 1; }
Craig Toppercd93de92011-12-30 04:48:54 +0000162class MemOp4 { bit hasMemOp4Prefix = 1; }
Jan Sjödin6dd24882011-12-12 19:12:26 +0000163class XOP { bit hasXOP_Prefix = 1; }
Evan Cheng12c6be82007-07-31 08:04:03 +0000164class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
Andrew Trick8523b162012-02-01 23:20:51 +0000165 string AsmStr,
166 InstrItinClass itin,
167 Domain d = GenericDomain>
Evan Cheng12c6be82007-07-31 08:04:03 +0000168 : Instruction {
169 let Namespace = "X86";
170
171 bits<8> Opcode = opcod;
172 Format Form = f;
173 bits<6> FormBits = Form.Value;
174 ImmType ImmT = i;
Evan Cheng12c6be82007-07-31 08:04:03 +0000175
176 dag OutOperandList = outs;
177 dag InOperandList = ins;
178 string AsmString = AsmStr;
179
Chris Lattner7ff33462010-10-31 19:22:57 +0000180 // If this is a pseudo instruction, mark it isCodeGenOnly.
181 let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
182
Andrew Trick8523b162012-02-01 23:20:51 +0000183 let Itinerary = itin;
184
Evan Cheng12c6be82007-07-31 08:04:03 +0000185 //
186 // Attributes specific to X86 instructions...
187 //
Craig Topper3484fc22014-01-05 04:17:28 +0000188 bit ForceDisassemble = 0; // Force instruction to disassemble even though it's
189 // isCodeGenonly. Needed to hide an ambiguous
190 // AsmString from the parser, but still disassemble.
191
Evan Cheng12c6be82007-07-31 08:04:03 +0000192 bit hasOpSizePrefix = 0; // Does this inst have a 0x66 prefix?
Craig Topper7ceb54a2014-01-06 06:02:58 +0000193 bit hasOpSize16Prefix = 0;// Does this inst have a 0x66 prefix in 16-bit mode?
Evan Cheng12c6be82007-07-31 08:04:03 +0000194 bit hasAdSizePrefix = 0; // Does this inst have a 0x67 prefix?
195
Joerg Sonnenbergercc53d992011-04-04 15:58:30 +0000196 bits<5> Prefix = 0; // Which prefix byte does this inst have?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000197 bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix?
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000198 FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
Dan Gohmana21bdda2008-08-20 13:46:21 +0000199 bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000200 Domain ExeDomain = d;
Eric Christopher3a8ae232010-11-30 09:11:54 +0000201 bit hasVEXPrefix = 0; // Does this inst require a VEX prefix?
Bruno Cardoso Lopes05166742010-07-01 01:20:06 +0000202 bit hasVEX_WPrefix = 0; // Does this inst set the VEX_W field?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000203 bit hasVEX_4VPrefix = 0; // Does this inst require the VEX.VVVV field?
Craig Topperaea148c2011-10-16 07:55:05 +0000204 bit hasVEX_4VOp3Prefix = 0; // Does this inst require the VEX.VVVV field to
205 // encode the third operand?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000206 bit hasVEX_i8ImmReg = 0; // Does this inst require the last source register
Bruno Cardoso Lopese2bd0582010-07-06 22:36:24 +0000207 // to be encoded in a immediate field?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000208 bit hasVEX_L = 0; // Does this inst use large (256-bit) registers?
Craig Topperf18c8962011-10-04 06:30:42 +0000209 bit ignoresVEX_L = 0; // Does this instruction ignore the L-bit
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000210 bit hasEVEXPrefix = 0; // Does this inst require EVEX form?
211 bit hasEVEX_K = 0; // Does this inst require masking?
212 bit hasEVEX_Z = 0; // Does this inst set the EVEX_Z field?
213 bit hasEVEX_L2 = 0; // Does this inst set the EVEX_L2 field?
214 bit hasEVEX_B = 0; // Does this inst set the EVEX_B field?
215 bits<2> EVEX_CD8E = 0; // Compressed disp8 form - element-size.
216 bits<3> EVEX_CD8V = 0; // Compressed disp8 form - vector-width.
Chris Lattner45270db2010-10-03 18:08:05 +0000217 bit has3DNow0F0FOpcode =0;// Wacky 3dNow! encoding?
Craig Toppercd93de92011-12-30 04:48:54 +0000218 bit hasMemOp4Prefix = 0; // Same bit as VEX_W, but used for swapping operands
Jan Sjödin6dd24882011-12-12 19:12:26 +0000219 bit hasXOP_Prefix = 0; // Does this inst require an XOP prefix?
Jakob Stoklund Olesenb93331f2010-04-05 03:10:20 +0000220
221 // TSFlags layout should be kept in sync with X86InstrInfo.h.
222 let TSFlags{5-0} = FormBits;
223 let TSFlags{6} = hasOpSizePrefix;
Craig Topper7ceb54a2014-01-06 06:02:58 +0000224 let TSFlags{7} = hasOpSize16Prefix;
225 let TSFlags{8} = hasAdSizePrefix;
226 let TSFlags{13-9} = Prefix;
227 let TSFlags{14} = hasREX_WPrefix;
228 let TSFlags{17-15} = ImmT.Value;
229 let TSFlags{20-18} = FPForm.Value;
230 let TSFlags{21} = hasLockPrefix;
Craig Topper7c6baa72014-01-06 06:51:58 +0000231 let TSFlags{23-22} = ExeDomain.Value;
232 let TSFlags{31-24} = Opcode;
233 let TSFlags{32} = hasVEXPrefix;
234 let TSFlags{33} = hasVEX_WPrefix;
235 let TSFlags{34} = hasVEX_4VPrefix;
236 let TSFlags{35} = hasVEX_4VOp3Prefix;
237 let TSFlags{36} = hasVEX_i8ImmReg;
238 let TSFlags{37} = hasVEX_L;
239 let TSFlags{38} = ignoresVEX_L;
240 let TSFlags{39} = hasEVEXPrefix;
241 let TSFlags{40} = hasEVEX_K;
242 let TSFlags{41} = hasEVEX_Z;
243 let TSFlags{42} = hasEVEX_L2;
244 let TSFlags{43} = hasEVEX_B;
245 let TSFlags{45-44} = EVEX_CD8E;
246 let TSFlags{48-46} = EVEX_CD8V;
247 let TSFlags{49} = has3DNow0F0FOpcode;
248 let TSFlags{50} = hasMemOp4Prefix;
249 let TSFlags{51} = hasXOP_Prefix;
Evan Cheng12c6be82007-07-31 08:04:03 +0000250}
251
Eric Christopheref62f572010-11-30 08:57:23 +0000252class PseudoI<dag oops, dag iops, list<dag> pattern>
Andrew Trick8523b162012-02-01 23:20:51 +0000253 : X86Inst<0, Pseudo, NoImm, oops, iops, "", NoItinerary> {
Eric Christopheref62f572010-11-30 08:57:23 +0000254 let Pattern = pattern;
255}
256
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000257class I<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000258 list<dag> pattern, InstrItinClass itin = NoItinerary,
Andrew Trick8523b162012-02-01 23:20:51 +0000259 Domain d = GenericDomain>
260 : X86Inst<o, f, NoImm, outs, ins, asm, itin, d> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000261 let Pattern = pattern;
262 let CodeSize = 3;
263}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000264class Ii8 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000265 list<dag> pattern, InstrItinClass itin = NoItinerary,
Andrew Trick8523b162012-02-01 23:20:51 +0000266 Domain d = GenericDomain>
267 : X86Inst<o, f, Imm8, outs, ins, asm, itin, d> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000268 let Pattern = pattern;
269 let CodeSize = 3;
270}
Chris Lattner12455ca2010-02-12 22:27:07 +0000271class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000272 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000273 : X86Inst<o, f, Imm8PCRel, outs, ins, asm, itin> {
Chris Lattner12455ca2010-02-12 22:27:07 +0000274 let Pattern = pattern;
275 let CodeSize = 3;
276}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000277class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000278 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000279 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000280 let Pattern = pattern;
281 let CodeSize = 3;
282}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000283class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000284 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000285 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000286 let Pattern = pattern;
287 let CodeSize = 3;
288}
289
Chris Lattnerac588122010-07-07 22:27:31 +0000290class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000291 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000292 : X86Inst<o, f, Imm16PCRel, outs, ins, asm, itin> {
Chris Lattnerac588122010-07-07 22:27:31 +0000293 let Pattern = pattern;
294 let CodeSize = 3;
295}
296
Chris Lattner12455ca2010-02-12 22:27:07 +0000297class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000298 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000299 : X86Inst<o, f, Imm32PCRel, outs, ins, asm, itin> {
Chris Lattner12455ca2010-02-12 22:27:07 +0000300 let Pattern = pattern;
301 let CodeSize = 3;
302}
303
Evan Cheng12c6be82007-07-31 08:04:03 +0000304// FPStack Instruction Templates:
305// FPI - Floating Point Instruction template.
Preston Gurdfa3f6cb2012-05-02 16:03:35 +0000306class FPI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000307 InstrItinClass itin = NoItinerary>
Preston Gurdfa3f6cb2012-05-02 16:03:35 +0000308 : I<o, F, outs, ins, asm, [], itin> {}
Evan Cheng12c6be82007-07-31 08:04:03 +0000309
Bob Wilsona967c422010-08-26 18:08:11 +0000310// FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
Andrew Trick8523b162012-02-01 23:20:51 +0000311class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000312 InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000313 : X86Inst<0, Pseudo, NoImm, outs, ins, "", itin> {
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000314 let FPForm = fp;
Evan Cheng12c6be82007-07-31 08:04:03 +0000315 let Pattern = pattern;
316}
317
Sean Callanan050e0cd2009-09-15 00:35:17 +0000318// Templates for instructions that use a 16- or 32-bit segmented address as
319// their only operand: lcall (FAR CALL) and ljmp (FAR JMP)
320//
321// Iseg16 - 16-bit segment selector, 16-bit offset
322// Iseg32 - 16-bit segment selector, 32-bit offset
323
324class Iseg16 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000325 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000326 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
Sean Callanan050e0cd2009-09-15 00:35:17 +0000327 let Pattern = pattern;
328 let CodeSize = 3;
329}
330
331class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000332 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000333 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
Sean Callanan050e0cd2009-09-15 00:35:17 +0000334 let Pattern = pattern;
335 let CodeSize = 3;
336}
337
Michael Liaobbd10792012-08-30 16:54:46 +0000338def __xs : XS;
Elena Demikhovskyfad02922013-05-21 12:04:22 +0000339def __xd : XD;
Michael Liaobbd10792012-08-30 16:54:46 +0000340
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000341// SI - SSE 1 & 2 scalar instructions
Andrew Trick8523b162012-02-01 23:20:51 +0000342class SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000343 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000344 : I<o, F, outs, ins, asm, pattern, itin> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000345 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
346 !if(hasVEXPrefix /* VEX */, [UseAVX],
Elena Demikhovskyfad02922013-05-21 12:04:22 +0000347 !if(!eq(Prefix, __xs.Prefix), [UseSSE1],
348 !if(!eq(Prefix, __xd.Prefix), [UseSSE2],
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000349 !if(hasOpSizePrefix, [UseSSE2], [UseSSE1])))));
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000350
351 // AVX instructions have a 'v' prefix in the mnemonic
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000352 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000353}
354
Bruno Cardoso Lopes191a1cd2010-06-24 00:32:06 +0000355// SIi8 - SSE 1 & 2 scalar instructions
356class SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000357 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000358 : Ii8<o, F, outs, ins, asm, pattern, itin> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000359 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
360 !if(hasVEXPrefix /* VEX */, [UseAVX],
361 !if(!eq(Prefix, __xs.Prefix), [UseSSE1], [UseSSE2])));
Bruno Cardoso Lopes191a1cd2010-06-24 00:32:06 +0000362
363 // AVX instructions have a 'v' prefix in the mnemonic
364 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
365}
366
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000367// PI - SSE 1 & 2 packed instructions
368class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
Andrew Trick8523b162012-02-01 23:20:51 +0000369 InstrItinClass itin, Domain d>
370 : I<o, F, outs, ins, asm, pattern, itin, d> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000371 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
372 !if(hasVEXPrefix /* VEX */, [HasAVX],
373 !if(hasOpSizePrefix /* OpSize */, [UseSSE2], [UseSSE1])));
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000374
375 // AVX instructions have a 'v' prefix in the mnemonic
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000376 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000377}
378
Michael Liaobbd10792012-08-30 16:54:46 +0000379// MMXPI - SSE 1 & 2 packed instructions with MMX operands
380class MMXPI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
381 InstrItinClass itin, Domain d>
382 : I<o, F, outs, ins, asm, pattern, itin, d> {
383 let Predicates = !if(hasOpSizePrefix /* OpSize */, [HasSSE2], [HasSSE1]);
384}
385
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000386// PIi8 - SSE 1 & 2 packed instructions with immediate
387class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Andrew Trick8523b162012-02-01 23:20:51 +0000388 list<dag> pattern, InstrItinClass itin, Domain d>
389 : Ii8<o, F, outs, ins, asm, pattern, itin, d> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000390 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
391 !if(hasVEXPrefix /* VEX */, [HasAVX],
392 !if(hasOpSizePrefix /* OpSize */, [UseSSE2], [UseSSE1])));
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000393
394 // AVX instructions have a 'v' prefix in the mnemonic
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000395 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000396}
397
Evan Cheng12c6be82007-07-31 08:04:03 +0000398// SSE1 Instruction Templates:
399//
400// SSI - SSE1 instructions with XS prefix.
401// PSI - SSE1 instructions with TB prefix.
402// PSIi8 - SSE1 instructions with ImmT == Imm8 and TB prefix.
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000403// VSSI - SSE1 instructions with XS prefix in AVX form.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000404// VPSI - SSE1 instructions with TB prefix in AVX form, packed single.
Evan Cheng12c6be82007-07-31 08:04:03 +0000405
Andrew Trick8523b162012-02-01 23:20:51 +0000406class SSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000407 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000408 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000409class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000410 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000411 : Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000412class PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000413 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000414 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
Michael Liaobbd10792012-08-30 16:54:46 +0000415 Requires<[UseSSE1]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000416class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000417 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000418 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
Michael Liaobbd10792012-08-30 16:54:46 +0000419 Requires<[UseSSE1]>;
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000420class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000421 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000422 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000423 Requires<[HasAVX]>;
Bruno Cardoso Lopesb06f54b2010-06-12 01:23:26 +0000424class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000425 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000426 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedSingle>, TB,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000427 Requires<[HasAVX]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000428
429// SSE2 Instruction Templates:
430//
Bill Wendling76105a42008-08-27 21:32:04 +0000431// SDI - SSE2 instructions with XD prefix.
432// SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
Craig Topperf881d382012-07-30 02:14:02 +0000433// S2SI - SSE2 instructions with XS prefix.
Bill Wendling76105a42008-08-27 21:32:04 +0000434// SSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000435// PDI - SSE2 instructions with TB and OpSize prefixes, packed double domain.
Bill Wendling76105a42008-08-27 21:32:04 +0000436// PDIi8 - SSE2 instructions with ImmT == Imm8 and TB and OpSize prefixes.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000437// VSDI - SSE2 scalar instructions with XD prefix in AVX form.
438// VPDI - SSE2 vector instructions with TB and OpSize prefixes in AVX form,
439// packed double domain.
440// VS2I - SSE2 scalar instructions with TB and OpSize prefixes in AVX form.
441// S2I - SSE2 scalar instructions with TB and OpSize prefixes.
Michael Liaobbd10792012-08-30 16:54:46 +0000442// MMXSDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix as well as
443// MMX operands.
444// MMXSSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix as well as
445// MMX operands.
Evan Cheng12c6be82007-07-31 08:04:03 +0000446
Andrew Trick8523b162012-02-01 23:20:51 +0000447class SDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000448 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000449 : I<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
Evan Cheng01c7c192007-12-20 19:57:09 +0000450class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000451 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000452 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
Craig Topperf881d382012-07-30 02:14:02 +0000453class S2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000454 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000455 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE2]>;
Craig Topperf881d382012-07-30 02:14:02 +0000456class S2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000457 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000458 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE2]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000459class PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000460 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000461 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000462 Requires<[UseSSE2]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000463class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000464 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000465 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000466 Requires<[UseSSE2]>;
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000467class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000468 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000469 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XD,
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000470 Requires<[UseAVX]>;
Craig Topperf881d382012-07-30 02:14:02 +0000471class VS2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000472 list<dag> pattern, InstrItinClass itin = NoItinerary>
Craig Topperf881d382012-07-30 02:14:02 +0000473 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
474 Requires<[HasAVX]>;
Bruno Cardoso Lopesb06f54b2010-06-12 01:23:26 +0000475class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000476 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000477 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedDouble>, TB,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000478 OpSize, Requires<[HasAVX]>;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000479class VS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
480 list<dag> pattern, InstrItinClass itin = NoItinerary>
481 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, TB,
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000482 OpSize, Requires<[UseAVX]>;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000483class S2I<bits<8> o, Format F, dag outs, dag ins, string asm,
484 list<dag> pattern, InstrItinClass itin = NoItinerary>
485 : I<o, F, outs, ins, asm, pattern, itin>, TB,
486 OpSize, Requires<[UseSSE2]>;
Michael Liaobbd10792012-08-30 16:54:46 +0000487class MMXSDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000488 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000489 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasSSE2]>;
490class MMXS2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000491 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000492 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE2]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000493
494// SSE3 Instruction Templates:
495//
496// S3I - SSE3 instructions with TB and OpSize prefixes.
497// S3SI - SSE3 instructions with XS prefix.
498// S3DI - SSE3 instructions with XD prefix.
499
Sean Callanan04d8cb72009-12-18 00:01:26 +0000500class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000501 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000502 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, XS,
Michael Liaobbd10792012-08-30 16:54:46 +0000503 Requires<[UseSSE3]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000504class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000505 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000506 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, XD,
Michael Liaobbd10792012-08-30 16:54:46 +0000507 Requires<[UseSSE3]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000508class S3I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000509 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000510 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000511 Requires<[UseSSE3]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000512
513
Nate Begeman8ef50212008-02-12 22:51:28 +0000514// SSSE3 Instruction Templates:
515//
516// SS38I - SSSE3 instructions with T8 prefix.
517// SS3AI - SSSE3 instructions with TA prefix.
Michael Liaobbd10792012-08-30 16:54:46 +0000518// MMXSS38I - SSSE3 instructions with T8 prefix and MMX operands.
519// MMXSS3AI - SSSE3 instructions with TA prefix and MMX operands.
Nate Begeman8ef50212008-02-12 22:51:28 +0000520//
521// Note: SSSE3 instructions have 64-bit and 128-bit versions. The 64-bit version
Craig Topper744f6312012-01-09 00:11:29 +0000522// uses the MMX registers. The 64-bit versions are grouped with the MMX
523// classes. They need to be enabled even if AVX is enabled.
Nate Begeman8ef50212008-02-12 22:51:28 +0000524
525class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000526 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000527 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000528 Requires<[UseSSSE3]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000529class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000530 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000531 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000532 Requires<[UseSSSE3]>;
533class MMXSS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000534 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000535 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
536 Requires<[HasSSSE3]>;
537class MMXSS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000538 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000539 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000540 Requires<[HasSSSE3]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000541
542// SSE4.1 Instruction Templates:
543//
544// SS48I - SSE 4.1 instructions with T8 prefix.
Evan Cheng96bdbd62008-03-14 07:39:27 +0000545// SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
Nate Begeman8ef50212008-02-12 22:51:28 +0000546//
547class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000548 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000549 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000550 Requires<[UseSSE41]>;
Evan Cheng96bdbd62008-03-14 07:39:27 +0000551class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000552 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000553 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000554 Requires<[UseSSE41]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000555
Nate Begeman55b7bec2008-07-17 16:51:19 +0000556// SSE4.2 Instruction Templates:
557//
558// SS428I - SSE 4.2 instructions with T8 prefix.
559class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000560 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000561 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000562 Requires<[UseSSE42]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000563
Craig Topper96fa5972011-10-16 16:50:08 +0000564// SS42FI - SSE 4.2 instructions with T8XD prefix.
Michael Liaobbd10792012-08-30 16:54:46 +0000565// NOTE: 'HasSSE42' is used as SS42FI is only used for CRC32 insns.
Eric Christopher7dfa9f22009-08-08 21:55:08 +0000566class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000567 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000568 : I<o, F, outs, ins, asm, pattern, itin>, T8XD, Requires<[HasSSE42]>;
Craig Topperb9109842012-01-01 19:51:58 +0000569
Eric Christopher9fe912d2009-08-18 22:50:32 +0000570// SS42AI = SSE 4.2 instructions with TA prefix
571class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000572 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000573 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000574 Requires<[UseSSE42]>;
Eric Christopher9fe912d2009-08-18 22:50:32 +0000575
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000576// AVX Instruction Templates:
577// Instructions introduced in AVX (no SSE equivalent forms)
578//
579// AVX8I - AVX instructions with T8 and OpSize prefix.
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000580// AVXAIi8 - AVX instructions with TA, OpSize prefix and ImmT = Imm8.
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000581class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000582 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000583 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000584 Requires<[HasAVX]>;
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000585class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000586 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000587 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000588 Requires<[HasAVX]>;
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000589
Craig Topper05d1cb92011-11-06 06:12:20 +0000590// AVX2 Instruction Templates:
591// Instructions introduced in AVX2 (no SSE equivalent forms)
592//
593// AVX28I - AVX2 instructions with T8 and OpSize prefix.
594// AVX2AIi8 - AVX2 instructions with TA, OpSize prefix and ImmT = Imm8.
595class AVX28I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000596 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000597 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
Craig Topper05d1cb92011-11-06 06:12:20 +0000598 Requires<[HasAVX2]>;
Craig Topperf01f1b52011-11-06 23:04:08 +0000599class AVX2AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000600 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000601 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
Craig Topper05d1cb92011-11-06 06:12:20 +0000602 Requires<[HasAVX2]>;
603
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000604
605// AVX-512 Instruction Templates:
606// Instructions introduced in AVX-512 (no SSE equivalent forms)
607//
608// AVX5128I - AVX-512 instructions with T8 and OpSize prefix.
609// AVX512AIi8 - AVX-512 instructions with TA, OpSize prefix and ImmT = Imm8.
610// AVX512PDI - AVX-512 instructions with TB, OpSize, double packed.
611// AVX512PSI - AVX-512 instructions with TB, single packed.
612// AVX512XS8I - AVX-512 instructions with T8 and XS prefixes.
613// AVX512XSI - AVX-512 instructions with XS prefix, generic domain.
614// AVX512BI - AVX-512 instructions with TB, OpSize, int packed domain.
615// AVX512SI - AVX-512 scalar instructions with TB and OpSize prefixes.
616
617class AVX5128I<bits<8> o, Format F, dag outs, dag ins, string asm,
618 list<dag> pattern, InstrItinClass itin = NoItinerary>
619 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
620 Requires<[HasAVX512]>;
621class AVX512XS8I<bits<8> o, Format F, dag outs, dag ins, string asm,
622 list<dag> pattern, InstrItinClass itin = NoItinerary>
623 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8XS,
624 Requires<[HasAVX512]>;
625class AVX512XSI<bits<8> o, Format F, dag outs, dag ins, string asm,
626 list<dag> pattern, InstrItinClass itin = NoItinerary>
627 : I<o, F, outs, ins, asm, pattern, itin>, XS,
628 Requires<[HasAVX512]>;
629class AVX512XDI<bits<8> o, Format F, dag outs, dag ins, string asm,
630 list<dag> pattern, InstrItinClass itin = NoItinerary>
631 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, XD,
632 Requires<[HasAVX512]>;
633class AVX512BI<bits<8> o, Format F, dag outs, dag ins, string asm,
634 list<dag> pattern, InstrItinClass itin = NoItinerary>
635 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
636 Requires<[HasAVX512]>;
637class AVX512BIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
638 list<dag> pattern, InstrItinClass itin = NoItinerary>
639 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
640 Requires<[HasAVX512]>;
641class AVX512SI<bits<8> o, Format F, dag outs, dag ins, string asm,
642 list<dag> pattern, InstrItinClass itin = NoItinerary>
643 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
644 Requires<[HasAVX512]>;
645class AVX512AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
646 list<dag> pattern, InstrItinClass itin = NoItinerary>
647 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
648 Requires<[HasAVX512]>;
649class AVX512Ii8<bits<8> o, Format F, dag outs, dag ins, string asm,
650 list<dag> pattern, InstrItinClass itin = NoItinerary>
Elena Demikhovskyb30371c2013-10-02 06:39:07 +0000651 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB,
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000652 Requires<[HasAVX512]>;
653class AVX512PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
654 list<dag> pattern, InstrItinClass itin = NoItinerary>
655 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB,
656 OpSize, Requires<[HasAVX512]>;
657class AVX512PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
658 list<dag> pattern, InstrItinClass itin = NoItinerary>
659 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
660 Requires<[HasAVX512]>;
661class AVX512PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
662 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
Elena Demikhovskyb30371c2013-10-02 06:39:07 +0000663 : Ii8<o, F, outs, ins, asm, pattern, itin, d>, TB, Requires<[HasAVX512]>;
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000664class AVX512PI<bits<8> o, Format F, dag outs, dag ins, string asm,
665 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
Elena Demikhovskyb30371c2013-10-02 06:39:07 +0000666 : I<o, F, outs, ins, asm, pattern, itin, d>, TB, Requires<[HasAVX512]>;
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000667class AVX512FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
668 list<dag>pattern, InstrItinClass itin = NoItinerary>
669 : I<o, F, outs, ins, asm, pattern, itin>, T8,
670 OpSize, EVEX_4V, Requires<[HasAVX512]>;
671
Eric Christopher2ef63182010-04-02 21:54:27 +0000672// AES Instruction Templates:
673//
674// AES8I
Eric Christopher1290fa02010-04-05 21:14:32 +0000675// These use the same encoding as the SSE4.2 T8 and TA encodings.
Eric Christopher2ef63182010-04-02 21:54:27 +0000676class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
Preston Gurd3fe264d2013-09-13 19:23:28 +0000677 list<dag>pattern, InstrItinClass itin = IIC_AES>
Andrew Trick8523b162012-02-01 23:20:51 +0000678 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Craig Topperc0cef322012-05-01 05:35:02 +0000679 Requires<[HasAES]>;
Eric Christopher2ef63182010-04-02 21:54:27 +0000680
681class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000682 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000683 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Craig Topperc0cef322012-05-01 05:35:02 +0000684 Requires<[HasAES]>;
Eric Christopher2ef63182010-04-02 21:54:27 +0000685
Benjamin Kramera0396e42012-05-31 14:34:17 +0000686// PCLMUL Instruction Templates
687class PCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000688 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000689 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Benjamin Kramera0396e42012-05-31 14:34:17 +0000690 OpSize, Requires<[HasPCLMUL]>;
Eli Friedman415412e2011-07-05 18:21:20 +0000691
Benjamin Kramera0396e42012-05-31 14:34:17 +0000692class AVXPCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000693 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000694 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Benjamin Kramera0396e42012-05-31 14:34:17 +0000695 OpSize, VEX_4V, Requires<[HasAVX, HasPCLMUL]>;
Bruno Cardoso Lopesea0e05a2010-07-23 18:41:12 +0000696
Bruno Cardoso Lopesacd92302010-07-23 00:54:35 +0000697// FMA3 Instruction Templates
698class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000699 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000700 : I<o, F, outs, ins, asm, pattern, itin>, T8,
Nadav Rotemff8c4552013-03-28 22:54:45 +0000701 OpSize, VEX_4V, FMASC, Requires<[HasFMA]>;
Bruno Cardoso Lopesacd92302010-07-23 00:54:35 +0000702
Bruno Cardoso Lopes0f9a1f52011-11-25 19:33:42 +0000703// FMA4 Instruction Templates
704class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000705 list<dag>pattern, InstrItinClass itin = NoItinerary>
Benjamin Kramerfee7d212013-01-22 18:05:59 +0000706 : Ii8<o, F, outs, ins, asm, pattern, itin>, TA,
Nadav Rotemff8c4552013-03-28 22:54:45 +0000707 OpSize, VEX_4V, VEX_I8IMM, FMASC, Requires<[HasFMA4]>;
Bruno Cardoso Lopes0f9a1f52011-11-25 19:33:42 +0000708
Jan Sjödin7c0face2011-12-12 19:37:49 +0000709// XOP 2, 3 and 4 Operand Instruction Template
710class IXOP<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000711 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000712 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000713 XOP, XOP9, Requires<[HasXOP]>;
714
715// XOP 2, 3 and 4 Operand Instruction Templates with imm byte
716class IXOPi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000717 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000718 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000719 XOP, XOP8, Requires<[HasXOP]>;
720
721// XOP 5 operand instruction (VEX encoding!)
722class IXOP5<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000723 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000724 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000725 OpSize, VEX_4V, VEX_I8IMM, Requires<[HasXOP]>;
726
Evan Cheng12c6be82007-07-31 08:04:03 +0000727// X86-64 Instruction templates...
728//
729
Andrew Trick8523b162012-02-01 23:20:51 +0000730class RI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000731 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000732 : I<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000733class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000734 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000735 : Ii8<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000736class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000737 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000738 : Ii32<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000739
740class RIi64<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000741 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000742 : X86Inst<o, f, Imm64, outs, ins, asm, itin>, REX_W {
Evan Cheng12c6be82007-07-31 08:04:03 +0000743 let Pattern = pattern;
744 let CodeSize = 3;
745}
746
Kevin Enderby285da022013-07-22 21:25:31 +0000747class RIi64_NOREX<bits<8> o, Format f, dag outs, dag ins, string asm,
748 list<dag> pattern, InstrItinClass itin = NoItinerary>
749 : X86Inst<o, f, Imm64, outs, ins, asm, itin> {
750 let Pattern = pattern;
751 let CodeSize = 3;
752}
753
Evan Cheng12c6be82007-07-31 08:04:03 +0000754class RSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000755 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000756 : SSI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000757class RSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000758 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000759 : SDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000760class RPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000761 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000762 : PDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Bruno Cardoso Lopes123dff02011-07-25 23:05:25 +0000763class VRPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000764 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000765 : VPDI<o, F, outs, ins, asm, pattern, itin>, VEX_W;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000766class RS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
767 list<dag> pattern, InstrItinClass itin = NoItinerary>
768 : S2I<o, F, outs, ins, asm, pattern, itin>, REX_W;
769class VRS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
770 list<dag> pattern, InstrItinClass itin = NoItinerary>
771 : VS2I<o, F, outs, ins, asm, pattern, itin>, VEX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000772
773// MMX Instruction templates
774//
775
776// MMXI - MMX instructions with TB prefix.
Craig Topperbc749db2013-10-09 02:18:34 +0000777// MMXI32 - MMX instructions with TB prefix valid only in 32 bit mode.
Anton Korobeynikov31099512008-08-23 15:53:19 +0000778// MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
Evan Cheng12c6be82007-07-31 08:04:03 +0000779// MMX2I - MMX / SSE2 instructions with TB and OpSize prefixes.
780// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
781// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
782// MMXID - MMX instructions with XD prefix.
783// MMXIS - MMX instructions with XS prefix.
Sean Callanan04d8cb72009-12-18 00:01:26 +0000784class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000785 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000786 : I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
Craig Topperbc749db2013-10-09 02:18:34 +0000787class MMXI32<bits<8> o, Format F, dag outs, dag ins, string asm,
788 list<dag> pattern, InstrItinClass itin = NoItinerary>
Eric Christopherc0a5aae2013-12-20 02:04:49 +0000789 : I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX,Not64BitMode]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000790class MMXI64<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000791 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000792 : I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX,In64BitMode]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000793class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000794 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000795 : I<o, F, outs, ins, asm, pattern, itin>, TB, REX_W, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000796class MMX2I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000797 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000798 : I<o, F, outs, ins, asm, pattern, itin>, TB, OpSize, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000799class MMXIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000800 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000801 : Ii8<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000802class MMXID<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000803 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000804 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000805class MMXIS<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000806 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000807 : Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasMMX]>;