0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 //===-- X86InstrFormats.td - X86 Instruction Formats -------*- tablegen -*-===//
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 // The LLVM Compiler Infrastructure
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 // This file is distributed under the University of Illinois Open Source
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 // License. See LICENSE.TXT for details.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 //===----------------------------------------------------------------------===//
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 //===----------------------------------------------------------------------===//
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 // X86 Instruction Format Definitions.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 // Format specifies the encoding used by the instruction. This is part of the
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 // ad-hoc solution used to emit machine instruction encodings by our machine
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 // code emitter.
|
77
|
17 class Format<bits<7> val> {
|
|
18 bits<7> Value = val;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21 def Pseudo : Format<0>; def RawFrm : Format<1>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 def AddRegFrm : Format<2>; def MRMDestReg : Format<3>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 def MRMDestMem : Format<4>; def MRMSrcReg : Format<5>;
|
77
|
24 def MRMSrcMem : Format<6>; def RawFrmMemOffs : Format<7>;
|
|
25 def RawFrmSrc : Format<8>; def RawFrmDst : Format<9>;
|
|
26 def RawFrmDstSrc: Format<10>;
|
|
27 def RawFrmImm8 : Format<11>;
|
|
28 def RawFrmImm16 : Format<12>;
|
|
29 def MRMXr : Format<14>; def MRMXm : Format<15>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 def MRM0r : Format<16>; def MRM1r : Format<17>; def MRM2r : Format<18>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 def MRM3r : Format<19>; def MRM4r : Format<20>; def MRM5r : Format<21>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 def MRM6r : Format<22>; def MRM7r : Format<23>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 def MRM0m : Format<24>; def MRM1m : Format<25>; def MRM2m : Format<26>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 def MRM3m : Format<27>; def MRM4m : Format<28>; def MRM5m : Format<29>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 def MRM6m : Format<30>; def MRM7m : Format<31>;
|
77
|
36 def MRM_C0 : Format<32>; def MRM_C1 : Format<33>; def MRM_C2 : Format<34>;
|
83
|
37 def MRM_C3 : Format<35>; def MRM_C4 : Format<36>; def MRM_C5 : Format<37>;
|
|
38 def MRM_C6 : Format<38>; def MRM_C7 : Format<39>; def MRM_C8 : Format<40>;
|
|
39 def MRM_C9 : Format<41>; def MRM_CA : Format<42>; def MRM_CB : Format<43>;
|
|
40 def MRM_CC : Format<44>; def MRM_CD : Format<45>; def MRM_CE : Format<46>;
|
|
41 def MRM_CF : Format<47>; def MRM_D0 : Format<48>; def MRM_D1 : Format<49>;
|
|
42 def MRM_D2 : Format<50>; def MRM_D3 : Format<51>; def MRM_D4 : Format<52>;
|
|
43 def MRM_D5 : Format<53>; def MRM_D6 : Format<54>; def MRM_D7 : Format<55>;
|
|
44 def MRM_D8 : Format<56>; def MRM_D9 : Format<57>; def MRM_DA : Format<58>;
|
|
45 def MRM_DB : Format<59>; def MRM_DC : Format<60>; def MRM_DD : Format<61>;
|
|
46 def MRM_DE : Format<62>; def MRM_DF : Format<63>; def MRM_E0 : Format<64>;
|
|
47 def MRM_E1 : Format<65>; def MRM_E2 : Format<66>; def MRM_E3 : Format<67>;
|
|
48 def MRM_E4 : Format<68>; def MRM_E5 : Format<69>; def MRM_E6 : Format<70>;
|
|
49 def MRM_E7 : Format<71>; def MRM_E8 : Format<72>; def MRM_E9 : Format<73>;
|
|
50 def MRM_EA : Format<74>; def MRM_EB : Format<75>; def MRM_EC : Format<76>;
|
|
51 def MRM_ED : Format<77>; def MRM_EE : Format<78>; def MRM_EF : Format<79>;
|
|
52 def MRM_F0 : Format<80>; def MRM_F1 : Format<81>; def MRM_F2 : Format<82>;
|
|
53 def MRM_F3 : Format<83>; def MRM_F4 : Format<84>; def MRM_F5 : Format<85>;
|
|
54 def MRM_F6 : Format<86>; def MRM_F7 : Format<87>; def MRM_F8 : Format<88>;
|
|
55 def MRM_F9 : Format<89>; def MRM_FA : Format<90>; def MRM_FB : Format<91>;
|
|
56 def MRM_FC : Format<92>; def MRM_FD : Format<93>; def MRM_FE : Format<94>;
|
|
57 def MRM_FF : Format<95>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59 // ImmType - This specifies the immediate type used by an instruction. This is
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 // part of the ad-hoc solution used to emit machine instruction encodings by our
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
61 // machine code emitter.
|
77
|
62 class ImmType<bits<4> val> {
|
|
63 bits<4> Value = val;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 def NoImm : ImmType<0>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66 def Imm8 : ImmType<1>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 def Imm8PCRel : ImmType<2>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
68 def Imm16 : ImmType<3>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
69 def Imm16PCRel : ImmType<4>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
70 def Imm32 : ImmType<5>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
71 def Imm32PCRel : ImmType<6>;
|
77
|
72 def Imm32S : ImmType<7>;
|
|
73 def Imm64 : ImmType<8>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
74
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
75 // FPFormat - This specifies what form this FP instruction has. This is used by
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
76 // the Floating-Point stackifier pass.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
77 class FPFormat<bits<3> val> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
78 bits<3> Value = val;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
79 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
80 def NotFP : FPFormat<0>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
81 def ZeroArgFP : FPFormat<1>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
82 def OneArgFP : FPFormat<2>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
83 def OneArgFPRW : FPFormat<3>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
84 def TwoArgFP : FPFormat<4>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
85 def CompareFP : FPFormat<5>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
86 def CondMovFP : FPFormat<6>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
87 def SpecialFP : FPFormat<7>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
88
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
89 // Class specifying the SSE execution domain, used by the SSEDomainFix pass.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
90 // Keep in sync with tables in X86InstrInfo.cpp.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
91 class Domain<bits<2> val> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
92 bits<2> Value = val;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
93 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
94 def GenericDomain : Domain<0>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
95 def SSEPackedSingle : Domain<1>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
96 def SSEPackedDouble : Domain<2>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
97 def SSEPackedInt : Domain<3>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
98
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
99 // Class specifying the vector form of the decompressed
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
100 // displacement of 8-bit.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
101 class CD8VForm<bits<3> val> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
102 bits<3> Value = val;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
103 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
104 def CD8VF : CD8VForm<0>; // v := VL
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
105 def CD8VH : CD8VForm<1>; // v := VL/2
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
106 def CD8VQ : CD8VForm<2>; // v := VL/4
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
107 def CD8VO : CD8VForm<3>; // v := VL/8
|
83
|
108 // The tuple (subvector) forms.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
109 def CD8VT1 : CD8VForm<4>; // v := 1
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
110 def CD8VT2 : CD8VForm<5>; // v := 2
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
111 def CD8VT4 : CD8VForm<6>; // v := 4
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
112 def CD8VT8 : CD8VForm<7>; // v := 8
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
113
|
77
|
114 // Class specifying the prefix used an opcode extension.
|
|
115 class Prefix<bits<3> val> {
|
|
116 bits<3> Value = val;
|
|
117 }
|
|
118 def NoPrfx : Prefix<0>;
|
|
119 def PS : Prefix<1>;
|
|
120 def PD : Prefix<2>;
|
|
121 def XS : Prefix<3>;
|
|
122 def XD : Prefix<4>;
|
|
123
|
|
124 // Class specifying the opcode map.
|
|
125 class Map<bits<3> val> {
|
|
126 bits<3> Value = val;
|
|
127 }
|
|
128 def OB : Map<0>;
|
|
129 def TB : Map<1>;
|
|
130 def T8 : Map<2>;
|
|
131 def TA : Map<3>;
|
|
132 def XOP8 : Map<4>;
|
|
133 def XOP9 : Map<5>;
|
|
134 def XOPA : Map<6>;
|
|
135
|
|
136 // Class specifying the encoding
|
|
137 class Encoding<bits<2> val> {
|
|
138 bits<2> Value = val;
|
|
139 }
|
|
140 def EncNormal : Encoding<0>;
|
|
141 def EncVEX : Encoding<1>;
|
|
142 def EncXOP : Encoding<2>;
|
|
143 def EncEVEX : Encoding<3>;
|
|
144
|
|
145 // Operand size for encodings that change based on mode.
|
|
146 class OperandSize<bits<2> val> {
|
|
147 bits<2> Value = val;
|
|
148 }
|
|
149 def OpSizeFixed : OperandSize<0>; // Never needs a 0x66 prefix.
|
|
150 def OpSize16 : OperandSize<1>; // Needs 0x66 prefix in 32-bit mode.
|
|
151 def OpSize32 : OperandSize<2>; // Needs 0x66 prefix in 16-bit mode.
|
|
152
|
83
|
153 // Address size for encodings that change based on mode.
|
|
154 class AddressSize<bits<2> val> {
|
|
155 bits<2> Value = val;
|
|
156 }
|
|
157 def AdSizeX : AddressSize<0>; // Address size determined using addr operand.
|
|
158 def AdSize16 : AddressSize<1>; // Encodes a 16-bit address.
|
|
159 def AdSize32 : AddressSize<2>; // Encodes a 32-bit address.
|
|
160 def AdSize64 : AddressSize<3>; // Encodes a 64-bit address.
|
|
161
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
162 // Prefix byte classes which are used to indicate to the ad-hoc machine code
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
163 // emitter that various prefix bytes are required.
|
77
|
164 class OpSize16 { OperandSize OpSize = OpSize16; }
|
|
165 class OpSize32 { OperandSize OpSize = OpSize32; }
|
83
|
166 class AdSize16 { AddressSize AdSize = AdSize16; }
|
|
167 class AdSize32 { AddressSize AdSize = AdSize32; }
|
|
168 class AdSize64 { AddressSize AdSize = AdSize64; }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
169 class REX_W { bit hasREX_WPrefix = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
170 class LOCK { bit hasLockPrefix = 1; }
|
77
|
171 class REP { bit hasREPPrefix = 1; }
|
|
172 class TB { Map OpMap = TB; }
|
|
173 class T8 { Map OpMap = T8; }
|
|
174 class TA { Map OpMap = TA; }
|
|
175 class XOP8 { Map OpMap = XOP8; Prefix OpPrefix = PS; }
|
|
176 class XOP9 { Map OpMap = XOP9; Prefix OpPrefix = PS; }
|
|
177 class XOPA { Map OpMap = XOPA; Prefix OpPrefix = PS; }
|
|
178 class OBXS { Prefix OpPrefix = XS; }
|
|
179 class PS : TB { Prefix OpPrefix = PS; }
|
|
180 class PD : TB { Prefix OpPrefix = PD; }
|
|
181 class XD : TB { Prefix OpPrefix = XD; }
|
|
182 class XS : TB { Prefix OpPrefix = XS; }
|
|
183 class T8PS : T8 { Prefix OpPrefix = PS; }
|
|
184 class T8PD : T8 { Prefix OpPrefix = PD; }
|
|
185 class T8XD : T8 { Prefix OpPrefix = XD; }
|
|
186 class T8XS : T8 { Prefix OpPrefix = XS; }
|
|
187 class TAPS : TA { Prefix OpPrefix = PS; }
|
|
188 class TAPD : TA { Prefix OpPrefix = PD; }
|
|
189 class TAXD : TA { Prefix OpPrefix = XD; }
|
|
190 class VEX { Encoding OpEnc = EncVEX; }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
191 class VEX_W { bit hasVEX_WPrefix = 1; }
|
77
|
192 class VEX_4V : VEX { bit hasVEX_4V = 1; }
|
|
193 class VEX_4VOp3 : VEX { bit hasVEX_4VOp3 = 1; }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
194 class VEX_I8IMM { bit hasVEX_i8ImmReg = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
195 class VEX_L { bit hasVEX_L = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
196 class VEX_LIG { bit ignoresVEX_L = 1; }
|
77
|
197 class EVEX : VEX { Encoding OpEnc = EncEVEX; }
|
|
198 class EVEX_4V : VEX_4V { Encoding OpEnc = EncEVEX; }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
199 class EVEX_K { bit hasEVEX_K = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
200 class EVEX_KZ : EVEX_K { bit hasEVEX_Z = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
201 class EVEX_B { bit hasEVEX_B = 1; }
|
77
|
202 class EVEX_RC { bit hasEVEX_RC = 1; }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
203 class EVEX_V512 { bit hasEVEX_L2 = 1; bit hasVEX_L = 0; }
|
77
|
204 class EVEX_V256 { bit hasEVEX_L2 = 0; bit hasVEX_L = 1; }
|
|
205 class EVEX_V128 { bit hasEVEX_L2 = 0; bit hasVEX_L = 0; }
|
|
206
|
|
207 // Specify AVX512 8-bit compressed displacement encoding based on the vector
|
|
208 // element size in bits (8, 16, 32, 64) and the CDisp8 form.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
209 class EVEX_CD8<int esize, CD8VForm form> {
|
77
|
210 int CD8_EltSize = !srl(esize, 3);
|
|
211 bits<3> CD8_Form = form.Value;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
212 }
|
77
|
213
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
214 class Has3DNow0F0FOpcode { bit has3DNow0F0FOpcode = 1; }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
215 class MemOp4 { bit hasMemOp4Prefix = 1; }
|
77
|
216 class XOP { Encoding OpEnc = EncXOP; }
|
|
217 class XOP_4V : XOP { bit hasVEX_4V = 1; }
|
|
218 class XOP_4VOp3 : XOP { bit hasVEX_4VOp3 = 1; }
|
|
219
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
220 class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
221 string AsmStr,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
222 InstrItinClass itin,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
223 Domain d = GenericDomain>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
224 : Instruction {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
225 let Namespace = "X86";
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
226
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
227 bits<8> Opcode = opcod;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
228 Format Form = f;
|
77
|
229 bits<7> FormBits = Form.Value;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
230 ImmType ImmT = i;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
231
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
232 dag OutOperandList = outs;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
233 dag InOperandList = ins;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
234 string AsmString = AsmStr;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
235
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
236 // If this is a pseudo instruction, mark it isCodeGenOnly.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
237 let isCodeGenOnly = !eq(!cast<string>(f), "Pseudo");
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
238
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
239 let Itinerary = itin;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
240
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
241 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
242 // Attributes specific to X86 instructions...
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
243 //
|
77
|
244 bit ForceDisassemble = 0; // Force instruction to disassemble even though it's
|
|
245 // isCodeGenonly. Needed to hide an ambiguous
|
|
246 // AsmString from the parser, but still disassemble.
|
|
247
|
|
248 OperandSize OpSize = OpSizeFixed; // Does this instruction's encoding change
|
83
|
249 // based on operand size of the mode?
|
77
|
250 bits<2> OpSizeBits = OpSize.Value;
|
83
|
251 AddressSize AdSize = AdSizeX; // Does this instruction's encoding change
|
|
252 // based on address size of the mode?
|
|
253 bits<2> AdSizeBits = AdSize.Value;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
254
|
77
|
255 Prefix OpPrefix = NoPrfx; // Which prefix byte does this inst have?
|
|
256 bits<3> OpPrefixBits = OpPrefix.Value;
|
|
257 Map OpMap = OB; // Which opcode map does this inst have?
|
|
258 bits<3> OpMapBits = OpMap.Value;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
259 bit hasREX_WPrefix = 0; // Does this inst require the REX.W prefix?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
260 FPFormat FPForm = NotFP; // What flavor of FP instruction is this?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
261 bit hasLockPrefix = 0; // Does this inst have a 0xF0 prefix?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
262 Domain ExeDomain = d;
|
77
|
263 bit hasREPPrefix = 0; // Does this inst have a REP prefix?
|
|
264 Encoding OpEnc = EncNormal; // Encoding used by this instruction
|
|
265 bits<2> OpEncBits = OpEnc.Value;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
266 bit hasVEX_WPrefix = 0; // Does this inst set the VEX_W field?
|
77
|
267 bit hasVEX_4V = 0; // Does this inst require the VEX.VVVV field?
|
|
268 bit hasVEX_4VOp3 = 0; // Does this inst require the VEX.VVVV field to
|
|
269 // encode the third operand?
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
270 bit hasVEX_i8ImmReg = 0; // Does this inst require the last source register
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
271 // to be encoded in a immediate field?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
272 bit hasVEX_L = 0; // Does this inst use large (256-bit) registers?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
273 bit ignoresVEX_L = 0; // Does this instruction ignore the L-bit
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
274 bit hasEVEX_K = 0; // Does this inst require masking?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
275 bit hasEVEX_Z = 0; // Does this inst set the EVEX_Z field?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
276 bit hasEVEX_L2 = 0; // Does this inst set the EVEX_L2 field?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
277 bit hasEVEX_B = 0; // Does this inst set the EVEX_B field?
|
77
|
278 bits<3> CD8_Form = 0; // Compressed disp8 form - vector-width.
|
|
279 // Declare it int rather than bits<4> so that all bits are defined when
|
|
280 // assigning to bits<7>.
|
|
281 int CD8_EltSize = 0; // Compressed disp8 form - element-size in bytes.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
282 bit has3DNow0F0FOpcode =0;// Wacky 3dNow! encoding?
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
283 bit hasMemOp4Prefix = 0; // Same bit as VEX_W, but used for swapping operands
|
77
|
284 bit hasEVEX_RC = 0; // Explicitly specified rounding control in FP instruction.
|
|
285
|
|
286 bits<2> EVEX_LL;
|
|
287 let EVEX_LL{0} = hasVEX_L;
|
|
288 let EVEX_LL{1} = hasEVEX_L2;
|
|
289 // Vector size in bytes.
|
|
290 bits<7> VectSize = !shl(16, EVEX_LL);
|
|
291
|
|
292 // The scaling factor for AVX512's compressed displacement is either
|
|
293 // - the size of a power-of-two number of elements or
|
|
294 // - the size of a single element for broadcasts or
|
|
295 // - the total vector size divided by a power-of-two number.
|
|
296 // Possible values are: 0 (non-AVX512 inst), 1, 2, 4, 8, 16, 32 and 64.
|
|
297 bits<7> CD8_Scale = !if (!eq (OpEnc.Value, EncEVEX.Value),
|
|
298 !if (CD8_Form{2},
|
|
299 !shl(CD8_EltSize, CD8_Form{1-0}),
|
|
300 !if (hasEVEX_B,
|
|
301 CD8_EltSize,
|
|
302 !srl(VectSize, CD8_Form{1-0}))), 0);
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
303
|
83
|
304 // TSFlags layout should be kept in sync with X86BaseInfo.h.
|
77
|
305 let TSFlags{6-0} = FormBits;
|
|
306 let TSFlags{8-7} = OpSizeBits;
|
83
|
307 let TSFlags{10-9} = AdSizeBits;
|
|
308 let TSFlags{13-11} = OpPrefixBits;
|
|
309 let TSFlags{16-14} = OpMapBits;
|
|
310 let TSFlags{17} = hasREX_WPrefix;
|
|
311 let TSFlags{21-18} = ImmT.Value;
|
|
312 let TSFlags{24-22} = FPForm.Value;
|
|
313 let TSFlags{25} = hasLockPrefix;
|
|
314 let TSFlags{26} = hasREPPrefix;
|
|
315 let TSFlags{28-27} = ExeDomain.Value;
|
|
316 let TSFlags{30-29} = OpEncBits;
|
|
317 let TSFlags{38-31} = Opcode;
|
|
318 let TSFlags{39} = hasVEX_WPrefix;
|
|
319 let TSFlags{40} = hasVEX_4V;
|
|
320 let TSFlags{41} = hasVEX_4VOp3;
|
|
321 let TSFlags{42} = hasVEX_i8ImmReg;
|
|
322 let TSFlags{43} = hasVEX_L;
|
|
323 let TSFlags{44} = ignoresVEX_L;
|
|
324 let TSFlags{45} = hasEVEX_K;
|
|
325 let TSFlags{46} = hasEVEX_Z;
|
|
326 let TSFlags{47} = hasEVEX_L2;
|
|
327 let TSFlags{48} = hasEVEX_B;
|
77
|
328 // If we run out of TSFlags bits, it's possible to encode this in 3 bits.
|
83
|
329 let TSFlags{55-49} = CD8_Scale;
|
|
330 let TSFlags{56} = has3DNow0F0FOpcode;
|
|
331 let TSFlags{57} = hasMemOp4Prefix;
|
|
332 let TSFlags{58} = hasEVEX_RC;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
333 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
334
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
335 class PseudoI<dag oops, dag iops, list<dag> pattern>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
336 : X86Inst<0, Pseudo, NoImm, oops, iops, "", NoItinerary> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
337 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
338 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
339
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
340 class I<bits<8> o, Format f, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
341 list<dag> pattern, InstrItinClass itin = NoItinerary,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
342 Domain d = GenericDomain>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
343 : X86Inst<o, f, NoImm, outs, ins, asm, itin, d> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
344 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
345 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
346 }
|
83
|
347 class Ii8 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
348 list<dag> pattern, InstrItinClass itin = NoItinerary,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
349 Domain d = GenericDomain>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
350 : X86Inst<o, f, Imm8, outs, ins, asm, itin, d> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
351 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
352 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
353 }
|
83
|
354 class Ii8PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
355 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
356 : X86Inst<o, f, Imm8PCRel, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
357 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
358 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
359 }
|
83
|
360 class Ii16<bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
361 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
362 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
363 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
364 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
365 }
|
83
|
366 class Ii32<bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
367 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
368 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
369 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
370 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
371 }
|
77
|
372 class Ii32S<bits<8> o, Format f, dag outs, dag ins, string asm,
|
|
373 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
|
374 : X86Inst<o, f, Imm32S, outs, ins, asm, itin> {
|
|
375 let Pattern = pattern;
|
|
376 let CodeSize = 3;
|
|
377 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
378
|
83
|
379 class Ii16PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
380 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
381 : X86Inst<o, f, Imm16PCRel, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
382 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
383 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
384 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
385
|
83
|
386 class Ii32PCRel<bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
387 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
388 : X86Inst<o, f, Imm32PCRel, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
389 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
390 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
391 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
392
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
393 // FPStack Instruction Templates:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
394 // FPI - Floating Point Instruction template.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
395 class FPI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
396 InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
397 : I<o, F, outs, ins, asm, [], itin> {}
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
398
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
399 // FpI_ - Floating Point Pseudo Instruction template. Not Predicated.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
400 class FpI_<dag outs, dag ins, FPFormat fp, list<dag> pattern,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
401 InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
402 : X86Inst<0, Pseudo, NoImm, outs, ins, "", itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
403 let FPForm = fp;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
404 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
405 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
406
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
407 // Templates for instructions that use a 16- or 32-bit segmented address as
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
408 // their only operand: lcall (FAR CALL) and ljmp (FAR JMP)
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
409 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
410 // Iseg16 - 16-bit segment selector, 16-bit offset
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
411 // Iseg32 - 16-bit segment selector, 32-bit offset
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
412
|
83
|
413 class Iseg16 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
414 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
415 : X86Inst<o, f, Imm16, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
416 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
417 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
418 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
419
|
83
|
420 class Iseg32 <bits<8> o, Format f, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
421 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
422 : X86Inst<o, f, Imm32, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
423 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
424 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
425 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
426
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
427 // SI - SSE 1 & 2 scalar instructions
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
428 class SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
83
|
429 list<dag> pattern, InstrItinClass itin = NoItinerary,
|
|
430 Domain d = GenericDomain>
|
|
431 : I<o, F, outs, ins, asm, pattern, itin, d> {
|
77
|
432 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
|
|
433 !if(!eq(OpEnc.Value, EncVEX.Value), [UseAVX],
|
|
434 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
|
|
435 !if(!eq(OpPrefix.Value, XD.Value), [UseSSE2],
|
|
436 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
|
|
437 [UseSSE1])))));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
438
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
439 // AVX instructions have a 'v' prefix in the mnemonic
|
77
|
440 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
|
|
441 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
|
|
442 asm));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
443 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
444
|
95
|
445 // SI - SSE 1 & 2 scalar intrinsics - vex form available on AVX512
|
|
446 class SI_Int<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
447 list<dag> pattern, InstrItinClass itin = NoItinerary,
|
|
448 Domain d = GenericDomain>
|
|
449 : I<o, F, outs, ins, asm, pattern, itin, d> {
|
|
450 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
|
|
451 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
|
|
452 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
|
|
453 !if(!eq(OpPrefix.Value, XD.Value), [UseSSE2],
|
|
454 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
|
|
455 [UseSSE1])))));
|
|
456
|
|
457 // AVX instructions have a 'v' prefix in the mnemonic
|
|
458 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
|
|
459 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
|
|
460 asm));
|
|
461 }
|
|
462 // SIi8 - SSE 1 & 2 scalar instructions - vex form available on AVX512
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
463 class SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
464 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
465 : Ii8<o, F, outs, ins, asm, pattern, itin> {
|
77
|
466 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
|
95
|
467 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
|
77
|
468 !if(!eq(OpPrefix.Value, XS.Value), [UseSSE1],
|
|
469 [UseSSE2])));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
470
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
471 // AVX instructions have a 'v' prefix in the mnemonic
|
77
|
472 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
|
|
473 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
|
|
474 asm));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
475 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
476
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
477 // PI - SSE 1 & 2 packed instructions
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
478 class PI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
479 InstrItinClass itin, Domain d>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
480 : I<o, F, outs, ins, asm, pattern, itin, d> {
|
77
|
481 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
|
|
482 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
|
|
483 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
|
|
484 [UseSSE1])));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
485
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
486 // AVX instructions have a 'v' prefix in the mnemonic
|
77
|
487 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
|
|
488 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
|
|
489 asm));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
490 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
491
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
492 // MMXPI - SSE 1 & 2 packed instructions with MMX operands
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
493 class MMXPI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
494 InstrItinClass itin, Domain d>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
495 : I<o, F, outs, ins, asm, pattern, itin, d> {
|
77
|
496 let Predicates = !if(!eq(OpPrefix.Value, PD.Value), [HasSSE2],
|
|
497 [HasSSE1]);
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
498 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
499
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
500 // PIi8 - SSE 1 & 2 packed instructions with immediate
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
501 class PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
502 list<dag> pattern, InstrItinClass itin, Domain d>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
503 : Ii8<o, F, outs, ins, asm, pattern, itin, d> {
|
77
|
504 let Predicates = !if(!eq(OpEnc.Value, EncEVEX.Value), [HasAVX512],
|
|
505 !if(!eq(OpEnc.Value, EncVEX.Value), [HasAVX],
|
|
506 !if(!eq(OpPrefix.Value, PD.Value), [UseSSE2],
|
|
507 [UseSSE1])));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
508
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
509 // AVX instructions have a 'v' prefix in the mnemonic
|
77
|
510 let AsmString = !if(!eq(OpEnc.Value, EncEVEX.Value), !strconcat("v", asm),
|
|
511 !if(!eq(OpEnc.Value, EncVEX.Value), !strconcat("v", asm),
|
|
512 asm));
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
513 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
514
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
515 // SSE1 Instruction Templates:
|
83
|
516 //
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
517 // SSI - SSE1 instructions with XS prefix.
|
77
|
518 // PSI - SSE1 instructions with PS prefix.
|
|
519 // PSIi8 - SSE1 instructions with ImmT == Imm8 and PS prefix.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
520 // VSSI - SSE1 instructions with XS prefix in AVX form.
|
77
|
521 // VPSI - SSE1 instructions with PS prefix in AVX form, packed single.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
522
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
523 class SSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
524 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
525 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
526 class SSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
527 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
528 : Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE1]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
529 class PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
530 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
531 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, PS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
532 Requires<[UseSSE1]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
533 class PSIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
534 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
535 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, PS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
536 Requires<[UseSSE1]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
537 class VSSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
538 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
539 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
540 Requires<[HasAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
541 class VPSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
542 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
543 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedSingle>, PS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
544 Requires<[HasAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
545
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
546 // SSE2 Instruction Templates:
|
83
|
547 //
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
548 // SDI - SSE2 instructions with XD prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
549 // SDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
550 // S2SI - SSE2 instructions with XS prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
551 // SSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix.
|
77
|
552 // PDI - SSE2 instructions with PD prefix, packed double domain.
|
|
553 // PDIi8 - SSE2 instructions with ImmT == Imm8 and PD prefix.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
554 // VSDI - SSE2 scalar instructions with XD prefix in AVX form.
|
77
|
555 // VPDI - SSE2 vector instructions with PD prefix in AVX form,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
556 // packed double domain.
|
77
|
557 // VS2I - SSE2 scalar instructions with PD prefix in AVX form.
|
|
558 // S2I - SSE2 scalar instructions with PD prefix.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
559 // MMXSDIi8 - SSE2 instructions with ImmT == Imm8 and XD prefix as well as
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
560 // MMX operands.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
561 // MMXSSDIi8 - SSE2 instructions with ImmT == Imm8 and XS prefix as well as
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
562 // MMX operands.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
563
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
564 class SDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
565 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
566 : I<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
567 class SDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
568 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
569 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
570 class S2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
571 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
572 : I<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
573 class S2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
574 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
575 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
576 class PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
577 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
578 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
579 Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
580 class PDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
581 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
582 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
583 Requires<[UseSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
584 class VSDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
585 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
586 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XD,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
587 Requires<[UseAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
588 class VS2SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
589 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
590 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, XS,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
591 Requires<[HasAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
592 class VPDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
593 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
594 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin, SSEPackedDouble>,
|
|
595 PD, Requires<[HasAVX]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
596 class VS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
597 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
598 : I<o, F, outs, ins, !strconcat("v", asm), pattern, itin>, PD,
|
|
599 Requires<[UseAVX]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
600 class S2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
601 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
602 : I<o, F, outs, ins, asm, pattern, itin>, PD, Requires<[UseSSE2]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
603 class MMXSDIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
604 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
605 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
606 class MMXS2SIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
607 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
608 : Ii8<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
609
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
610 // SSE3 Instruction Templates:
|
83
|
611 //
|
77
|
612 // S3I - SSE3 instructions with PD prefixes.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
613 // S3SI - SSE3 instructions with XS prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
614 // S3DI - SSE3 instructions with XD prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
615
|
83
|
616 class S3SI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
617 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
618 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, XS,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
619 Requires<[UseSSE3]>;
|
83
|
620 class S3DI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
621 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
622 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, XD,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
623 Requires<[UseSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
624 class S3I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
625 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
626 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
627 Requires<[UseSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
628
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
629
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
630 // SSSE3 Instruction Templates:
|
83
|
631 //
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
632 // SS38I - SSSE3 instructions with T8 prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
633 // SS3AI - SSSE3 instructions with TA prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
634 // MMXSS38I - SSSE3 instructions with T8 prefix and MMX operands.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
635 // MMXSS3AI - SSSE3 instructions with TA prefix and MMX operands.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
636 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
637 // Note: SSSE3 instructions have 64-bit and 128-bit versions. The 64-bit version
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
638 // uses the MMX registers. The 64-bit versions are grouped with the MMX
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
639 // classes. They need to be enabled even if AVX is enabled.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
640
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
641 class SS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
642 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
643 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
644 Requires<[UseSSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
645 class SS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
646 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
647 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
648 Requires<[UseSSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
649 class MMXSS38I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
650 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
651 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
652 Requires<[HasSSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
653 class MMXSS3AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
654 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
655 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
656 Requires<[HasSSSE3]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
657
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
658 // SSE4.1 Instruction Templates:
|
83
|
659 //
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
660 // SS48I - SSE 4.1 instructions with T8 prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
661 // SS41AIi8 - SSE 4.1 instructions with TA prefix and ImmT == Imm8.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
662 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
663 class SS48I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
664 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
665 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
666 Requires<[UseSSE41]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
667 class SS4AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
668 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
669 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
670 Requires<[UseSSE41]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
671
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
672 // SSE4.2 Instruction Templates:
|
83
|
673 //
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
674 // SS428I - SSE 4.2 instructions with T8 prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
675 class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
676 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
677 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
678 Requires<[UseSSE42]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
679
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
680 // SS42FI - SSE 4.2 instructions with T8XD prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
681 // NOTE: 'HasSSE42' is used as SS42FI is only used for CRC32 insns.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
682 class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
683 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
684 : I<o, F, outs, ins, asm, pattern, itin>, T8XD, Requires<[HasSSE42]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
685
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
686 // SS42AI = SSE 4.2 instructions with TA prefix
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
687 class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
688 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
689 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
690 Requires<[UseSSE42]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
691
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
692 // AVX Instruction Templates:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
693 // Instructions introduced in AVX (no SSE equivalent forms)
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
694 //
|
77
|
695 // AVX8I - AVX instructions with T8PD prefix.
|
|
696 // AVXAIi8 - AVX instructions with TAPD prefix and ImmT = Imm8.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
697 class AVX8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
698 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
699 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
700 Requires<[HasAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
701 class AVXAIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
702 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
703 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
704 Requires<[HasAVX]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
705
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
706 // AVX2 Instruction Templates:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
707 // Instructions introduced in AVX2 (no SSE equivalent forms)
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
708 //
|
77
|
709 // AVX28I - AVX2 instructions with T8PD prefix.
|
|
710 // AVX2AIi8 - AVX2 instructions with TAPD prefix and ImmT = Imm8.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
711 class AVX28I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
712 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
713 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
714 Requires<[HasAVX2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
715 class AVX2AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
716 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
717 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
718 Requires<[HasAVX2]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
719
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
720
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
721 // AVX-512 Instruction Templates:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
722 // Instructions introduced in AVX-512 (no SSE equivalent forms)
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
723 //
|
77
|
724 // AVX5128I - AVX-512 instructions with T8PD prefix.
|
|
725 // AVX512AIi8 - AVX-512 instructions with TAPD prefix and ImmT = Imm8.
|
|
726 // AVX512PDI - AVX-512 instructions with PD, double packed.
|
|
727 // AVX512PSI - AVX-512 instructions with PS, single packed.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
728 // AVX512XS8I - AVX-512 instructions with T8 and XS prefixes.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
729 // AVX512XSI - AVX-512 instructions with XS prefix, generic domain.
|
77
|
730 // AVX512BI - AVX-512 instructions with PD, int packed domain.
|
|
731 // AVX512SI - AVX-512 scalar instructions with PD prefix.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
732
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
733 class AVX5128I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
734 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
735 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
736 Requires<[HasAVX512]>;
|
83
|
737 class AVX5128IBase : T8PD {
|
|
738 Domain ExeDomain = SSEPackedInt;
|
|
739 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
740 class AVX512XS8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
741 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
742 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8XS,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
743 Requires<[HasAVX512]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
744 class AVX512XSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
745 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
746 : I<o, F, outs, ins, asm, pattern, itin>, XS,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
747 Requires<[HasAVX512]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
748 class AVX512XDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
749 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
750 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, XD,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
751 Requires<[HasAVX512]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
752 class AVX512BI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
753 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
754 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
755 Requires<[HasAVX512]>;
|
83
|
756 class AVX512BIBase : PD {
|
|
757 Domain ExeDomain = SSEPackedInt;
|
|
758 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
759 class AVX512BIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
760 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
761 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
762 Requires<[HasAVX512]>;
|
83
|
763 class AVX512BIi8Base : PD {
|
|
764 Domain ExeDomain = SSEPackedInt;
|
|
765 ImmType ImmT = Imm8;
|
|
766 }
|
95
|
767 class AVX512XSIi8Base : XS {
|
|
768 Domain ExeDomain = SSEPackedInt;
|
|
769 ImmType ImmT = Imm8;
|
|
770 }
|
|
771 class AVX512XDIi8Base : XD {
|
|
772 Domain ExeDomain = SSEPackedInt;
|
|
773 ImmType ImmT = Imm8;
|
|
774 }
|
|
775 class AVX512PSIi8Base : PS {
|
|
776 Domain ExeDomain = SSEPackedSingle;
|
|
777 ImmType ImmT = Imm8;
|
|
778 }
|
|
779 class AVX512PDIi8Base : PD {
|
|
780 Domain ExeDomain = SSEPackedDouble;
|
|
781 ImmType ImmT = Imm8;
|
|
782 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
783 class AVX512AIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
784 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
785 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
786 Requires<[HasAVX512]>;
|
77
|
787 class AVX512AIi8Base : TAPD {
|
|
788 Domain ExeDomain = SSEPackedInt;
|
|
789 ImmType ImmT = Imm8;
|
|
790 }
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
791 class AVX512Ii8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
792 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
793 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>,
|
|
794 Requires<[HasAVX512]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
795 class AVX512PDI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
796 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
797 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>, PD,
|
|
798 Requires<[HasAVX512]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
799 class AVX512PSI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
800 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
801 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedSingle>, PS,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
802 Requires<[HasAVX512]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
803 class AVX512PIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
804 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
|
77
|
805 : Ii8<o, F, outs, ins, asm, pattern, itin, d>, Requires<[HasAVX512]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
806 class AVX512PI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
807 list<dag> pattern, Domain d, InstrItinClass itin = NoItinerary>
|
77
|
808 : I<o, F, outs, ins, asm, pattern, itin, d>, Requires<[HasAVX512]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
809 class AVX512FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
810 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
811 : I<o, F, outs, ins, asm, pattern, itin>, T8PD,
|
|
812 EVEX_4V, Requires<[HasAVX512]>;
|
|
813 class AVX512FMA3Base : T8PD, EVEX_4V;
|
|
814
|
|
815 class AVX512<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
816 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
|
817 : I<o, F, outs, ins, asm, pattern, itin>, Requires<[HasAVX512]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
818
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
819 // AES Instruction Templates:
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
820 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
821 // AES8I
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
822 // These use the same encoding as the SSE4.2 T8 and TA encodings.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
823 class AES8I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
824 list<dag>pattern, InstrItinClass itin = IIC_AES>
|
77
|
825 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, T8PD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
826 Requires<[HasAES]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
827
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
828 class AESAI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
829 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
830 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
831 Requires<[HasAES]>;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
832
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
833 // PCLMUL Instruction Templates
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
834 class PCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
835 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
836 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
|
837 Requires<[HasPCLMUL]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
838
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
839 class AVXPCLMULIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
840 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
841 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
|
842 VEX_4V, Requires<[HasAVX, HasPCLMUL]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
843
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
844 // FMA3 Instruction Templates
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
845 class FMA3<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
846 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
847 : I<o, F, outs, ins, asm, pattern, itin>, T8PD,
|
|
848 VEX_4V, FMASC, Requires<[HasFMA]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
849
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
850 // FMA4 Instruction Templates
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
851 class FMA4<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
852 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
853 : Ii8<o, F, outs, ins, asm, pattern, itin>, TAPD,
|
|
854 VEX_4V, VEX_I8IMM, FMASC, Requires<[HasFMA4]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
855
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
856 // XOP 2, 3 and 4 Operand Instruction Template
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
857 class IXOP<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
858 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
859 : I<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
|
77
|
860 XOP9, Requires<[HasXOP]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
861
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
862 // XOP 2, 3 and 4 Operand Instruction Templates with imm byte
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
863 class IXOPi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
864 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
865 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedDouble>,
|
77
|
866 XOP8, Requires<[HasXOP]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
867
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
868 // XOP 5 operand instruction (VEX encoding!)
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
869 class IXOP5<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
870 list<dag>pattern, InstrItinClass itin = NoItinerary>
|
77
|
871 : Ii8<o, F, outs, ins, asm, pattern, itin, SSEPackedInt>, TAPD,
|
|
872 VEX_4V, VEX_I8IMM, Requires<[HasXOP]>;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
873
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
874 // X86-64 Instruction templates...
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
875 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
876
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
877 class RI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
878 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
879 : I<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
880 class RIi8 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
881 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
882 : Ii8<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
77
|
883 class RIi16 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
884 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
|
885 : Ii16<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
886 class RIi32 <bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
887 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
888 : Ii32<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
77
|
889 class RIi32S <bits<8> o, Format F, dag outs, dag ins, string asm,
|
|
890 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
|
891 : Ii32S<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
892
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
893 class RIi64<bits<8> o, Format f, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
894 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
895 : X86Inst<o, f, Imm64, outs, ins, asm, itin>, REX_W {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
896 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
897 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
898 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
899
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
900 class RIi64_NOREX<bits<8> o, Format f, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
901 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
902 : X86Inst<o, f, Imm64, outs, ins, asm, itin> {
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
903 let Pattern = pattern;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
904 let CodeSize = 3;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
905 }
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
906
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
907 class RS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
908 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
909 : S2I<o, F, outs, ins, asm, pattern, itin>, REX_W;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
910 class VRS2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
911 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
912 : VS2I<o, F, outs, ins, asm, pattern, itin>, VEX_W;
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
913
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
914 // MMX Instruction templates
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
915 //
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
916
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
917 // MMXI - MMX instructions with TB prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
918 // MMXI32 - MMX instructions with TB prefix valid only in 32 bit mode.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
919 // MMXI64 - MMX instructions with TB prefix valid only in 64 bit mode.
|
77
|
920 // MMX2I - MMX / SSE2 instructions with PD prefix.
|
|
921 // MMXIi8 - MMX instructions with ImmT == Imm8 and PS prefix.
|
|
922 // MMXIi8 - MMX instructions with ImmT == Imm8 and PS prefix.
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
923 // MMXID - MMX instructions with XD prefix.
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
924 // MMXIS - MMX instructions with XS prefix.
|
83
|
925 class MMXI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
926 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
927 : I<o, F, outs, ins, asm, pattern, itin>, PS, Requires<[HasMMX]>;
|
83
|
928 class MMXI32<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
929 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
930 : I<o, F, outs, ins, asm, pattern, itin>, PS, Requires<[HasMMX,Not64BitMode]>;
|
83
|
931 class MMXI64<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
932 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
933 : I<o, F, outs, ins, asm, pattern, itin>, PS, Requires<[HasMMX,In64BitMode]>;
|
83
|
934 class MMXRI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
935 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
936 : I<o, F, outs, ins, asm, pattern, itin>, PS, REX_W, Requires<[HasMMX]>;
|
83
|
937 class MMX2I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
938 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
939 : I<o, F, outs, ins, asm, pattern, itin>, PD, Requires<[HasMMX]>;
|
83
|
940 class MMXIi8<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
941 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
77
|
942 : Ii8<o, F, outs, ins, asm, pattern, itin>, PS, Requires<[HasMMX]>;
|
83
|
943 class MMXID<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
944 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
945 : Ii8<o, F, outs, ins, asm, pattern, itin>, XD, Requires<[HasMMX]>;
|
83
|
946 class MMXIS<bits<8> o, Format F, dag outs, dag ins, string asm,
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
947 list<dag> pattern, InstrItinClass itin = NoItinerary>
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
948 : Ii8<o, F, outs, ins, asm, pattern, itin>, XS, Requires<[HasMMX]>;
|