blob: ebe94a54f2639109e96f01d156a0d766454e224b [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>;
31def MRMInitReg : Format<32>;
Chris Lattnerf7477e52010-02-12 02:06:33 +000032def MRM_C1 : Format<33>;
Chris Lattner140caa72010-02-13 00:41:14 +000033def MRM_C2 : Format<34>;
34def MRM_C3 : Format<35>;
35def MRM_C4 : Format<36>;
36def MRM_C8 : Format<37>;
37def MRM_C9 : Format<38>;
Michael Liao95d944032013-04-11 04:52:28 +000038def MRM_CA : Format<39>;
39def MRM_CB : Format<40>;
40def MRM_E8 : Format<41>;
41def MRM_F0 : Format<42>;
Chris Lattnercea0a8d2010-09-17 18:02:29 +000042def RawFrmImm8 : Format<43>;
43def RawFrmImm16 : Format<44>;
Michael Liao95d944032013-04-11 04:52:28 +000044def MRM_F8 : Format<45>;
45def MRM_F9 : Format<46>;
46def MRM_D0 : Format<47>;
47def MRM_D1 : Format<48>;
48def MRM_D4 : Format<49>;
49def MRM_D5 : Format<50>;
50def MRM_D6 : Format<51>;
51def MRM_D8 : Format<52>;
52def MRM_D9 : Format<53>;
53def MRM_DA : Format<54>;
54def MRM_DB : Format<55>;
55def MRM_DC : Format<56>;
56def MRM_DD : Format<57>;
57def MRM_DE : Format<58>;
58def MRM_DF : Format<59>;
Evan Cheng12c6be82007-07-31 08:04:03 +000059
60// ImmType - This specifies the immediate type used by an instruction. This is
61// part of the ad-hoc solution used to emit machine instruction encodings by our
62// machine code emitter.
63class ImmType<bits<3> val> {
64 bits<3> Value = val;
65}
Chris Lattner12455ca2010-02-12 22:27:07 +000066def NoImm : ImmType<0>;
67def Imm8 : ImmType<1>;
68def Imm8PCRel : ImmType<2>;
69def Imm16 : ImmType<3>;
Chris Lattnerac588122010-07-07 22:27:31 +000070def Imm16PCRel : ImmType<4>;
71def Imm32 : ImmType<5>;
72def Imm32PCRel : ImmType<6>;
73def Imm64 : ImmType<7>;
Evan Cheng12c6be82007-07-31 08:04:03 +000074
75// FPFormat - This specifies what form this FP instruction has. This is used by
76// the Floating-Point stackifier pass.
77class FPFormat<bits<3> val> {
78 bits<3> Value = val;
79}
80def NotFP : FPFormat<0>;
81def ZeroArgFP : FPFormat<1>;
82def OneArgFP : FPFormat<2>;
83def OneArgFPRW : FPFormat<3>;
84def TwoArgFP : FPFormat<4>;
85def CompareFP : FPFormat<5>;
86def CondMovFP : FPFormat<6>;
87def SpecialFP : FPFormat<7>;
88
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000089// Class specifying the SSE execution domain, used by the SSEDomainFix pass.
Jakob Stoklund Olesendbff4e82010-03-30 22:46:53 +000090// Keep in sync with tables in X86InstrInfo.cpp.
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000091class Domain<bits<2> val> {
92 bits<2> Value = val;
93}
94def GenericDomain : Domain<0>;
Jakob Stoklund Olesendbff4e82010-03-30 22:46:53 +000095def SSEPackedSingle : Domain<1>;
96def SSEPackedDouble : Domain<2>;
97def SSEPackedInt : Domain<3>;
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +000098
Elena Demikhovsky003e7d72013-07-28 08:28:38 +000099// Class specifying the vector form of the decompressed
100// displacement of 8-bit.
101class CD8VForm<bits<3> val> {
102 bits<3> Value = val;
103}
104def CD8VF : CD8VForm<0>; // v := VL
105def CD8VH : CD8VForm<1>; // v := VL/2
106def CD8VQ : CD8VForm<2>; // v := VL/4
107def CD8VO : CD8VForm<3>; // v := VL/8
108def CD8VT1 : CD8VForm<4>; // v := 1
109def CD8VT2 : CD8VForm<5>; // v := 2
110def CD8VT4 : CD8VForm<6>; // v := 4
111def CD8VT8 : CD8VForm<7>; // v := 8
112
Evan Cheng12c6be82007-07-31 08:04:03 +0000113// Prefix byte classes which are used to indicate to the ad-hoc machine code
114// emitter that various prefix bytes are required.
115class OpSize { bit hasOpSizePrefix = 1; }
116class AdSize { bit hasAdSizePrefix = 1; }
117class REX_W { bit hasREX_WPrefix = 1; }
Andrew Lenharth0070dd12008-03-01 13:37:02 +0000118class LOCK { bit hasLockPrefix = 1; }
Anton Korobeynikov25897772008-10-11 19:09:15 +0000119class SegFS { bits<2> SegOvrBits = 1; }
120class SegGS { bits<2> SegOvrBits = 2; }
Joerg Sonnenbergercc53d992011-04-04 15:58:30 +0000121class TB { bits<5> Prefix = 1; }
122class REP { bits<5> Prefix = 2; }
123class D8 { bits<5> Prefix = 3; }
124class D9 { bits<5> Prefix = 4; }
125class DA { bits<5> Prefix = 5; }
126class DB { bits<5> Prefix = 6; }
127class DC { bits<5> Prefix = 7; }
128class DD { bits<5> Prefix = 8; }
129class DE { bits<5> Prefix = 9; }
130class DF { bits<5> Prefix = 10; }
131class XD { bits<5> Prefix = 11; }
132class XS { bits<5> Prefix = 12; }
133class T8 { bits<5> Prefix = 13; }
134class TA { bits<5> Prefix = 14; }
Joerg Sonnenbergerfc4789d2011-04-04 16:58:13 +0000135class A6 { bits<5> Prefix = 15; }
136class A7 { bits<5> Prefix = 16; }
Craig Topper96fa5972011-10-16 16:50:08 +0000137class T8XD { bits<5> Prefix = 17; }
138class T8XS { bits<5> Prefix = 18; }
Craig Topper980d5982011-10-23 07:34:00 +0000139class TAXD { bits<5> Prefix = 19; }
Jan Sjödin6dd24882011-12-12 19:12:26 +0000140class XOP8 { bits<5> Prefix = 20; }
141class XOP9 { bits<5> Prefix = 21; }
Yunzhong Gaob8bbcbf2013-09-27 18:38:42 +0000142class XOPA { bits<5> Prefix = 22; }
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000143class VEX { bit hasVEXPrefix = 1; }
Bruno Cardoso Lopes05166742010-07-01 01:20:06 +0000144class VEX_W { bit hasVEX_WPrefix = 1; }
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000145class VEX_4V : VEX { bit hasVEX_4VPrefix = 1; }
Craig Topperaea148c2011-10-16 07:55:05 +0000146class VEX_4VOp3 : VEX { bit hasVEX_4VOp3Prefix = 1; }
Bruno Cardoso Lopese2bd0582010-07-06 22:36:24 +0000147class VEX_I8IMM { bit hasVEX_i8ImmReg = 1; }
Bruno Cardoso Lopesfd8bfcd2010-07-13 21:07:28 +0000148class VEX_L { bit hasVEX_L = 1; }
Craig Topperf18c8962011-10-04 06:30:42 +0000149class VEX_LIG { bit ignoresVEX_L = 1; }
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000150class EVEX : VEX { bit hasEVEXPrefix = 1; }
151class EVEX_4V : VEX_4V { bit hasEVEXPrefix = 1; }
152class EVEX_K { bit hasEVEX_K = 1; }
153class EVEX_KZ : EVEX_K { bit hasEVEX_Z = 1; }
154class EVEX_B { bit hasEVEX_B = 1; }
155class EVEX_V512 { bit hasEVEX_L2 = 1; bit hasVEX_L = 0; }
156class EVEX_CD8<int esize, CD8VForm form> {
157 bits<2> EVEX_CD8E = !if(!eq(esize, 8), 0b00,
158 !if(!eq(esize, 16), 0b01,
159 !if(!eq(esize, 32), 0b10,
160 !if(!eq(esize, 64), 0b11, ?))));
161 bits<3> EVEX_CD8V = form.Value;
162}
Chris Lattner45270db2010-10-03 18:08:05 +0000163class Has3DNow0F0FOpcode { bit has3DNow0F0FOpcode = 1; }
Craig Toppercd93de92011-12-30 04:48:54 +0000164class MemOp4 { bit hasMemOp4Prefix = 1; }
Jan Sjödin6dd24882011-12-12 19:12:26 +0000165class XOP { bit hasXOP_Prefix = 1; }
Evan Cheng12c6be82007-07-31 08:04:03 +0000166class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
Andrew Trick8523b162012-02-01 23:20:51 +0000167 string AsmStr,
168 InstrItinClass itin,
169 Domain d = GenericDomain>
Evan Cheng12c6be82007-07-31 08:04:03 +0000170 : Instruction {
171 let Namespace = "X86";
172
173 bits<8> Opcode = opcod;
174 Format Form = f;
175 bits<6> FormBits = Form.Value;
176 ImmType ImmT = i;
Evan Cheng12c6be82007-07-31 08:04:03 +0000177
178 dag OutOperandList = outs;
179 dag InOperandList = ins;
180 string AsmString = AsmStr;
181
Chris Lattner7ff33462010-10-31 19:22:57 +0000182 // If this is a pseudo instruction, mark it isCodeGenOnly.
183 let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
184
Andrew Trick8523b162012-02-01 23:20:51 +0000185 let Itinerary = itin;
186
Evan Cheng12c6be82007-07-31 08:04:03 +0000187 //
188 // Attributes specific to X86 instructions...
189 //
190 bit hasOpSizePrefix = 0; // Does this inst have a 0x66 prefix?
191 bit hasAdSizePrefix = 0; // Does this inst have a 0x67 prefix?
192
Joerg Sonnenbergercc53d992011-04-04 15:58:30 +0000193 bits<5> Prefix = 0; // Which prefix byte does this inst have?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000194 bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix?
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000195 FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
Dan Gohmana21bdda2008-08-20 13:46:21 +0000196 bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
Anton Korobeynikov25897772008-10-11 19:09:15 +0000197 bits<2> SegOvrBits = 0; // Segment override prefix.
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000198 Domain ExeDomain = d;
Eric Christopher3a8ae232010-11-30 09:11:54 +0000199 bit hasVEXPrefix = 0; // Does this inst require a VEX prefix?
Bruno Cardoso Lopes05166742010-07-01 01:20:06 +0000200 bit hasVEX_WPrefix = 0; // Does this inst set the VEX_W field?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000201 bit hasVEX_4VPrefix = 0; // Does this inst require the VEX.VVVV field?
Craig Topperaea148c2011-10-16 07:55:05 +0000202 bit hasVEX_4VOp3Prefix = 0; // Does this inst require the VEX.VVVV field to
203 // encode the third operand?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000204 bit hasVEX_i8ImmReg = 0; // Does this inst require the last source register
Bruno Cardoso Lopese2bd0582010-07-06 22:36:24 +0000205 // to be encoded in a immediate field?
Eric Christopher3a8ae232010-11-30 09:11:54 +0000206 bit hasVEX_L = 0; // Does this inst use large (256-bit) registers?
Craig Topperf18c8962011-10-04 06:30:42 +0000207 bit ignoresVEX_L = 0; // Does this instruction ignore the L-bit
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000208 bit hasEVEXPrefix = 0; // Does this inst require EVEX form?
209 bit hasEVEX_K = 0; // Does this inst require masking?
210 bit hasEVEX_Z = 0; // Does this inst set the EVEX_Z field?
211 bit hasEVEX_L2 = 0; // Does this inst set the EVEX_L2 field?
212 bit hasEVEX_B = 0; // Does this inst set the EVEX_B field?
213 bits<2> EVEX_CD8E = 0; // Compressed disp8 form - element-size.
214 bits<3> EVEX_CD8V = 0; // Compressed disp8 form - vector-width.
Chris Lattner45270db2010-10-03 18:08:05 +0000215 bit has3DNow0F0FOpcode =0;// Wacky 3dNow! encoding?
Craig Toppercd93de92011-12-30 04:48:54 +0000216 bit hasMemOp4Prefix = 0; // Same bit as VEX_W, but used for swapping operands
Jan Sjödin6dd24882011-12-12 19:12:26 +0000217 bit hasXOP_Prefix = 0; // Does this inst require an XOP prefix?
Jakob Stoklund Olesenb93331f2010-04-05 03:10:20 +0000218
219 // TSFlags layout should be kept in sync with X86InstrInfo.h.
220 let TSFlags{5-0} = FormBits;
221 let TSFlags{6} = hasOpSizePrefix;
222 let TSFlags{7} = hasAdSizePrefix;
Joerg Sonnenbergercc53d992011-04-04 15:58:30 +0000223 let TSFlags{12-8} = Prefix;
224 let TSFlags{13} = hasREX_WPrefix;
225 let TSFlags{16-14} = ImmT.Value;
226 let TSFlags{19-17} = FPForm.Value;
227 let TSFlags{20} = hasLockPrefix;
228 let TSFlags{22-21} = SegOvrBits;
229 let TSFlags{24-23} = ExeDomain.Value;
230 let TSFlags{32-25} = Opcode;
231 let TSFlags{33} = hasVEXPrefix;
232 let TSFlags{34} = hasVEX_WPrefix;
233 let TSFlags{35} = hasVEX_4VPrefix;
Craig Topperaea148c2011-10-16 07:55:05 +0000234 let TSFlags{36} = hasVEX_4VOp3Prefix;
235 let TSFlags{37} = hasVEX_i8ImmReg;
236 let TSFlags{38} = hasVEX_L;
237 let TSFlags{39} = ignoresVEX_L;
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000238 let TSFlags{40} = hasEVEXPrefix;
239 let TSFlags{41} = hasEVEX_K;
240 let TSFlags{42} = hasEVEX_Z;
241 let TSFlags{43} = hasEVEX_L2;
242 let TSFlags{44} = hasEVEX_B;
243 let TSFlags{46-45} = EVEX_CD8E;
244 let TSFlags{49-47} = EVEX_CD8V;
245 let TSFlags{50} = has3DNow0F0FOpcode;
246 let TSFlags{51} = hasMemOp4Prefix;
247 let TSFlags{52} = hasXOP_Prefix;
Evan Cheng12c6be82007-07-31 08:04:03 +0000248}
249
Eric Christopheref62f572010-11-30 08:57:23 +0000250class PseudoI<dag oops, dag iops, list<dag> pattern>
Andrew Trick8523b162012-02-01 23:20:51 +0000251 : X86Inst<0, Pseudo, NoImm, oops, iops, "", NoItinerary> {
Eric Christopheref62f572010-11-30 08:57:23 +0000252 let Pattern = pattern;
253}
254
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000255class I<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000256 list<dag> pattern, InstrItinClass itin = NoItinerary,
Andrew Trick8523b162012-02-01 23:20:51 +0000257 Domain d = GenericDomain>
258 : X86Inst<o, f, NoImm, outs, ins, asm, itin, d> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000259 let Pattern = pattern;
260 let CodeSize = 3;
261}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000262class Ii8 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000263 list<dag> pattern, InstrItinClass itin = NoItinerary,
Andrew Trick8523b162012-02-01 23:20:51 +0000264 Domain d = GenericDomain>
265 : X86Inst<o, f, Imm8, outs, ins, asm, itin, d> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000266 let Pattern = pattern;
267 let CodeSize = 3;
268}
Chris Lattner12455ca2010-02-12 22:27:07 +0000269class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000270 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000271 : X86Inst<o, f, Imm8PCRel, outs, ins, asm, itin> {
Chris Lattner12455ca2010-02-12 22:27:07 +0000272 let Pattern = pattern;
273 let CodeSize = 3;
274}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000275class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000276 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000277 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000278 let Pattern = pattern;
279 let CodeSize = 3;
280}
Sean Callanan04d8cb72009-12-18 00:01:26 +0000281class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000282 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000283 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
Evan Cheng12c6be82007-07-31 08:04:03 +0000284 let Pattern = pattern;
285 let CodeSize = 3;
286}
287
Chris Lattnerac588122010-07-07 22:27:31 +0000288class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000289 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000290 : X86Inst<o, f, Imm16PCRel, outs, ins, asm, itin> {
Chris Lattnerac588122010-07-07 22:27:31 +0000291 let Pattern = pattern;
292 let CodeSize = 3;
293}
294
Chris Lattner12455ca2010-02-12 22:27:07 +0000295class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000296 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000297 : X86Inst<o, f, Imm32PCRel, outs, ins, asm, itin> {
Chris Lattner12455ca2010-02-12 22:27:07 +0000298 let Pattern = pattern;
299 let CodeSize = 3;
300}
301
Evan Cheng12c6be82007-07-31 08:04:03 +0000302// FPStack Instruction Templates:
303// FPI - Floating Point Instruction template.
Preston Gurdfa3f6cb2012-05-02 16:03:35 +0000304class FPI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000305 InstrItinClass itin = NoItinerary>
Preston Gurdfa3f6cb2012-05-02 16:03:35 +0000306 : I<o, F, outs, ins, asm, [], itin> {}
Evan Cheng12c6be82007-07-31 08:04:03 +0000307
Bob Wilsona967c422010-08-26 18:08:11 +0000308// FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
Andrew Trick8523b162012-02-01 23:20:51 +0000309class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000310 InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000311 : X86Inst<0, Pseudo, NoImm, outs, ins, "", itin> {
Jakob Stoklund Olesenf8d7eda2010-03-25 18:52:01 +0000312 let FPForm = fp;
Evan Cheng12c6be82007-07-31 08:04:03 +0000313 let Pattern = pattern;
314}
315
Sean Callanan050e0cd2009-09-15 00:35:17 +0000316// Templates for instructions that use a 16- or 32-bit segmented address as
317// their only operand: lcall (FAR CALL) and ljmp (FAR JMP)
318//
319// Iseg16 - 16-bit segment selector, 16-bit offset
320// Iseg32 - 16-bit segment selector, 32-bit offset
321
322class Iseg16 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000323 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000324 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
Sean Callanan050e0cd2009-09-15 00:35:17 +0000325 let Pattern = pattern;
326 let CodeSize = 3;
327}
328
329class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000330 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000331 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
Sean Callanan050e0cd2009-09-15 00:35:17 +0000332 let Pattern = pattern;
333 let CodeSize = 3;
334}
335
Michael Liaobbd10792012-08-30 16:54:46 +0000336def __xs : XS;
Elena Demikhovskyfad02922013-05-21 12:04:22 +0000337def __xd : XD;
Michael Liaobbd10792012-08-30 16:54:46 +0000338
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000339// SI - SSE 1 & 2 scalar instructions
Andrew Trick8523b162012-02-01 23:20:51 +0000340class SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000341 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000342 : I<o, F, outs, ins, asm, pattern, itin> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000343 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
344 !if(hasVEXPrefix /* VEX */, [UseAVX],
Elena Demikhovskyfad02922013-05-21 12:04:22 +0000345 !if(!eq(Prefix, __xs.Prefix), [UseSSE1],
346 !if(!eq(Prefix, __xd.Prefix), [UseSSE2],
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000347 !if(hasOpSizePrefix, [UseSSE2], [UseSSE1])))));
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000348
349 // AVX instructions have a 'v' prefix in the mnemonic
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000350 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes6b98f712010-06-17 23:05:30 +0000351}
352
Bruno Cardoso Lopes191a1cd2010-06-24 00:32:06 +0000353// SIi8 - SSE 1 & 2 scalar instructions
354class SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000355 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000356 : Ii8<o, F, outs, ins, asm, pattern, itin> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000357 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
358 !if(hasVEXPrefix /* VEX */, [UseAVX],
359 !if(!eq(Prefix, __xs.Prefix), [UseSSE1], [UseSSE2])));
Bruno Cardoso Lopes191a1cd2010-06-24 00:32:06 +0000360
361 // AVX instructions have a 'v' prefix in the mnemonic
362 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
363}
364
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000365// PI - SSE 1 & 2 packed instructions
366class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
Andrew Trick8523b162012-02-01 23:20:51 +0000367 InstrItinClass itin, Domain d>
368 : I<o, F, outs, ins, asm, pattern, itin, d> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000369 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
370 !if(hasVEXPrefix /* VEX */, [HasAVX],
371 !if(hasOpSizePrefix /* OpSize */, [UseSSE2], [UseSSE1])));
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000372
373 // AVX instructions have a 'v' prefix in the mnemonic
Bruno Cardoso Lopes1a890f92010-06-22 22:38:56 +0000374 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes2bfad412010-06-18 23:13:35 +0000375}
376
Michael Liaobbd10792012-08-30 16:54:46 +0000377// MMXPI - SSE 1 & 2 packed instructions with MMX operands
378class MMXPI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
379 InstrItinClass itin, Domain d>
380 : I<o, F, outs, ins, asm, pattern, itin, d> {
381 let Predicates = !if(hasOpSizePrefix /* OpSize */, [HasSSE2], [HasSSE1]);
382}
383
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000384// PIi8 - SSE 1 & 2 packed instructions with immediate
385class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Andrew Trick8523b162012-02-01 23:20:51 +0000386 list<dag> pattern, InstrItinClass itin, Domain d>
387 : Ii8<o, F, outs, ins, asm, pattern, itin, d> {
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000388 let Predicates = !if(hasEVEXPrefix /* EVEX */, [HasAVX512],
389 !if(hasVEXPrefix /* VEX */, [HasAVX],
390 !if(hasOpSizePrefix /* OpSize */, [UseSSE2], [UseSSE1])));
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000391
392 // AVX instructions have a 'v' prefix in the mnemonic
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000393 let AsmString = !if(hasVEXPrefix, !strconcat("v", asm), asm);
Bruno Cardoso Lopes1e13c172010-06-22 23:37:59 +0000394}
395
Evan Cheng12c6be82007-07-31 08:04:03 +0000396// SSE1 Instruction Templates:
397//
398// SSI - SSE1 instructions with XS prefix.
399// PSI - SSE1 instructions with TB prefix.
400// PSIi8 - SSE1 instructions with ImmT == Imm8 and TB prefix.
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000401// VSSI - SSE1 instructions with XS prefix in AVX form.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000402// VPSI - SSE1 instructions with TB prefix in AVX form, packed single.
Evan Cheng12c6be82007-07-31 08:04:03 +0000403
Andrew Trick8523b162012-02-01 23:20:51 +0000404class SSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000405 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000406 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000407class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000408 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000409 : Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000410class PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000411 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000412 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
Michael Liaobbd10792012-08-30 16:54:46 +0000413 Requires<[UseSSE1]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000414class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000415 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000416 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
Michael Liaobbd10792012-08-30 16:54:46 +0000417 Requires<[UseSSE1]>;
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000418class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000419 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000420 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000421 Requires<[HasAVX]>;
Bruno Cardoso Lopesb06f54b2010-06-12 01:23:26 +0000422class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000423 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000424 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedSingle>, TB,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000425 Requires<[HasAVX]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000426
427// SSE2 Instruction Templates:
428//
Bill Wendling76105a42008-08-27 21:32:04 +0000429// SDI - SSE2 instructions with XD prefix.
430// SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
Craig Topperf881d382012-07-30 02:14:02 +0000431// S2SI - SSE2 instructions with XS prefix.
Bill Wendling76105a42008-08-27 21:32:04 +0000432// SSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000433// PDI - SSE2 instructions with TB and OpSize prefixes, packed double domain.
Bill Wendling76105a42008-08-27 21:32:04 +0000434// PDIi8 - SSE2 instructions with ImmT == Imm8 and TB and OpSize prefixes.
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000435// VSDI - SSE2 scalar instructions with XD prefix in AVX form.
436// VPDI - SSE2 vector instructions with TB and OpSize prefixes in AVX form,
437// packed double domain.
438// VS2I - SSE2 scalar instructions with TB and OpSize prefixes in AVX form.
439// S2I - SSE2 scalar instructions with TB and OpSize prefixes.
Michael Liaobbd10792012-08-30 16:54:46 +0000440// MMXSDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix as well as
441// MMX operands.
442// MMXSSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix as well as
443// MMX operands.
Evan Cheng12c6be82007-07-31 08:04:03 +0000444
Andrew Trick8523b162012-02-01 23:20:51 +0000445class SDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000446 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000447 : I<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
Evan Cheng01c7c192007-12-20 19:57:09 +0000448class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000449 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000450 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
Craig Topperf881d382012-07-30 02:14:02 +0000451class S2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000452 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000453 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE2]>;
Craig Topperf881d382012-07-30 02:14:02 +0000454class S2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000455 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000456 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE2]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000457class PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000458 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000459 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000460 Requires<[UseSSE2]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000461class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000462 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000463 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000464 Requires<[UseSSE2]>;
Bruno Cardoso Lopesc2f87b72010-06-08 22:51:23 +0000465class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000466 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000467 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XD,
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000468 Requires<[UseAVX]>;
Craig Topperf881d382012-07-30 02:14:02 +0000469class VS2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000470 list<dag> pattern, InstrItinClass itin = NoItinerary>
Craig Topperf881d382012-07-30 02:14:02 +0000471 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
472 Requires<[HasAVX]>;
Bruno Cardoso Lopesb06f54b2010-06-12 01:23:26 +0000473class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000474 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000475 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedDouble>, TB,
Bruno Cardoso Lopes77a3c442010-07-13 00:38:47 +0000476 OpSize, Requires<[HasAVX]>;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000477class VS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
478 list<dag> pattern, InstrItinClass itin = NoItinerary>
479 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, TB,
Elena Demikhovsky3ce8dbb2013-08-18 13:08:57 +0000480 OpSize, Requires<[UseAVX]>;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000481class S2I<bits<8> o, Format F, dag outs, dag ins, string asm,
482 list<dag> pattern, InstrItinClass itin = NoItinerary>
483 : I<o, F, outs, ins, asm, pattern, itin>, TB,
484 OpSize, Requires<[UseSSE2]>;
Michael Liaobbd10792012-08-30 16:54:46 +0000485class MMXSDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000486 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000487 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasSSE2]>;
488class MMXS2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000489 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000490 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE2]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000491
492// SSE3 Instruction Templates:
493//
494// S3I - SSE3 instructions with TB and OpSize prefixes.
495// S3SI - SSE3 instructions with XS prefix.
496// S3DI - SSE3 instructions with XD prefix.
497
Sean Callanan04d8cb72009-12-18 00:01:26 +0000498class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000499 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000500 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, XS,
Michael Liaobbd10792012-08-30 16:54:46 +0000501 Requires<[UseSSE3]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000502class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000503 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000504 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, XD,
Michael Liaobbd10792012-08-30 16:54:46 +0000505 Requires<[UseSSE3]>;
Andrew Trick8523b162012-02-01 23:20:51 +0000506class S3I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000507 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000508 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB, OpSize,
Michael Liaobbd10792012-08-30 16:54:46 +0000509 Requires<[UseSSE3]>;
Evan Cheng12c6be82007-07-31 08:04:03 +0000510
511
Nate Begeman8ef50212008-02-12 22:51:28 +0000512// SSSE3 Instruction Templates:
513//
514// SS38I - SSSE3 instructions with T8 prefix.
515// SS3AI - SSSE3 instructions with TA prefix.
Michael Liaobbd10792012-08-30 16:54:46 +0000516// MMXSS38I - SSSE3 instructions with T8 prefix and MMX operands.
517// MMXSS3AI - SSSE3 instructions with TA prefix and MMX operands.
Nate Begeman8ef50212008-02-12 22:51:28 +0000518//
519// Note: SSSE3 instructions have 64-bit and 128-bit versions. The 64-bit version
Craig Topper744f6312012-01-09 00:11:29 +0000520// uses the MMX registers. The 64-bit versions are grouped with the MMX
521// classes. They need to be enabled even if AVX is enabled.
Nate Begeman8ef50212008-02-12 22:51:28 +0000522
523class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000524 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000525 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000526 Requires<[UseSSSE3]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000527class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000528 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000529 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000530 Requires<[UseSSSE3]>;
531class MMXSS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000532 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000533 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
534 Requires<[HasSSSE3]>;
535class MMXSS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000536 list<dag> pattern, InstrItinClass itin = NoItinerary>
Michael Liaobbd10792012-08-30 16:54:46 +0000537 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Jakob Stoklund Olesen49e121d2010-03-25 17:25:00 +0000538 Requires<[HasSSSE3]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000539
540// SSE4.1 Instruction Templates:
541//
542// SS48I - SSE 4.1 instructions with T8 prefix.
Evan Cheng96bdbd62008-03-14 07:39:27 +0000543// SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
Nate Begeman8ef50212008-02-12 22:51:28 +0000544//
545class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000546 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000547 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000548 Requires<[UseSSE41]>;
Evan Cheng96bdbd62008-03-14 07:39:27 +0000549class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000550 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000551 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000552 Requires<[UseSSE41]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000553
Nate Begeman55b7bec2008-07-17 16:51:19 +0000554// SSE4.2 Instruction Templates:
555//
556// SS428I - SSE 4.2 instructions with T8 prefix.
557class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000558 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000559 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Michael Liaobbd10792012-08-30 16:54:46 +0000560 Requires<[UseSSE42]>;
Nate Begeman8ef50212008-02-12 22:51:28 +0000561
Craig Topper96fa5972011-10-16 16:50:08 +0000562// SS42FI - SSE 4.2 instructions with T8XD prefix.
Michael Liaobbd10792012-08-30 16:54:46 +0000563// NOTE: 'HasSSE42' is used as SS42FI is only used for CRC32 insns.
Eric Christopher7dfa9f22009-08-08 21:55:08 +0000564class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000565 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000566 : I<o, F, outs, ins, asm, pattern, itin>, T8XD, Requires<[HasSSE42]>;
Craig Topperb9109842012-01-01 19:51:58 +0000567
Eric Christopher9fe912d2009-08-18 22:50:32 +0000568// SS42AI = SSE 4.2 instructions with TA prefix
569class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000570 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000571 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Michael Liaobbd10792012-08-30 16:54:46 +0000572 Requires<[UseSSE42]>;
Eric Christopher9fe912d2009-08-18 22:50:32 +0000573
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000574// AVX Instruction Templates:
575// Instructions introduced in AVX (no SSE equivalent forms)
576//
577// AVX8I - AVX instructions with T8 and OpSize prefix.
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000578// AVXAIi8 - AVX instructions with TA, OpSize prefix and ImmT = Imm8.
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000579class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000580 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000581 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000582 Requires<[HasAVX]>;
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000583class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000584 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000585 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
Bruno Cardoso Lopes3b505842010-07-20 19:44:51 +0000586 Requires<[HasAVX]>;
Bruno Cardoso Lopes14c5fd42010-07-20 00:11:13 +0000587
Craig Topper05d1cb92011-11-06 06:12:20 +0000588// AVX2 Instruction Templates:
589// Instructions introduced in AVX2 (no SSE equivalent forms)
590//
591// AVX28I - AVX2 instructions with T8 and OpSize prefix.
592// AVX2AIi8 - AVX2 instructions with TA, OpSize prefix and ImmT = Imm8.
593class AVX28I<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000594 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000595 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
Craig Topper05d1cb92011-11-06 06:12:20 +0000596 Requires<[HasAVX2]>;
Craig Topperf01f1b52011-11-06 23:04:08 +0000597class AVX2AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000598 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000599 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
Craig Topper05d1cb92011-11-06 06:12:20 +0000600 Requires<[HasAVX2]>;
601
Elena Demikhovsky003e7d72013-07-28 08:28:38 +0000602
603// AVX-512 Instruction Templates:
604// Instructions introduced in AVX-512 (no SSE equivalent forms)
605//
606// AVX5128I - AVX-512 instructions with T8 and OpSize prefix.
607// AVX512AIi8 - AVX-512 instructions with TA, OpSize prefix and ImmT = Imm8.
608// AVX512PDI - AVX-512 instructions with TB, OpSize, double packed.
609// AVX512PSI - AVX-512 instructions with TB, single packed.
610// AVX512XS8I - AVX-512 instructions with T8 and XS prefixes.
611// AVX512XSI - AVX-512 instructions with XS prefix, generic domain.
612// AVX512BI - AVX-512 instructions with TB, OpSize, int packed domain.
613// AVX512SI - AVX-512 scalar instructions with TB and OpSize prefixes.
614
615class AVX5128I<bits<8> o, Format F, dag outs, dag ins, string asm,
616 list<dag> pattern, InstrItinClass itin = NoItinerary>
617 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8, OpSize,
618 Requires<[HasAVX512]>;
619class AVX512XS8I<bits<8> o, Format F, dag outs, dag ins, string asm,
620 list<dag> pattern, InstrItinClass itin = NoItinerary>
621 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8XS,
622 Requires<[HasAVX512]>;
623class AVX512XSI<bits<8> o, Format F, dag outs, dag ins, string asm,
624 list<dag> pattern, InstrItinClass itin = NoItinerary>
625 : I<o, F, outs, ins, asm, pattern, itin>, XS,
626 Requires<[HasAVX512]>;
627class AVX512XDI<bits<8> o, Format F, dag outs, dag ins, string asm,
628 list<dag> pattern, InstrItinClass itin = NoItinerary>
629 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, XD,
630 Requires<[HasAVX512]>;
631class AVX512BI<bits<8> o, Format F, dag outs, dag ins, string asm,
632 list<dag> pattern, InstrItinClass itin = NoItinerary>
633 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
634 Requires<[HasAVX512]>;
635class AVX512BIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
636 list<dag> pattern, InstrItinClass itin = NoItinerary>
637 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
638 Requires<[HasAVX512]>;
639class AVX512SI<bits<8> o, Format F, dag outs, dag ins, string asm,
640 list<dag> pattern, InstrItinClass itin = NoItinerary>
641 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TB, OpSize,
642 Requires<[HasAVX512]>;
643class AVX512AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
644 list<dag> pattern, InstrItinClass itin = NoItinerary>
645 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA, OpSize,
646 Requires<[HasAVX512]>;
647class AVX512Ii8<bits<8> o, Format F, dag outs, dag ins, string asm,
648 list<dag> pattern, InstrItinClass itin = NoItinerary>
649 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>,
650 Requires<[HasAVX512]>;
651class AVX512PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
652 list<dag> pattern, InstrItinClass itin = NoItinerary>
653 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, TB,
654 OpSize, Requires<[HasAVX512]>;
655class AVX512PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
656 list<dag> pattern, InstrItinClass itin = NoItinerary>
657 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, TB,
658 Requires<[HasAVX512]>;
659class AVX512PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
660 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
661 : Ii8<o, F, outs, ins, asm, pattern, itin, d>, Requires<[HasAVX512]>;
662class AVX512PI<bits<8> o, Format F, dag outs, dag ins, string asm,
663 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
664 : I<o, F, outs, ins, asm, pattern, itin, d>, Requires<[HasAVX512]>;
665class AVX512FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
666 list<dag>pattern, InstrItinClass itin = NoItinerary>
667 : I<o, F, outs, ins, asm, pattern, itin>, T8,
668 OpSize, EVEX_4V, Requires<[HasAVX512]>;
669
Eric Christopher2ef63182010-04-02 21:54:27 +0000670// AES Instruction Templates:
671//
672// AES8I
Eric Christopher1290fa02010-04-05 21:14:32 +0000673// These use the same encoding as the SSE4.2 T8 and TA encodings.
Eric Christopher2ef63182010-04-02 21:54:27 +0000674class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
Preston Gurd3fe264d2013-09-13 19:23:28 +0000675 list<dag>pattern, InstrItinClass itin = IIC_AES>
Andrew Trick8523b162012-02-01 23:20:51 +0000676 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8,
Craig Topperc0cef322012-05-01 05:35:02 +0000677 Requires<[HasAES]>;
Eric Christopher2ef63182010-04-02 21:54:27 +0000678
679class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000680 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000681 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Craig Topperc0cef322012-05-01 05:35:02 +0000682 Requires<[HasAES]>;
Eric Christopher2ef63182010-04-02 21:54:27 +0000683
Benjamin Kramera0396e42012-05-31 14:34:17 +0000684// PCLMUL Instruction Templates
685class PCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000686 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000687 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Benjamin Kramera0396e42012-05-31 14:34:17 +0000688 OpSize, Requires<[HasPCLMUL]>;
Eli Friedman415412e2011-07-05 18:21:20 +0000689
Benjamin Kramera0396e42012-05-31 14:34:17 +0000690class AVXPCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000691 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000692 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Benjamin Kramera0396e42012-05-31 14:34:17 +0000693 OpSize, VEX_4V, Requires<[HasAVX, HasPCLMUL]>;
Bruno Cardoso Lopesea0e05a2010-07-23 18:41:12 +0000694
Bruno Cardoso Lopesacd92302010-07-23 00:54:35 +0000695// FMA3 Instruction Templates
696class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000697 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000698 : I<o, F, outs, ins, asm, pattern, itin>, T8,
Nadav Rotemff8c4552013-03-28 22:54:45 +0000699 OpSize, VEX_4V, FMASC, Requires<[HasFMA]>;
Bruno Cardoso Lopesacd92302010-07-23 00:54:35 +0000700
Bruno Cardoso Lopes0f9a1f52011-11-25 19:33:42 +0000701// FMA4 Instruction Templates
702class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000703 list<dag>pattern, InstrItinClass itin = NoItinerary>
Benjamin Kramerfee7d212013-01-22 18:05:59 +0000704 : Ii8<o, F, outs, ins, asm, pattern, itin>, TA,
Nadav Rotemff8c4552013-03-28 22:54:45 +0000705 OpSize, VEX_4V, VEX_I8IMM, FMASC, Requires<[HasFMA4]>;
Bruno Cardoso Lopes0f9a1f52011-11-25 19:33:42 +0000706
Jan Sjödin7c0face2011-12-12 19:37:49 +0000707// XOP 2, 3 and 4 Operand Instruction Template
708class IXOP<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000709 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000710 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000711 XOP, XOP9, Requires<[HasXOP]>;
712
713// XOP 2, 3 and 4 Operand Instruction Templates with imm byte
714class IXOPi8<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000715 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000716 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000717 XOP, XOP8, Requires<[HasXOP]>;
718
719// XOP 5 operand instruction (VEX encoding!)
720class IXOP5<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000721 list<dag>pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000722 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TA,
Jan Sjödin7c0face2011-12-12 19:37:49 +0000723 OpSize, VEX_4V, VEX_I8IMM, Requires<[HasXOP]>;
724
Evan Cheng12c6be82007-07-31 08:04:03 +0000725// X86-64 Instruction templates...
726//
727
Andrew Trick8523b162012-02-01 23:20:51 +0000728class RI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000729 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000730 : I<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000731class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000732 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000733 : Ii8<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000734class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000735 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000736 : Ii32<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000737
738class RIi64<bits<8> o, Format f, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000739 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000740 : X86Inst<o, f, Imm64, outs, ins, asm, itin>, REX_W {
Evan Cheng12c6be82007-07-31 08:04:03 +0000741 let Pattern = pattern;
742 let CodeSize = 3;
743}
744
Kevin Enderby285da022013-07-22 21:25:31 +0000745class RIi64_NOREX<bits<8> o, Format f, dag outs, dag ins, string asm,
746 list<dag> pattern, InstrItinClass itin = NoItinerary>
747 : X86Inst<o, f, Imm64, outs, ins, asm, itin> {
748 let Pattern = pattern;
749 let CodeSize = 3;
750}
751
Evan Cheng12c6be82007-07-31 08:04:03 +0000752class RSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000753 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000754 : SSI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000755class RSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000756 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000757 : SDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000758class RPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000759 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000760 : PDI<o, F, outs, ins, asm, pattern, itin>, REX_W;
Bruno Cardoso Lopes123dff02011-07-25 23:05:25 +0000761class VRPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000762 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000763 : VPDI<o, F, outs, ins, asm, pattern, itin>, VEX_W;
Elena Demikhovsky89703c02013-06-09 07:37:10 +0000764class RS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
765 list<dag> pattern, InstrItinClass itin = NoItinerary>
766 : S2I<o, F, outs, ins, asm, pattern, itin>, REX_W;
767class VRS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
768 list<dag> pattern, InstrItinClass itin = NoItinerary>
769 : VS2I<o, F, outs, ins, asm, pattern, itin>, VEX_W;
Evan Cheng12c6be82007-07-31 08:04:03 +0000770
771// MMX Instruction templates
772//
773
774// MMXI - MMX instructions with TB prefix.
Anton Korobeynikov31099512008-08-23 15:53:19 +0000775// MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
Evan Cheng12c6be82007-07-31 08:04:03 +0000776// MMX2I - MMX / SSE2 instructions with TB and OpSize prefixes.
777// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
778// MMXIi8 - MMX instructions with ImmT == Imm8 and TB prefix.
779// MMXID - MMX instructions with XD prefix.
780// MMXIS - MMX instructions with XS prefix.
Sean Callanan04d8cb72009-12-18 00:01:26 +0000781class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000782 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000783 : I<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000784class MMXI64<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,In64BitMode]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000787class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
Jakob Stoklund Olesen4d39e812013-03-25 23:12:41 +0000788 list<dag> pattern, InstrItinClass itin = NoItinerary>
Andrew Trick8523b162012-02-01 23:20:51 +0000789 : I<o, F, outs, ins, asm, pattern, itin>, TB, REX_W, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000790class MMX2I<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, OpSize, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000793class MMXIi8<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 : Ii8<o, F, outs, ins, asm, pattern, itin>, TB, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000796class MMXID<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 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasMMX]>;
Sean Callanan04d8cb72009-12-18 00:01:26 +0000799class MMXIS<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>, XS, Requires<[HasMMX]>;