1 //===- X86InstrShiftRotate.td - Shift and Rotate Instrs ----*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the shift and rotate instructions.
12 //===----------------------------------------------------------------------===//
14 // FIXME: Someone needs to smear multipattern goodness all over this file.
16 let Defs = [EFLAGS] in {
18 let Constraints = "$src1 = $dst" in {
20 def SHL8rCL : I<0xD2, MRM4r, (outs GR8 :$dst), (ins GR8 :$src1),
21 "shl{b}\t{%cl, $dst|$dst, CL}",
22 [(set GR8:$dst, (shl GR8:$src1, CL))]>;
23 def SHL16rCL : I<0xD3, MRM4r, (outs GR16:$dst), (ins GR16:$src1),
24 "shl{w}\t{%cl, $dst|$dst, CL}",
25 [(set GR16:$dst, (shl GR16:$src1, CL))]>, OpSize;
26 def SHL32rCL : I<0xD3, MRM4r, (outs GR32:$dst), (ins GR32:$src1),
27 "shl{l}\t{%cl, $dst|$dst, CL}",
28 [(set GR32:$dst, (shl GR32:$src1, CL))]>;
29 def SHL64rCL : RI<0xD3, MRM4r, (outs GR64:$dst), (ins GR64:$src1),
30 "shl{q}\t{%cl, $dst|$dst, %CL}",
31 [(set GR64:$dst, (shl GR64:$src1, CL))]>;
34 def SHL8ri : Ii8<0xC0, MRM4r, (outs GR8 :$dst), (ins GR8 :$src1, i8imm:$src2),
35 "shl{b}\t{$src2, $dst|$dst, $src2}",
36 [(set GR8:$dst, (shl GR8:$src1, (i8 imm:$src2)))]>;
38 let isConvertibleToThreeAddress = 1 in { // Can transform into LEA.
39 def SHL16ri : Ii8<0xC1, MRM4r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$src2),
40 "shl{w}\t{$src2, $dst|$dst, $src2}",
41 [(set GR16:$dst, (shl GR16:$src1, (i8 imm:$src2)))]>, OpSize;
42 def SHL32ri : Ii8<0xC1, MRM4r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$src2),
43 "shl{l}\t{$src2, $dst|$dst, $src2}",
44 [(set GR32:$dst, (shl GR32:$src1, (i8 imm:$src2)))]>;
45 def SHL64ri : RIi8<0xC1, MRM4r, (outs GR64:$dst),
46 (ins GR64:$src1, i8imm:$src2),
47 "shl{q}\t{$src2, $dst|$dst, $src2}",
48 [(set GR64:$dst, (shl GR64:$src1, (i8 imm:$src2)))]>;
50 // NOTE: We don't include patterns for shifts of a register by one, because
51 // 'add reg,reg' is cheaper (and we have a Pat pattern for shift-by-one).
52 def SHL8r1 : I<0xD0, MRM4r, (outs GR8:$dst), (ins GR8:$src1),
54 def SHL16r1 : I<0xD1, MRM4r, (outs GR16:$dst), (ins GR16:$src1),
55 "shl{w}\t$dst", []>, OpSize;
56 def SHL32r1 : I<0xD1, MRM4r, (outs GR32:$dst), (ins GR32:$src1),
58 def SHL64r1 : RI<0xD1, MRM4r, (outs GR64:$dst), (ins GR64:$src1),
60 } // isConvertibleToThreeAddress = 1
61 } // Constraints = "$src = $dst"
64 // FIXME: Why do we need an explicit "Uses = [CL]" when the instr has a pattern
67 def SHL8mCL : I<0xD2, MRM4m, (outs), (ins i8mem :$dst),
68 "shl{b}\t{%cl, $dst|$dst, CL}",
69 [(store (shl (loadi8 addr:$dst), CL), addr:$dst)]>;
70 def SHL16mCL : I<0xD3, MRM4m, (outs), (ins i16mem:$dst),
71 "shl{w}\t{%cl, $dst|$dst, CL}",
72 [(store (shl (loadi16 addr:$dst), CL), addr:$dst)]>, OpSize;
73 def SHL32mCL : I<0xD3, MRM4m, (outs), (ins i32mem:$dst),
74 "shl{l}\t{%cl, $dst|$dst, CL}",
75 [(store (shl (loadi32 addr:$dst), CL), addr:$dst)]>;
76 def SHL64mCL : RI<0xD3, MRM4m, (outs), (ins i64mem:$dst),
77 "shl{q}\t{%cl, $dst|$dst, %CL}",
78 [(store (shl (loadi64 addr:$dst), CL), addr:$dst)]>;
80 def SHL8mi : Ii8<0xC0, MRM4m, (outs), (ins i8mem :$dst, i8imm:$src),
81 "shl{b}\t{$src, $dst|$dst, $src}",
82 [(store (shl (loadi8 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
83 def SHL16mi : Ii8<0xC1, MRM4m, (outs), (ins i16mem:$dst, i8imm:$src),
84 "shl{w}\t{$src, $dst|$dst, $src}",
85 [(store (shl (loadi16 addr:$dst), (i8 imm:$src)), addr:$dst)]>,
87 def SHL32mi : Ii8<0xC1, MRM4m, (outs), (ins i32mem:$dst, i8imm:$src),
88 "shl{l}\t{$src, $dst|$dst, $src}",
89 [(store (shl (loadi32 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
90 def SHL64mi : RIi8<0xC1, MRM4m, (outs), (ins i64mem:$dst, i8imm:$src),
91 "shl{q}\t{$src, $dst|$dst, $src}",
92 [(store (shl (loadi64 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
95 def SHL8m1 : I<0xD0, MRM4m, (outs), (ins i8mem :$dst),
97 [(store (shl (loadi8 addr:$dst), (i8 1)), addr:$dst)]>;
98 def SHL16m1 : I<0xD1, MRM4m, (outs), (ins i16mem:$dst),
100 [(store (shl (loadi16 addr:$dst), (i8 1)), addr:$dst)]>,
102 def SHL32m1 : I<0xD1, MRM4m, (outs), (ins i32mem:$dst),
104 [(store (shl (loadi32 addr:$dst), (i8 1)), addr:$dst)]>;
105 def SHL64m1 : RI<0xD1, MRM4m, (outs), (ins i64mem:$dst),
107 [(store (shl (loadi64 addr:$dst), (i8 1)), addr:$dst)]>;
109 let Constraints = "$src1 = $dst" in {
111 def SHR8rCL : I<0xD2, MRM5r, (outs GR8 :$dst), (ins GR8 :$src1),
112 "shr{b}\t{%cl, $dst|$dst, CL}",
113 [(set GR8:$dst, (srl GR8:$src1, CL))]>;
114 def SHR16rCL : I<0xD3, MRM5r, (outs GR16:$dst), (ins GR16:$src1),
115 "shr{w}\t{%cl, $dst|$dst, CL}",
116 [(set GR16:$dst, (srl GR16:$src1, CL))]>, OpSize;
117 def SHR32rCL : I<0xD3, MRM5r, (outs GR32:$dst), (ins GR32:$src1),
118 "shr{l}\t{%cl, $dst|$dst, CL}",
119 [(set GR32:$dst, (srl GR32:$src1, CL))]>;
120 def SHR64rCL : RI<0xD3, MRM5r, (outs GR64:$dst), (ins GR64:$src1),
121 "shr{q}\t{%cl, $dst|$dst, %CL}",
122 [(set GR64:$dst, (srl GR64:$src1, CL))]>;
125 def SHR8ri : Ii8<0xC0, MRM5r, (outs GR8:$dst), (ins GR8:$src1, i8imm:$src2),
126 "shr{b}\t{$src2, $dst|$dst, $src2}",
127 [(set GR8:$dst, (srl GR8:$src1, (i8 imm:$src2)))]>;
128 def SHR16ri : Ii8<0xC1, MRM5r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$src2),
129 "shr{w}\t{$src2, $dst|$dst, $src2}",
130 [(set GR16:$dst, (srl GR16:$src1, (i8 imm:$src2)))]>, OpSize;
131 def SHR32ri : Ii8<0xC1, MRM5r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$src2),
132 "shr{l}\t{$src2, $dst|$dst, $src2}",
133 [(set GR32:$dst, (srl GR32:$src1, (i8 imm:$src2)))]>;
134 def SHR64ri : RIi8<0xC1, MRM5r, (outs GR64:$dst), (ins GR64:$src1, i8imm:$src2),
135 "shr{q}\t{$src2, $dst|$dst, $src2}",
136 [(set GR64:$dst, (srl GR64:$src1, (i8 imm:$src2)))]>;
139 def SHR8r1 : I<0xD0, MRM5r, (outs GR8:$dst), (ins GR8:$src1),
141 [(set GR8:$dst, (srl GR8:$src1, (i8 1)))]>;
142 def SHR16r1 : I<0xD1, MRM5r, (outs GR16:$dst), (ins GR16:$src1),
144 [(set GR16:$dst, (srl GR16:$src1, (i8 1)))]>, OpSize;
145 def SHR32r1 : I<0xD1, MRM5r, (outs GR32:$dst), (ins GR32:$src1),
147 [(set GR32:$dst, (srl GR32:$src1, (i8 1)))]>;
148 def SHR64r1 : RI<0xD1, MRM5r, (outs GR64:$dst), (ins GR64:$src1),
150 [(set GR64:$dst, (srl GR64:$src1, (i8 1)))]>;
151 } // Constraints = "$src = $dst"
155 def SHR8mCL : I<0xD2, MRM5m, (outs), (ins i8mem :$dst),
156 "shr{b}\t{%cl, $dst|$dst, CL}",
157 [(store (srl (loadi8 addr:$dst), CL), addr:$dst)]>;
158 def SHR16mCL : I<0xD3, MRM5m, (outs), (ins i16mem:$dst),
159 "shr{w}\t{%cl, $dst|$dst, CL}",
160 [(store (srl (loadi16 addr:$dst), CL), addr:$dst)]>,
162 def SHR32mCL : I<0xD3, MRM5m, (outs), (ins i32mem:$dst),
163 "shr{l}\t{%cl, $dst|$dst, CL}",
164 [(store (srl (loadi32 addr:$dst), CL), addr:$dst)]>;
165 def SHR64mCL : RI<0xD3, MRM5m, (outs), (ins i64mem:$dst),
166 "shr{q}\t{%cl, $dst|$dst, %CL}",
167 [(store (srl (loadi64 addr:$dst), CL), addr:$dst)]>;
169 def SHR8mi : Ii8<0xC0, MRM5m, (outs), (ins i8mem :$dst, i8imm:$src),
170 "shr{b}\t{$src, $dst|$dst, $src}",
171 [(store (srl (loadi8 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
172 def SHR16mi : Ii8<0xC1, MRM5m, (outs), (ins i16mem:$dst, i8imm:$src),
173 "shr{w}\t{$src, $dst|$dst, $src}",
174 [(store (srl (loadi16 addr:$dst), (i8 imm:$src)), addr:$dst)]>,
176 def SHR32mi : Ii8<0xC1, MRM5m, (outs), (ins i32mem:$dst, i8imm:$src),
177 "shr{l}\t{$src, $dst|$dst, $src}",
178 [(store (srl (loadi32 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
179 def SHR64mi : RIi8<0xC1, MRM5m, (outs), (ins i64mem:$dst, i8imm:$src),
180 "shr{q}\t{$src, $dst|$dst, $src}",
181 [(store (srl (loadi64 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
184 def SHR8m1 : I<0xD0, MRM5m, (outs), (ins i8mem :$dst),
186 [(store (srl (loadi8 addr:$dst), (i8 1)), addr:$dst)]>;
187 def SHR16m1 : I<0xD1, MRM5m, (outs), (ins i16mem:$dst),
189 [(store (srl (loadi16 addr:$dst), (i8 1)), addr:$dst)]>,OpSize;
190 def SHR32m1 : I<0xD1, MRM5m, (outs), (ins i32mem:$dst),
192 [(store (srl (loadi32 addr:$dst), (i8 1)), addr:$dst)]>;
193 def SHR64m1 : RI<0xD1, MRM5m, (outs), (ins i64mem:$dst),
195 [(store (srl (loadi64 addr:$dst), (i8 1)), addr:$dst)]>;
197 let Constraints = "$src1 = $dst" in {
199 def SAR8rCL : I<0xD2, MRM7r, (outs GR8 :$dst), (ins GR8 :$src1),
200 "sar{b}\t{%cl, $dst|$dst, CL}",
201 [(set GR8:$dst, (sra GR8:$src1, CL))]>;
202 def SAR16rCL : I<0xD3, MRM7r, (outs GR16:$dst), (ins GR16:$src1),
203 "sar{w}\t{%cl, $dst|$dst, CL}",
204 [(set GR16:$dst, (sra GR16:$src1, CL))]>, OpSize;
205 def SAR32rCL : I<0xD3, MRM7r, (outs GR32:$dst), (ins GR32:$src1),
206 "sar{l}\t{%cl, $dst|$dst, CL}",
207 [(set GR32:$dst, (sra GR32:$src1, CL))]>;
208 def SAR64rCL : RI<0xD3, MRM7r, (outs GR64:$dst), (ins GR64:$src1),
209 "sar{q}\t{%cl, $dst|$dst, %CL}",
210 [(set GR64:$dst, (sra GR64:$src1, CL))]>;
213 def SAR8ri : Ii8<0xC0, MRM7r, (outs GR8 :$dst), (ins GR8 :$src1, i8imm:$src2),
214 "sar{b}\t{$src2, $dst|$dst, $src2}",
215 [(set GR8:$dst, (sra GR8:$src1, (i8 imm:$src2)))]>;
216 def SAR16ri : Ii8<0xC1, MRM7r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$src2),
217 "sar{w}\t{$src2, $dst|$dst, $src2}",
218 [(set GR16:$dst, (sra GR16:$src1, (i8 imm:$src2)))]>,
220 def SAR32ri : Ii8<0xC1, MRM7r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$src2),
221 "sar{l}\t{$src2, $dst|$dst, $src2}",
222 [(set GR32:$dst, (sra GR32:$src1, (i8 imm:$src2)))]>;
223 def SAR64ri : RIi8<0xC1, MRM7r, (outs GR64:$dst),
224 (ins GR64:$src1, i8imm:$src2),
225 "sar{q}\t{$src2, $dst|$dst, $src2}",
226 [(set GR64:$dst, (sra GR64:$src1, (i8 imm:$src2)))]>;
229 def SAR8r1 : I<0xD0, MRM7r, (outs GR8 :$dst), (ins GR8 :$src1),
231 [(set GR8:$dst, (sra GR8:$src1, (i8 1)))]>;
232 def SAR16r1 : I<0xD1, MRM7r, (outs GR16:$dst), (ins GR16:$src1),
234 [(set GR16:$dst, (sra GR16:$src1, (i8 1)))]>, OpSize;
235 def SAR32r1 : I<0xD1, MRM7r, (outs GR32:$dst), (ins GR32:$src1),
237 [(set GR32:$dst, (sra GR32:$src1, (i8 1)))]>;
238 def SAR64r1 : RI<0xD1, MRM7r, (outs GR64:$dst), (ins GR64:$src1),
240 [(set GR64:$dst, (sra GR64:$src1, (i8 1)))]>;
241 } // Constraints = "$src = $dst"
245 def SAR8mCL : I<0xD2, MRM7m, (outs), (ins i8mem :$dst),
246 "sar{b}\t{%cl, $dst|$dst, CL}",
247 [(store (sra (loadi8 addr:$dst), CL), addr:$dst)]>;
248 def SAR16mCL : I<0xD3, MRM7m, (outs), (ins i16mem:$dst),
249 "sar{w}\t{%cl, $dst|$dst, CL}",
250 [(store (sra (loadi16 addr:$dst), CL), addr:$dst)]>, OpSize;
251 def SAR32mCL : I<0xD3, MRM7m, (outs), (ins i32mem:$dst),
252 "sar{l}\t{%cl, $dst|$dst, CL}",
253 [(store (sra (loadi32 addr:$dst), CL), addr:$dst)]>;
254 def SAR64mCL : RI<0xD3, MRM7m, (outs), (ins i64mem:$dst),
255 "sar{q}\t{%cl, $dst|$dst, %CL}",
256 [(store (sra (loadi64 addr:$dst), CL), addr:$dst)]>;
258 def SAR8mi : Ii8<0xC0, MRM7m, (outs), (ins i8mem :$dst, i8imm:$src),
259 "sar{b}\t{$src, $dst|$dst, $src}",
260 [(store (sra (loadi8 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
261 def SAR16mi : Ii8<0xC1, MRM7m, (outs), (ins i16mem:$dst, i8imm:$src),
262 "sar{w}\t{$src, $dst|$dst, $src}",
263 [(store (sra (loadi16 addr:$dst), (i8 imm:$src)), addr:$dst)]>,
265 def SAR32mi : Ii8<0xC1, MRM7m, (outs), (ins i32mem:$dst, i8imm:$src),
266 "sar{l}\t{$src, $dst|$dst, $src}",
267 [(store (sra (loadi32 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
268 def SAR64mi : RIi8<0xC1, MRM7m, (outs), (ins i64mem:$dst, i8imm:$src),
269 "sar{q}\t{$src, $dst|$dst, $src}",
270 [(store (sra (loadi64 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
273 def SAR8m1 : I<0xD0, MRM7m, (outs), (ins i8mem :$dst),
275 [(store (sra (loadi8 addr:$dst), (i8 1)), addr:$dst)]>;
276 def SAR16m1 : I<0xD1, MRM7m, (outs), (ins i16mem:$dst),
278 [(store (sra (loadi16 addr:$dst), (i8 1)), addr:$dst)]>,
280 def SAR32m1 : I<0xD1, MRM7m, (outs), (ins i32mem:$dst),
282 [(store (sra (loadi32 addr:$dst), (i8 1)), addr:$dst)]>;
283 def SAR64m1 : RI<0xD1, MRM7m, (outs), (ins i64mem:$dst),
285 [(store (sra (loadi64 addr:$dst), (i8 1)), addr:$dst)]>;
287 //===----------------------------------------------------------------------===//
288 // Rotate instructions
289 //===----------------------------------------------------------------------===//
291 let Constraints = "$src1 = $dst" in {
292 def RCL8r1 : I<0xD0, MRM2r, (outs GR8:$dst), (ins GR8:$src1),
293 "rcl{b}\t{1, $dst|$dst, 1}", []>;
294 def RCL8ri : Ii8<0xC0, MRM2r, (outs GR8:$dst), (ins GR8:$src1, i8imm:$cnt),
295 "rcl{b}\t{$cnt, $dst|$dst, $cnt}", []>;
297 def RCL8rCL : I<0xD2, MRM2r, (outs GR8:$dst), (ins GR8:$src1),
298 "rcl{b}\t{%cl, $dst|$dst, CL}", []>;
300 def RCL16r1 : I<0xD1, MRM2r, (outs GR16:$dst), (ins GR16:$src1),
301 "rcl{w}\t{1, $dst|$dst, 1}", []>, OpSize;
302 def RCL16ri : Ii8<0xC1, MRM2r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$cnt),
303 "rcl{w}\t{$cnt, $dst|$dst, $cnt}", []>, OpSize;
305 def RCL16rCL : I<0xD3, MRM2r, (outs GR16:$dst), (ins GR16:$src1),
306 "rcl{w}\t{%cl, $dst|$dst, CL}", []>, OpSize;
308 def RCL32r1 : I<0xD1, MRM2r, (outs GR32:$dst), (ins GR32:$src1),
309 "rcl{l}\t{1, $dst|$dst, 1}", []>;
310 def RCL32ri : Ii8<0xC1, MRM2r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$cnt),
311 "rcl{l}\t{$cnt, $dst|$dst, $cnt}", []>;
313 def RCL32rCL : I<0xD3, MRM2r, (outs GR32:$dst), (ins GR32:$src1),
314 "rcl{l}\t{%cl, $dst|$dst, CL}", []>;
317 def RCL64r1 : RI<0xD1, MRM2r, (outs GR64:$dst), (ins GR64:$src1),
318 "rcl{q}\t{1, $dst|$dst, 1}", []>;
319 def RCL64ri : RIi8<0xC1, MRM2r, (outs GR64:$dst), (ins GR64:$src1, i8imm:$cnt),
320 "rcl{q}\t{$cnt, $dst|$dst, $cnt}", []>;
322 def RCL64rCL : RI<0xD3, MRM2r, (outs GR64:$dst), (ins GR64:$src1),
323 "rcl{q}\t{%cl, $dst|$dst, CL}", []>;
326 def RCR8r1 : I<0xD0, MRM3r, (outs GR8:$dst), (ins GR8:$src1),
327 "rcr{b}\t{1, $dst|$dst, 1}", []>;
328 def RCR8ri : Ii8<0xC0, MRM3r, (outs GR8:$dst), (ins GR8:$src1, i8imm:$cnt),
329 "rcr{b}\t{$cnt, $dst|$dst, $cnt}", []>;
331 def RCR8rCL : I<0xD2, MRM3r, (outs GR8:$dst), (ins GR8:$src1),
332 "rcr{b}\t{%cl, $dst|$dst, CL}", []>;
334 def RCR16r1 : I<0xD1, MRM3r, (outs GR16:$dst), (ins GR16:$src1),
335 "rcr{w}\t{1, $dst|$dst, 1}", []>, OpSize;
336 def RCR16ri : Ii8<0xC1, MRM3r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$cnt),
337 "rcr{w}\t{$cnt, $dst|$dst, $cnt}", []>, OpSize;
339 def RCR16rCL : I<0xD3, MRM3r, (outs GR16:$dst), (ins GR16:$src1),
340 "rcr{w}\t{%cl, $dst|$dst, CL}", []>, OpSize;
342 def RCR32r1 : I<0xD1, MRM3r, (outs GR32:$dst), (ins GR32:$src1),
343 "rcr{l}\t{1, $dst|$dst, 1}", []>;
344 def RCR32ri : Ii8<0xC1, MRM3r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$cnt),
345 "rcr{l}\t{$cnt, $dst|$dst, $cnt}", []>;
347 def RCR32rCL : I<0xD3, MRM3r, (outs GR32:$dst), (ins GR32:$src1),
348 "rcr{l}\t{%cl, $dst|$dst, CL}", []>;
350 def RCR64r1 : RI<0xD1, MRM3r, (outs GR64:$dst), (ins GR64:$src1),
351 "rcr{q}\t{1, $dst|$dst, 1}", []>;
352 def RCR64ri : RIi8<0xC1, MRM3r, (outs GR64:$dst), (ins GR64:$src1, i8imm:$cnt),
353 "rcr{q}\t{$cnt, $dst|$dst, $cnt}", []>;
355 def RCR64rCL : RI<0xD3, MRM3r, (outs GR64:$dst), (ins GR64:$src1),
356 "rcr{q}\t{%cl, $dst|$dst, CL}", []>;
358 } // Constraints = "$src = $dst"
360 def RCL8m1 : I<0xD0, MRM2m, (outs), (ins i8mem:$dst),
361 "rcl{b}\t{1, $dst|$dst, 1}", []>;
362 def RCL8mi : Ii8<0xC0, MRM2m, (outs), (ins i8mem:$dst, i8imm:$cnt),
363 "rcl{b}\t{$cnt, $dst|$dst, $cnt}", []>;
364 def RCL16m1 : I<0xD1, MRM2m, (outs), (ins i16mem:$dst),
365 "rcl{w}\t{1, $dst|$dst, 1}", []>, OpSize;
366 def RCL16mi : Ii8<0xC1, MRM2m, (outs), (ins i16mem:$dst, i8imm:$cnt),
367 "rcl{w}\t{$cnt, $dst|$dst, $cnt}", []>, OpSize;
368 def RCL32m1 : I<0xD1, MRM2m, (outs), (ins i32mem:$dst),
369 "rcl{l}\t{1, $dst|$dst, 1}", []>;
370 def RCL32mi : Ii8<0xC1, MRM2m, (outs), (ins i32mem:$dst, i8imm:$cnt),
371 "rcl{l}\t{$cnt, $dst|$dst, $cnt}", []>;
372 def RCL64m1 : RI<0xD1, MRM2m, (outs), (ins i64mem:$dst),
373 "rcl{q}\t{1, $dst|$dst, 1}", []>;
374 def RCL64mi : RIi8<0xC1, MRM2m, (outs), (ins i64mem:$dst, i8imm:$cnt),
375 "rcl{q}\t{$cnt, $dst|$dst, $cnt}", []>;
377 def RCR8m1 : I<0xD0, MRM3m, (outs), (ins i8mem:$dst),
378 "rcr{b}\t{1, $dst|$dst, 1}", []>;
379 def RCR8mi : Ii8<0xC0, MRM3m, (outs), (ins i8mem:$dst, i8imm:$cnt),
380 "rcr{b}\t{$cnt, $dst|$dst, $cnt}", []>;
381 def RCR16m1 : I<0xD1, MRM3m, (outs), (ins i16mem:$dst),
382 "rcr{w}\t{1, $dst|$dst, 1}", []>, OpSize;
383 def RCR16mi : Ii8<0xC1, MRM3m, (outs), (ins i16mem:$dst, i8imm:$cnt),
384 "rcr{w}\t{$cnt, $dst|$dst, $cnt}", []>, OpSize;
385 def RCR32m1 : I<0xD1, MRM3m, (outs), (ins i32mem:$dst),
386 "rcr{l}\t{1, $dst|$dst, 1}", []>;
387 def RCR32mi : Ii8<0xC1, MRM3m, (outs), (ins i32mem:$dst, i8imm:$cnt),
388 "rcr{l}\t{$cnt, $dst|$dst, $cnt}", []>;
389 def RCR64m1 : RI<0xD1, MRM3m, (outs), (ins i64mem:$dst),
390 "rcr{q}\t{1, $dst|$dst, 1}", []>;
391 def RCR64mi : RIi8<0xC1, MRM3m, (outs), (ins i64mem:$dst, i8imm:$cnt),
392 "rcr{q}\t{$cnt, $dst|$dst, $cnt}", []>;
395 def RCL8mCL : I<0xD2, MRM2m, (outs), (ins i8mem:$dst),
396 "rcl{b}\t{%cl, $dst|$dst, CL}", []>;
397 def RCL16mCL : I<0xD3, MRM2m, (outs), (ins i16mem:$dst),
398 "rcl{w}\t{%cl, $dst|$dst, CL}", []>, OpSize;
399 def RCL32mCL : I<0xD3, MRM2m, (outs), (ins i32mem:$dst),
400 "rcl{l}\t{%cl, $dst|$dst, CL}", []>;
401 def RCL64mCL : RI<0xD3, MRM2m, (outs), (ins i64mem:$dst),
402 "rcl{q}\t{%cl, $dst|$dst, CL}", []>;
404 def RCR8mCL : I<0xD2, MRM3m, (outs), (ins i8mem:$dst),
405 "rcr{b}\t{%cl, $dst|$dst, CL}", []>;
406 def RCR16mCL : I<0xD3, MRM3m, (outs), (ins i16mem:$dst),
407 "rcr{w}\t{%cl, $dst|$dst, CL}", []>, OpSize;
408 def RCR32mCL : I<0xD3, MRM3m, (outs), (ins i32mem:$dst),
409 "rcr{l}\t{%cl, $dst|$dst, CL}", []>;
410 def RCR64mCL : RI<0xD3, MRM3m, (outs), (ins i64mem:$dst),
411 "rcr{q}\t{%cl, $dst|$dst, CL}", []>;
414 let Constraints = "$src1 = $dst" in {
415 // FIXME: provide shorter instructions when imm8 == 1
417 def ROL8rCL : I<0xD2, MRM0r, (outs GR8 :$dst), (ins GR8 :$src1),
418 "rol{b}\t{%cl, $dst|$dst, CL}",
419 [(set GR8:$dst, (rotl GR8:$src1, CL))]>;
420 def ROL16rCL : I<0xD3, MRM0r, (outs GR16:$dst), (ins GR16:$src1),
421 "rol{w}\t{%cl, $dst|$dst, CL}",
422 [(set GR16:$dst, (rotl GR16:$src1, CL))]>, OpSize;
423 def ROL32rCL : I<0xD3, MRM0r, (outs GR32:$dst), (ins GR32:$src1),
424 "rol{l}\t{%cl, $dst|$dst, CL}",
425 [(set GR32:$dst, (rotl GR32:$src1, CL))]>;
426 def ROL64rCL : RI<0xD3, MRM0r, (outs GR64:$dst), (ins GR64:$src1),
427 "rol{q}\t{%cl, $dst|$dst, %CL}",
428 [(set GR64:$dst, (rotl GR64:$src1, CL))]>;
431 def ROL8ri : Ii8<0xC0, MRM0r, (outs GR8 :$dst), (ins GR8 :$src1, i8imm:$src2),
432 "rol{b}\t{$src2, $dst|$dst, $src2}",
433 [(set GR8:$dst, (rotl GR8:$src1, (i8 imm:$src2)))]>;
434 def ROL16ri : Ii8<0xC1, MRM0r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$src2),
435 "rol{w}\t{$src2, $dst|$dst, $src2}",
436 [(set GR16:$dst, (rotl GR16:$src1, (i8 imm:$src2)))]>,
438 def ROL32ri : Ii8<0xC1, MRM0r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$src2),
439 "rol{l}\t{$src2, $dst|$dst, $src2}",
440 [(set GR32:$dst, (rotl GR32:$src1, (i8 imm:$src2)))]>;
441 def ROL64ri : RIi8<0xC1, MRM0r, (outs GR64:$dst),
442 (ins GR64:$src1, i8imm:$src2),
443 "rol{q}\t{$src2, $dst|$dst, $src2}",
444 [(set GR64:$dst, (rotl GR64:$src1, (i8 imm:$src2)))]>;
447 def ROL8r1 : I<0xD0, MRM0r, (outs GR8 :$dst), (ins GR8 :$src1),
449 [(set GR8:$dst, (rotl GR8:$src1, (i8 1)))]>;
450 def ROL16r1 : I<0xD1, MRM0r, (outs GR16:$dst), (ins GR16:$src1),
452 [(set GR16:$dst, (rotl GR16:$src1, (i8 1)))]>, OpSize;
453 def ROL32r1 : I<0xD1, MRM0r, (outs GR32:$dst), (ins GR32:$src1),
455 [(set GR32:$dst, (rotl GR32:$src1, (i8 1)))]>;
456 def ROL64r1 : RI<0xD1, MRM0r, (outs GR64:$dst), (ins GR64:$src1),
458 [(set GR64:$dst, (rotl GR64:$src1, (i8 1)))]>;
459 } // Constraints = "$src = $dst"
462 def ROL8mCL : I<0xD2, MRM0m, (outs), (ins i8mem :$dst),
463 "rol{b}\t{%cl, $dst|$dst, CL}",
464 [(store (rotl (loadi8 addr:$dst), CL), addr:$dst)]>;
465 def ROL16mCL : I<0xD3, MRM0m, (outs), (ins i16mem:$dst),
466 "rol{w}\t{%cl, $dst|$dst, CL}",
467 [(store (rotl (loadi16 addr:$dst), CL), addr:$dst)]>, OpSize;
468 def ROL32mCL : I<0xD3, MRM0m, (outs), (ins i32mem:$dst),
469 "rol{l}\t{%cl, $dst|$dst, CL}",
470 [(store (rotl (loadi32 addr:$dst), CL), addr:$dst)]>;
471 def ROL64mCL : RI<0xD3, MRM0m, (outs), (ins i64mem:$dst),
472 "rol{q}\t{%cl, $dst|$dst, %CL}",
473 [(store (rotl (loadi64 addr:$dst), CL), addr:$dst)]>;
475 def ROL8mi : Ii8<0xC0, MRM0m, (outs), (ins i8mem :$dst, i8imm:$src1),
476 "rol{b}\t{$src1, $dst|$dst, $src1}",
477 [(store (rotl (loadi8 addr:$dst), (i8 imm:$src1)), addr:$dst)]>;
478 def ROL16mi : Ii8<0xC1, MRM0m, (outs), (ins i16mem:$dst, i8imm:$src1),
479 "rol{w}\t{$src1, $dst|$dst, $src1}",
480 [(store (rotl (loadi16 addr:$dst), (i8 imm:$src1)), addr:$dst)]>,
482 def ROL32mi : Ii8<0xC1, MRM0m, (outs), (ins i32mem:$dst, i8imm:$src1),
483 "rol{l}\t{$src1, $dst|$dst, $src1}",
484 [(store (rotl (loadi32 addr:$dst), (i8 imm:$src1)), addr:$dst)]>;
485 def ROL64mi : RIi8<0xC1, MRM0m, (outs), (ins i64mem:$dst, i8imm:$src1),
486 "rol{q}\t{$src1, $dst|$dst, $src1}",
487 [(store (rotl (loadi64 addr:$dst), (i8 imm:$src1)), addr:$dst)]>;
490 def ROL8m1 : I<0xD0, MRM0m, (outs), (ins i8mem :$dst),
492 [(store (rotl (loadi8 addr:$dst), (i8 1)), addr:$dst)]>;
493 def ROL16m1 : I<0xD1, MRM0m, (outs), (ins i16mem:$dst),
495 [(store (rotl (loadi16 addr:$dst), (i8 1)), addr:$dst)]>,
497 def ROL32m1 : I<0xD1, MRM0m, (outs), (ins i32mem:$dst),
499 [(store (rotl (loadi32 addr:$dst), (i8 1)), addr:$dst)]>;
500 def ROL64m1 : RI<0xD1, MRM0m, (outs), (ins i64mem:$dst),
502 [(store (rotl (loadi64 addr:$dst), (i8 1)), addr:$dst)]>;
504 let Constraints = "$src1 = $dst" in {
506 def ROR8rCL : I<0xD2, MRM1r, (outs GR8 :$dst), (ins GR8 :$src1),
507 "ror{b}\t{%cl, $dst|$dst, CL}",
508 [(set GR8:$dst, (rotr GR8:$src1, CL))]>;
509 def ROR16rCL : I<0xD3, MRM1r, (outs GR16:$dst), (ins GR16:$src1),
510 "ror{w}\t{%cl, $dst|$dst, CL}",
511 [(set GR16:$dst, (rotr GR16:$src1, CL))]>, OpSize;
512 def ROR32rCL : I<0xD3, MRM1r, (outs GR32:$dst), (ins GR32:$src1),
513 "ror{l}\t{%cl, $dst|$dst, CL}",
514 [(set GR32:$dst, (rotr GR32:$src1, CL))]>;
515 def ROR64rCL : RI<0xD3, MRM1r, (outs GR64:$dst), (ins GR64:$src1),
516 "ror{q}\t{%cl, $dst|$dst, %CL}",
517 [(set GR64:$dst, (rotr GR64:$src1, CL))]>;
520 def ROR8ri : Ii8<0xC0, MRM1r, (outs GR8 :$dst), (ins GR8 :$src1, i8imm:$src2),
521 "ror{b}\t{$src2, $dst|$dst, $src2}",
522 [(set GR8:$dst, (rotr GR8:$src1, (i8 imm:$src2)))]>;
523 def ROR16ri : Ii8<0xC1, MRM1r, (outs GR16:$dst), (ins GR16:$src1, i8imm:$src2),
524 "ror{w}\t{$src2, $dst|$dst, $src2}",
525 [(set GR16:$dst, (rotr GR16:$src1, (i8 imm:$src2)))]>,
527 def ROR32ri : Ii8<0xC1, MRM1r, (outs GR32:$dst), (ins GR32:$src1, i8imm:$src2),
528 "ror{l}\t{$src2, $dst|$dst, $src2}",
529 [(set GR32:$dst, (rotr GR32:$src1, (i8 imm:$src2)))]>;
530 def ROR64ri : RIi8<0xC1, MRM1r, (outs GR64:$dst),
531 (ins GR64:$src1, i8imm:$src2),
532 "ror{q}\t{$src2, $dst|$dst, $src2}",
533 [(set GR64:$dst, (rotr GR64:$src1, (i8 imm:$src2)))]>;
536 def ROR8r1 : I<0xD0, MRM1r, (outs GR8 :$dst), (ins GR8 :$src1),
538 [(set GR8:$dst, (rotr GR8:$src1, (i8 1)))]>;
539 def ROR16r1 : I<0xD1, MRM1r, (outs GR16:$dst), (ins GR16:$src1),
541 [(set GR16:$dst, (rotr GR16:$src1, (i8 1)))]>, OpSize;
542 def ROR32r1 : I<0xD1, MRM1r, (outs GR32:$dst), (ins GR32:$src1),
544 [(set GR32:$dst, (rotr GR32:$src1, (i8 1)))]>;
545 def ROR64r1 : RI<0xD1, MRM1r, (outs GR64:$dst), (ins GR64:$src1),
547 [(set GR64:$dst, (rotr GR64:$src1, (i8 1)))]>;
548 } // Constraints = "$src = $dst"
551 def ROR8mCL : I<0xD2, MRM1m, (outs), (ins i8mem :$dst),
552 "ror{b}\t{%cl, $dst|$dst, CL}",
553 [(store (rotr (loadi8 addr:$dst), CL), addr:$dst)]>;
554 def ROR16mCL : I<0xD3, MRM1m, (outs), (ins i16mem:$dst),
555 "ror{w}\t{%cl, $dst|$dst, CL}",
556 [(store (rotr (loadi16 addr:$dst), CL), addr:$dst)]>, OpSize;
557 def ROR32mCL : I<0xD3, MRM1m, (outs), (ins i32mem:$dst),
558 "ror{l}\t{%cl, $dst|$dst, CL}",
559 [(store (rotr (loadi32 addr:$dst), CL), addr:$dst)]>;
560 def ROR64mCL : RI<0xD3, MRM1m, (outs), (ins i64mem:$dst),
561 "ror{q}\t{%cl, $dst|$dst, %CL}",
562 [(store (rotr (loadi64 addr:$dst), CL), addr:$dst)]>;
564 def ROR8mi : Ii8<0xC0, MRM1m, (outs), (ins i8mem :$dst, i8imm:$src),
565 "ror{b}\t{$src, $dst|$dst, $src}",
566 [(store (rotr (loadi8 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
567 def ROR16mi : Ii8<0xC1, MRM1m, (outs), (ins i16mem:$dst, i8imm:$src),
568 "ror{w}\t{$src, $dst|$dst, $src}",
569 [(store (rotr (loadi16 addr:$dst), (i8 imm:$src)), addr:$dst)]>,
571 def ROR32mi : Ii8<0xC1, MRM1m, (outs), (ins i32mem:$dst, i8imm:$src),
572 "ror{l}\t{$src, $dst|$dst, $src}",
573 [(store (rotr (loadi32 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
574 def ROR64mi : RIi8<0xC1, MRM1m, (outs), (ins i64mem:$dst, i8imm:$src),
575 "ror{q}\t{$src, $dst|$dst, $src}",
576 [(store (rotr (loadi64 addr:$dst), (i8 imm:$src)), addr:$dst)]>;
579 def ROR8m1 : I<0xD0, MRM1m, (outs), (ins i8mem :$dst),
581 [(store (rotr (loadi8 addr:$dst), (i8 1)), addr:$dst)]>;
582 def ROR16m1 : I<0xD1, MRM1m, (outs), (ins i16mem:$dst),
584 [(store (rotr (loadi16 addr:$dst), (i8 1)), addr:$dst)]>,
586 def ROR32m1 : I<0xD1, MRM1m, (outs), (ins i32mem:$dst),
588 [(store (rotr (loadi32 addr:$dst), (i8 1)), addr:$dst)]>;
589 def ROR64m1 : RI<0xD1, MRM1m, (outs), (ins i64mem:$dst),
591 [(store (rotr (loadi64 addr:$dst), (i8 1)), addr:$dst)]>;
594 //===----------------------------------------------------------------------===//
595 // Double shift instructions (generalizations of rotate)
596 //===----------------------------------------------------------------------===//
598 let Constraints = "$src1 = $dst" in {
601 def SHLD16rrCL : I<0xA5, MRMDestReg, (outs GR16:$dst),
602 (ins GR16:$src1, GR16:$src2),
603 "shld{w}\t{%cl, $src2, $dst|$dst, $src2, CL}",
604 [(set GR16:$dst, (X86shld GR16:$src1, GR16:$src2, CL))]>,
606 def SHRD16rrCL : I<0xAD, MRMDestReg, (outs GR16:$dst),
607 (ins GR16:$src1, GR16:$src2),
608 "shrd{w}\t{%cl, $src2, $dst|$dst, $src2, CL}",
609 [(set GR16:$dst, (X86shrd GR16:$src1, GR16:$src2, CL))]>,
611 def SHLD32rrCL : I<0xA5, MRMDestReg, (outs GR32:$dst),
612 (ins GR32:$src1, GR32:$src2),
613 "shld{l}\t{%cl, $src2, $dst|$dst, $src2, CL}",
614 [(set GR32:$dst, (X86shld GR32:$src1, GR32:$src2, CL))]>, TB;
615 def SHRD32rrCL : I<0xAD, MRMDestReg, (outs GR32:$dst),
616 (ins GR32:$src1, GR32:$src2),
617 "shrd{l}\t{%cl, $src2, $dst|$dst, $src2, CL}",
618 [(set GR32:$dst, (X86shrd GR32:$src1, GR32:$src2, CL))]>, TB;
619 def SHLD64rrCL : RI<0xA5, MRMDestReg, (outs GR64:$dst),
620 (ins GR64:$src1, GR64:$src2),
621 "shld{q}\t{%cl, $src2, $dst|$dst, $src2, %CL}",
622 [(set GR64:$dst, (X86shld GR64:$src1, GR64:$src2, CL))]>,
624 def SHRD64rrCL : RI<0xAD, MRMDestReg, (outs GR64:$dst),
625 (ins GR64:$src1, GR64:$src2),
626 "shrd{q}\t{%cl, $src2, $dst|$dst, $src2, %CL}",
627 [(set GR64:$dst, (X86shrd GR64:$src1, GR64:$src2, CL))]>,
631 let isCommutable = 1 in { // These instructions commute to each other.
632 def SHLD16rri8 : Ii8<0xA4, MRMDestReg,
634 (ins GR16:$src1, GR16:$src2, i8imm:$src3),
635 "shld{w}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
636 [(set GR16:$dst, (X86shld GR16:$src1, GR16:$src2,
639 def SHRD16rri8 : Ii8<0xAC, MRMDestReg,
641 (ins GR16:$src1, GR16:$src2, i8imm:$src3),
642 "shrd{w}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
643 [(set GR16:$dst, (X86shrd GR16:$src1, GR16:$src2,
646 def SHLD32rri8 : Ii8<0xA4, MRMDestReg,
648 (ins GR32:$src1, GR32:$src2, i8imm:$src3),
649 "shld{l}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
650 [(set GR32:$dst, (X86shld GR32:$src1, GR32:$src2,
653 def SHRD32rri8 : Ii8<0xAC, MRMDestReg,
655 (ins GR32:$src1, GR32:$src2, i8imm:$src3),
656 "shrd{l}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
657 [(set GR32:$dst, (X86shrd GR32:$src1, GR32:$src2,
660 def SHLD64rri8 : RIi8<0xA4, MRMDestReg,
662 (ins GR64:$src1, GR64:$src2, i8imm:$src3),
663 "shld{q}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
664 [(set GR64:$dst, (X86shld GR64:$src1, GR64:$src2,
667 def SHRD64rri8 : RIi8<0xAC, MRMDestReg,
669 (ins GR64:$src1, GR64:$src2, i8imm:$src3),
670 "shrd{q}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
671 [(set GR64:$dst, (X86shrd GR64:$src1, GR64:$src2,
675 } // Constraints = "$src = $dst"
678 def SHLD16mrCL : I<0xA5, MRMDestMem, (outs), (ins i16mem:$dst, GR16:$src2),
679 "shld{w}\t{%cl, $src2, $dst|$dst, $src2, CL}",
680 [(store (X86shld (loadi16 addr:$dst), GR16:$src2, CL),
681 addr:$dst)]>, TB, OpSize;
682 def SHRD16mrCL : I<0xAD, MRMDestMem, (outs), (ins i16mem:$dst, GR16:$src2),
683 "shrd{w}\t{%cl, $src2, $dst|$dst, $src2, CL}",
684 [(store (X86shrd (loadi16 addr:$dst), GR16:$src2, CL),
685 addr:$dst)]>, TB, OpSize;
687 def SHLD32mrCL : I<0xA5, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src2),
688 "shld{l}\t{%cl, $src2, $dst|$dst, $src2, CL}",
689 [(store (X86shld (loadi32 addr:$dst), GR32:$src2, CL),
691 def SHRD32mrCL : I<0xAD, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src2),
692 "shrd{l}\t{%cl, $src2, $dst|$dst, $src2, CL}",
693 [(store (X86shrd (loadi32 addr:$dst), GR32:$src2, CL),
696 def SHLD64mrCL : RI<0xA5, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src2),
697 "shld{q}\t{%cl, $src2, $dst|$dst, $src2, %CL}",
698 [(store (X86shld (loadi64 addr:$dst), GR64:$src2, CL),
700 def SHRD64mrCL : RI<0xAD, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src2),
701 "shrd{q}\t{%cl, $src2, $dst|$dst, $src2, %CL}",
702 [(store (X86shrd (loadi64 addr:$dst), GR64:$src2, CL),
706 def SHLD16mri8 : Ii8<0xA4, MRMDestMem,
707 (outs), (ins i16mem:$dst, GR16:$src2, i8imm:$src3),
708 "shld{w}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
709 [(store (X86shld (loadi16 addr:$dst), GR16:$src2,
710 (i8 imm:$src3)), addr:$dst)]>,
712 def SHRD16mri8 : Ii8<0xAC, MRMDestMem,
713 (outs), (ins i16mem:$dst, GR16:$src2, i8imm:$src3),
714 "shrd{w}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
715 [(store (X86shrd (loadi16 addr:$dst), GR16:$src2,
716 (i8 imm:$src3)), addr:$dst)]>,
719 def SHLD32mri8 : Ii8<0xA4, MRMDestMem,
720 (outs), (ins i32mem:$dst, GR32:$src2, i8imm:$src3),
721 "shld{l}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
722 [(store (X86shld (loadi32 addr:$dst), GR32:$src2,
723 (i8 imm:$src3)), addr:$dst)]>,
725 def SHRD32mri8 : Ii8<0xAC, MRMDestMem,
726 (outs), (ins i32mem:$dst, GR32:$src2, i8imm:$src3),
727 "shrd{l}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
728 [(store (X86shrd (loadi32 addr:$dst), GR32:$src2,
729 (i8 imm:$src3)), addr:$dst)]>,
732 def SHLD64mri8 : RIi8<0xA4, MRMDestMem,
733 (outs), (ins i64mem:$dst, GR64:$src2, i8imm:$src3),
734 "shld{q}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
735 [(store (X86shld (loadi64 addr:$dst), GR64:$src2,
736 (i8 imm:$src3)), addr:$dst)]>,
738 def SHRD64mri8 : RIi8<0xAC, MRMDestMem,
739 (outs), (ins i64mem:$dst, GR64:$src2, i8imm:$src3),
740 "shrd{q}\t{$src3, $src2, $dst|$dst, $src2, $src3}",
741 [(store (X86shrd (loadi64 addr:$dst), GR64:$src2,
742 (i8 imm:$src3)), addr:$dst)]>,