xref: /aosp_15_r20/external/llvm/test/MC/X86/x86-64.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple x86_64-unknown-unknown -show-encoding %s > %t 2> %t.err
2*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck < %t %s
3*9880d681SAndroid Build Coastguard Worker// RUN: FileCheck --check-prefix=CHECK-STDERR < %t.err %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker	monitor
6*9880d681SAndroid Build Coastguard Worker// CHECK: monitor
7*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xc8]
8*9880d681SAndroid Build Coastguard Worker	monitor %rax, %rcx, %rdx
9*9880d681SAndroid Build Coastguard Worker// CHECK: monitor
10*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xc8]
11*9880d681SAndroid Build Coastguard Worker	mwait
12*9880d681SAndroid Build Coastguard Worker// CHECK: mwait
13*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xc9]
14*9880d681SAndroid Build Coastguard Worker	mwait %rax, %rcx
15*9880d681SAndroid Build Coastguard Worker// CHECK: mwait
16*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xc9]
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker// Suffix inference:
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker// CHECK: addl $0, %eax
21*9880d681SAndroid Build Coastguard Worker        add $0, %eax
22*9880d681SAndroid Build Coastguard Worker// CHECK: addb $255, %al
23*9880d681SAndroid Build Coastguard Worker        add $0xFF, %al
24*9880d681SAndroid Build Coastguard Worker// CHECK: orq %rax, %rdx
25*9880d681SAndroid Build Coastguard Worker        or %rax, %rdx
26*9880d681SAndroid Build Coastguard Worker// CHECK: shlq $3, %rax
27*9880d681SAndroid Build Coastguard Worker        shl $3, %rax
28*9880d681SAndroid Build Coastguard Worker
29*9880d681SAndroid Build Coastguard Worker
30*9880d681SAndroid Build Coastguard Worker// CHECK: subb %al, %al
31*9880d681SAndroid Build Coastguard Worker        subb %al, %al
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Worker// CHECK: addl $24, %eax
34*9880d681SAndroid Build Coastguard Worker        addl $24, %eax
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, 10(%ebp)
37*9880d681SAndroid Build Coastguard Worker        movl %eax, 10(%ebp)
38*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, 10(%ebp,%ebx)
39*9880d681SAndroid Build Coastguard Worker        movl %eax, 10(%ebp, %ebx)
40*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, 10(%ebp,%ebx,4)
41*9880d681SAndroid Build Coastguard Worker        movl %eax, 10(%ebp, %ebx, 4)
42*9880d681SAndroid Build Coastguard Worker// CHECK: movl %eax, 10(,%ebx,4)
43*9880d681SAndroid Build Coastguard Worker        movl %eax, 10(, %ebx, 4)
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker// CHECK: movl 0, %eax
46*9880d681SAndroid Build Coastguard Worker        movl 0, %eax
47*9880d681SAndroid Build Coastguard Worker// CHECK: movl $0, %eax
48*9880d681SAndroid Build Coastguard Worker        movl $0, %eax
49*9880d681SAndroid Build Coastguard Worker
50*9880d681SAndroid Build Coastguard Worker// CHECK: ret
51*9880d681SAndroid Build Coastguard Worker        ret
52*9880d681SAndroid Build Coastguard Worker
53*9880d681SAndroid Build Coastguard Worker// CHECK: retw
54*9880d681SAndroid Build Coastguard Worker        retw
55*9880d681SAndroid Build Coastguard Worker
56*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB32ri8
57*9880d681SAndroid Build Coastguard Worker// CHECK: subl $1, %eax
58*9880d681SAndroid Build Coastguard Worker        subl $1, %eax
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB32ri8
61*9880d681SAndroid Build Coastguard Worker// CHECK: subl $-1, %eax
62*9880d681SAndroid Build Coastguard Worker        subl $-1, %eax
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB32ri
65*9880d681SAndroid Build Coastguard Worker// CHECK: subl $256, %eax
66*9880d681SAndroid Build Coastguard Worker        subl $256, %eax
67*9880d681SAndroid Build Coastguard Worker
68*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches XOR64ri8
69*9880d681SAndroid Build Coastguard Worker// CHECK: xorq $1, %rax
70*9880d681SAndroid Build Coastguard Worker        xorq $1, %rax
71*9880d681SAndroid Build Coastguard Worker
72*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches XOR64ri32
73*9880d681SAndroid Build Coastguard Worker// CHECK: xorq $256, %rax
74*9880d681SAndroid Build Coastguard Worker        xorq $256, %rax
75*9880d681SAndroid Build Coastguard Worker
76*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB8rr
77*9880d681SAndroid Build Coastguard Worker// CHECK: subb %al, %bl
78*9880d681SAndroid Build Coastguard Worker        subb %al, %bl
79*9880d681SAndroid Build Coastguard Worker
80*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB16rr
81*9880d681SAndroid Build Coastguard Worker// CHECK: subw %ax, %bx
82*9880d681SAndroid Build Coastguard Worker        subw %ax, %bx
83*9880d681SAndroid Build Coastguard Worker
84*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches SUB32rr
85*9880d681SAndroid Build Coastguard Worker// CHECK: subl %eax, %ebx
86*9880d681SAndroid Build Coastguard Worker        subl %eax, %ebx
87*9880d681SAndroid Build Coastguard Worker
88*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches the correct instruction.
89*9880d681SAndroid Build Coastguard Worker// CHECK: callq *%rax
90*9880d681SAndroid Build Coastguard Worker        call *%rax
91*9880d681SAndroid Build Coastguard Worker
92*9880d681SAndroid Build Coastguard Worker// FIXME: Check that this matches the correct instruction.
93*9880d681SAndroid Build Coastguard Worker// CHECK: shldl %cl, %eax, %ebx
94*9880d681SAndroid Build Coastguard Worker        shldl %cl, %eax, %ebx
95*9880d681SAndroid Build Coastguard Worker
96*9880d681SAndroid Build Coastguard Worker// CHECK: shll $2, %eax
97*9880d681SAndroid Build Coastguard Worker        shll $2, %eax
98*9880d681SAndroid Build Coastguard Worker
99*9880d681SAndroid Build Coastguard Worker// CHECK: shll $2, %eax
100*9880d681SAndroid Build Coastguard Worker        sall $2, %eax
101*9880d681SAndroid Build Coastguard Worker
102*9880d681SAndroid Build Coastguard Worker// CHECK: rep
103*9880d681SAndroid Build Coastguard Worker// CHECK: insb
104*9880d681SAndroid Build Coastguard Worker        rep;insb
105*9880d681SAndroid Build Coastguard Worker
106*9880d681SAndroid Build Coastguard Worker// CHECK: rep
107*9880d681SAndroid Build Coastguard Worker// CHECK: outsb
108*9880d681SAndroid Build Coastguard Worker        rep;outsb
109*9880d681SAndroid Build Coastguard Worker
110*9880d681SAndroid Build Coastguard Worker// CHECK: rep
111*9880d681SAndroid Build Coastguard Worker// CHECK: movsb
112*9880d681SAndroid Build Coastguard Worker        rep;movsb
113*9880d681SAndroid Build Coastguard Worker
114*9880d681SAndroid Build Coastguard Worker
115*9880d681SAndroid Build Coastguard Worker// rdar://8470918
116*9880d681SAndroid Build Coastguard Workersmovb // CHECK: movsb
117*9880d681SAndroid Build Coastguard Workersmovw // CHECK: movsw
118*9880d681SAndroid Build Coastguard Workersmovl // CHECK: movsl
119*9880d681SAndroid Build Coastguard Workersmovq // CHECK: movsq
120*9880d681SAndroid Build Coastguard Worker
121*9880d681SAndroid Build Coastguard Worker// rdar://8456361
122*9880d681SAndroid Build Coastguard Worker// CHECK: rep
123*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
124*9880d681SAndroid Build Coastguard Worker        rep movsd
125*9880d681SAndroid Build Coastguard Worker
126*9880d681SAndroid Build Coastguard Worker// CHECK: rep
127*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb
128*9880d681SAndroid Build Coastguard Worker        rep;lodsb
129*9880d681SAndroid Build Coastguard Worker
130*9880d681SAndroid Build Coastguard Worker// CHECK: rep
131*9880d681SAndroid Build Coastguard Worker// CHECK: stosb
132*9880d681SAndroid Build Coastguard Worker        rep;stosb
133*9880d681SAndroid Build Coastguard Worker
134*9880d681SAndroid Build Coastguard Worker// NOTE: repz and repe have the same opcode as rep
135*9880d681SAndroid Build Coastguard Worker// CHECK: rep
136*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb
137*9880d681SAndroid Build Coastguard Worker        repz;cmpsb
138*9880d681SAndroid Build Coastguard Worker
139*9880d681SAndroid Build Coastguard Worker// NOTE: repnz has the same opcode as repne
140*9880d681SAndroid Build Coastguard Worker// CHECK: repne
141*9880d681SAndroid Build Coastguard Worker// CHECK: cmpsb
142*9880d681SAndroid Build Coastguard Worker        repnz;cmpsb
143*9880d681SAndroid Build Coastguard Worker
144*9880d681SAndroid Build Coastguard Worker// NOTE: repe and repz have the same opcode as rep
145*9880d681SAndroid Build Coastguard Worker// CHECK: rep
146*9880d681SAndroid Build Coastguard Worker// CHECK: scasb
147*9880d681SAndroid Build Coastguard Worker        repe;scasb
148*9880d681SAndroid Build Coastguard Worker
149*9880d681SAndroid Build Coastguard Worker// CHECK: repne
150*9880d681SAndroid Build Coastguard Worker// CHECK: scasb
151*9880d681SAndroid Build Coastguard Worker        repne;scasb
152*9880d681SAndroid Build Coastguard Worker
153*9880d681SAndroid Build Coastguard Worker// CHECK: lock
154*9880d681SAndroid Build Coastguard Worker// CHECK: cmpxchgb %al, (%ebx)
155*9880d681SAndroid Build Coastguard Worker        lock;cmpxchgb %al, 0(%ebx)
156*9880d681SAndroid Build Coastguard Worker
157*9880d681SAndroid Build Coastguard Worker// CHECK: cs
158*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
159*9880d681SAndroid Build Coastguard Worker        cs;movb 0(%eax), %al
160*9880d681SAndroid Build Coastguard Worker
161*9880d681SAndroid Build Coastguard Worker// CHECK: ss
162*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
163*9880d681SAndroid Build Coastguard Worker        ss;movb 0(%eax), %al
164*9880d681SAndroid Build Coastguard Worker
165*9880d681SAndroid Build Coastguard Worker// CHECK: ds
166*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
167*9880d681SAndroid Build Coastguard Worker        ds;movb 0(%eax), %al
168*9880d681SAndroid Build Coastguard Worker
169*9880d681SAndroid Build Coastguard Worker// CHECK: es
170*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
171*9880d681SAndroid Build Coastguard Worker        es;movb 0(%eax), %al
172*9880d681SAndroid Build Coastguard Worker
173*9880d681SAndroid Build Coastguard Worker// CHECK: fs
174*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
175*9880d681SAndroid Build Coastguard Worker        fs;movb 0(%eax), %al
176*9880d681SAndroid Build Coastguard Worker
177*9880d681SAndroid Build Coastguard Worker// CHECK: gs
178*9880d681SAndroid Build Coastguard Worker// CHECK: movb (%eax), %al
179*9880d681SAndroid Build Coastguard Worker        gs;movb 0(%eax), %al
180*9880d681SAndroid Build Coastguard Worker
181*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(0)
182*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(1)
183*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(7)
184*9880d681SAndroid Build Coastguard Worker
185*9880d681SAndroid Build Coastguard Workerfadd %st(0)
186*9880d681SAndroid Build Coastguard Workerfadd %st(1)
187*9880d681SAndroid Build Coastguard Workerfadd %st(7)
188*9880d681SAndroid Build Coastguard Worker
189*9880d681SAndroid Build Coastguard Worker// CHECK: leal 0, %eax
190*9880d681SAndroid Build Coastguard Worker        leal 0, %eax
191*9880d681SAndroid Build Coastguard Worker
192*9880d681SAndroid Build Coastguard Worker// rdar://7986634 - Insensitivity on opcodes.
193*9880d681SAndroid Build Coastguard Worker// CHECK: int3
194*9880d681SAndroid Build Coastguard WorkerINT3
195*9880d681SAndroid Build Coastguard Worker
196*9880d681SAndroid Build Coastguard Worker// rdar://8735979 - int $3 -> int3
197*9880d681SAndroid Build Coastguard Worker// CHECK: int3
198*9880d681SAndroid Build Coastguard Workerint	$3
199*9880d681SAndroid Build Coastguard Worker
200*9880d681SAndroid Build Coastguard Worker
201*9880d681SAndroid Build Coastguard Worker// Allow scale factor without index register.
202*9880d681SAndroid Build Coastguard Worker// CHECK: movaps	%xmm3, (%esi)
203*9880d681SAndroid Build Coastguard Worker// CHECK-STDERR: warning: scale factor without index register is ignored
204*9880d681SAndroid Build Coastguard Workermovaps %xmm3, (%esi, 2)
205*9880d681SAndroid Build Coastguard Worker
206*9880d681SAndroid Build Coastguard Worker// CHECK: imull $12, %eax
207*9880d681SAndroid Build Coastguard Workerimul $12, %eax
208*9880d681SAndroid Build Coastguard Worker
209*9880d681SAndroid Build Coastguard Worker// CHECK: imull %ecx, %eax
210*9880d681SAndroid Build Coastguard Workerimull %ecx, %eax
211*9880d681SAndroid Build Coastguard Worker
212*9880d681SAndroid Build Coastguard Worker
213*9880d681SAndroid Build Coastguard Worker// rdar://8208481
214*9880d681SAndroid Build Coastguard Worker// CHECK: outb	%al, $161
215*9880d681SAndroid Build Coastguard Workeroutb	%al, $161
216*9880d681SAndroid Build Coastguard Worker// CHECK: outw	%ax, $128
217*9880d681SAndroid Build Coastguard Workeroutw	%ax, $128
218*9880d681SAndroid Build Coastguard Worker// CHECK: inb	$161, %al
219*9880d681SAndroid Build Coastguard Workerinb	$161, %al
220*9880d681SAndroid Build Coastguard Worker
221*9880d681SAndroid Build Coastguard Worker// rdar://8017621
222*9880d681SAndroid Build Coastguard Worker// CHECK: pushq	$1
223*9880d681SAndroid Build Coastguard Workerpush $1
224*9880d681SAndroid Build Coastguard Worker
225*9880d681SAndroid Build Coastguard Worker// rdar://9716860
226*9880d681SAndroid Build Coastguard Workerpushq $1
227*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x6a,0x01]
228*9880d681SAndroid Build Coastguard Workerpushq $1111111
229*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x68,0x47,0xf4,0x10,0x00]
230*9880d681SAndroid Build Coastguard Worker
231*9880d681SAndroid Build Coastguard Worker// rdar://8017530
232*9880d681SAndroid Build Coastguard Worker// CHECK: sldtw	4
233*9880d681SAndroid Build Coastguard Workersldt	4
234*9880d681SAndroid Build Coastguard Worker
235*9880d681SAndroid Build Coastguard Worker// rdar://8208499
236*9880d681SAndroid Build Coastguard Worker// CHECK: cmovnew	%bx, %ax
237*9880d681SAndroid Build Coastguard Workercmovnz %bx, %ax
238*9880d681SAndroid Build Coastguard Worker// CHECK: cmovneq	%rbx, %rax
239*9880d681SAndroid Build Coastguard Workercmovnzq %rbx, %rax
240*9880d681SAndroid Build Coastguard Worker
241*9880d681SAndroid Build Coastguard Worker
242*9880d681SAndroid Build Coastguard Worker// rdar://8407928
243*9880d681SAndroid Build Coastguard Worker// CHECK: inb	$127, %al
244*9880d681SAndroid Build Coastguard Worker// CHECK: inw	%dx, %ax
245*9880d681SAndroid Build Coastguard Worker// CHECK: outb	%al, $127
246*9880d681SAndroid Build Coastguard Worker// CHECK: outw	%ax, %dx
247*9880d681SAndroid Build Coastguard Worker// CHECK: inl	%dx, %eax
248*9880d681SAndroid Build Coastguard Workerinb	$0x7f
249*9880d681SAndroid Build Coastguard Workerinw	%dx
250*9880d681SAndroid Build Coastguard Workeroutb	$0x7f
251*9880d681SAndroid Build Coastguard Workeroutw	%dx
252*9880d681SAndroid Build Coastguard Workerinl	%dx
253*9880d681SAndroid Build Coastguard Worker
254*9880d681SAndroid Build Coastguard Worker
255*9880d681SAndroid Build Coastguard Worker// PR8114
256*9880d681SAndroid Build Coastguard Worker// CHECK: outb	%al, %dx
257*9880d681SAndroid Build Coastguard Worker// CHECK: outb	%al, %dx
258*9880d681SAndroid Build Coastguard Worker// CHECK: outw	%ax, %dx
259*9880d681SAndroid Build Coastguard Worker// CHECK: outw	%ax, %dx
260*9880d681SAndroid Build Coastguard Worker// CHECK: outl	%eax, %dx
261*9880d681SAndroid Build Coastguard Worker// CHECK: outl	%eax, %dx
262*9880d681SAndroid Build Coastguard Worker
263*9880d681SAndroid Build Coastguard Workerout	%al, (%dx)
264*9880d681SAndroid Build Coastguard Workeroutb	%al, (%dx)
265*9880d681SAndroid Build Coastguard Workerout	%ax, (%dx)
266*9880d681SAndroid Build Coastguard Workeroutw	%ax, (%dx)
267*9880d681SAndroid Build Coastguard Workerout	%eax, (%dx)
268*9880d681SAndroid Build Coastguard Workeroutl	%eax, (%dx)
269*9880d681SAndroid Build Coastguard Worker
270*9880d681SAndroid Build Coastguard Worker// CHECK: inb	%dx, %al
271*9880d681SAndroid Build Coastguard Worker// CHECK: inb	%dx, %al
272*9880d681SAndroid Build Coastguard Worker// CHECK: inw	%dx, %ax
273*9880d681SAndroid Build Coastguard Worker// CHECK: inw	%dx, %ax
274*9880d681SAndroid Build Coastguard Worker// CHECK: inl	%dx, %eax
275*9880d681SAndroid Build Coastguard Worker// CHECK: inl	%dx, %eax
276*9880d681SAndroid Build Coastguard Worker
277*9880d681SAndroid Build Coastguard Workerin	(%dx), %al
278*9880d681SAndroid Build Coastguard Workerinb	(%dx), %al
279*9880d681SAndroid Build Coastguard Workerin	(%dx), %ax
280*9880d681SAndroid Build Coastguard Workerinw	(%dx), %ax
281*9880d681SAndroid Build Coastguard Workerin	(%dx), %eax
282*9880d681SAndroid Build Coastguard Workerinl	(%dx), %eax
283*9880d681SAndroid Build Coastguard Worker
284*9880d681SAndroid Build Coastguard Worker//PR15455
285*9880d681SAndroid Build Coastguard Worker
286*9880d681SAndroid Build Coastguard Worker// permitted invalid memory forms
287*9880d681SAndroid Build Coastguard Workerouts	(%rsi), (%dx)
288*9880d681SAndroid Build Coastguard Worker// CHECK: outsw	(%rsi), %dx
289*9880d681SAndroid Build Coastguard Workeroutsb	(%rsi), (%dx)
290*9880d681SAndroid Build Coastguard Worker// CHECK: outsb	(%rsi), %dx
291*9880d681SAndroid Build Coastguard Workeroutsw	(%rsi), (%dx)
292*9880d681SAndroid Build Coastguard Worker// CHECK: outsw	(%rsi), %dx
293*9880d681SAndroid Build Coastguard Workeroutsl	(%rsi), (%dx)
294*9880d681SAndroid Build Coastguard Worker// CHECK: outsl	(%rsi), %dx
295*9880d681SAndroid Build Coastguard Worker
296*9880d681SAndroid Build Coastguard Workerins	(%dx), %es:(%rdi)
297*9880d681SAndroid Build Coastguard Worker// CHECK: insw	%dx, %es:(%rdi)
298*9880d681SAndroid Build Coastguard Workerinsb	(%dx), %es:(%rdi)
299*9880d681SAndroid Build Coastguard Worker// CHECK: insb	%dx, %es:(%rdi)
300*9880d681SAndroid Build Coastguard Workerinsw	(%dx), %es:(%rdi)
301*9880d681SAndroid Build Coastguard Worker// CHECK: insw	%dx, %es:(%rdi)
302*9880d681SAndroid Build Coastguard Workerinsl	(%dx), %es:(%rdi)
303*9880d681SAndroid Build Coastguard Worker// CHECK: insl	%dx, %es:(%rdi)
304*9880d681SAndroid Build Coastguard Worker
305*9880d681SAndroid Build Coastguard Worker// rdar://8431422
306*9880d681SAndroid Build Coastguard Worker
307*9880d681SAndroid Build Coastguard Worker// CHECK: fxch %st(1)
308*9880d681SAndroid Build Coastguard Worker// CHECK: fucom %st(1)
309*9880d681SAndroid Build Coastguard Worker// CHECK: fucomp %st(1)
310*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1)
311*9880d681SAndroid Build Coastguard Worker// CHECK: faddp	%st(0)
312*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1)
313*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1)
314*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1)
315*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1)
316*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1)
317*9880d681SAndroid Build Coastguard Worker
318*9880d681SAndroid Build Coastguard Workerfxch
319*9880d681SAndroid Build Coastguard Workerfucom
320*9880d681SAndroid Build Coastguard Workerfucomp
321*9880d681SAndroid Build Coastguard Workerfaddp
322*9880d681SAndroid Build Coastguard Workerfaddp %st
323*9880d681SAndroid Build Coastguard Workerfsubp
324*9880d681SAndroid Build Coastguard Workerfsubrp
325*9880d681SAndroid Build Coastguard Workerfmulp
326*9880d681SAndroid Build Coastguard Workerfdivp
327*9880d681SAndroid Build Coastguard Workerfdivrp
328*9880d681SAndroid Build Coastguard Worker
329*9880d681SAndroid Build Coastguard Worker// CHECK: fcomi %st(1)
330*9880d681SAndroid Build Coastguard Worker// CHECK: fcomi	%st(2)
331*9880d681SAndroid Build Coastguard Worker// CHECK: fucomi %st(1)
332*9880d681SAndroid Build Coastguard Worker// CHECK: fucomi %st(2)
333*9880d681SAndroid Build Coastguard Worker// CHECK: fucomi %st(2)
334*9880d681SAndroid Build Coastguard Worker
335*9880d681SAndroid Build Coastguard Workerfcomi
336*9880d681SAndroid Build Coastguard Workerfcomi	%st(2)
337*9880d681SAndroid Build Coastguard Workerfucomi
338*9880d681SAndroid Build Coastguard Workerfucomi	%st(2)
339*9880d681SAndroid Build Coastguard Workerfucomi	%st(2), %st
340*9880d681SAndroid Build Coastguard Worker
341*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax
342*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax
343*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax
344*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw %ax
345*9880d681SAndroid Build Coastguard Worker
346*9880d681SAndroid Build Coastguard Workerfnstsw
347*9880d681SAndroid Build Coastguard Workerfnstsw %ax
348*9880d681SAndroid Build Coastguard Workerfnstsw %eax
349*9880d681SAndroid Build Coastguard Workerfnstsw %al
350*9880d681SAndroid Build Coastguard Worker
351*9880d681SAndroid Build Coastguard Worker// rdar://8431880
352*9880d681SAndroid Build Coastguard Worker// CHECK: rclb	%bl
353*9880d681SAndroid Build Coastguard Worker// CHECK: rcll	3735928559(%ebx,%ecx,8)
354*9880d681SAndroid Build Coastguard Worker// CHECK: rcrl	%ecx
355*9880d681SAndroid Build Coastguard Worker// CHECK: rcrl	305419896
356*9880d681SAndroid Build Coastguard Workerrcl	%bl
357*9880d681SAndroid Build Coastguard Workerrcll	0xdeadbeef(%ebx,%ecx,8)
358*9880d681SAndroid Build Coastguard Workerrcr	%ecx
359*9880d681SAndroid Build Coastguard Workerrcrl	0x12345678
360*9880d681SAndroid Build Coastguard Worker
361*9880d681SAndroid Build Coastguard Workerrclb	%bl       // CHECK: rclb %bl     # encoding: [0xd0,0xd3]
362*9880d681SAndroid Build Coastguard Workerrclb	$1, %bl   // CHECK: rclb %bl     # encoding: [0xd0,0xd3]
363*9880d681SAndroid Build Coastguard Workerrclb	$2, %bl   // CHECK: rclb $2, %bl # encoding: [0xc0,0xd3,0x02]
364*9880d681SAndroid Build Coastguard Worker
365*9880d681SAndroid Build Coastguard Worker// rdar://8418316
366*9880d681SAndroid Build Coastguard Worker// PR12173
367*9880d681SAndroid Build Coastguard Worker// CHECK: shldw	%cl, %bx, %dx
368*9880d681SAndroid Build Coastguard Worker// CHECK: shldw	%cl, %bx, %dx
369*9880d681SAndroid Build Coastguard Worker// CHECK: shldw	$1, %bx, %dx
370*9880d681SAndroid Build Coastguard Worker// CHECK: shldw	%cl, %bx, (%rax)
371*9880d681SAndroid Build Coastguard Worker// CHECK: shldw	%cl, %bx, (%rax)
372*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw	%cl, %bx, %dx
373*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw	%cl, %bx, %dx
374*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw	$1, %bx, %dx
375*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw	%cl, %bx, (%rax)
376*9880d681SAndroid Build Coastguard Worker// CHECK: shrdw	%cl, %bx, (%rax)
377*9880d681SAndroid Build Coastguard Worker
378*9880d681SAndroid Build Coastguard Workershld  %bx, %dx
379*9880d681SAndroid Build Coastguard Workershld  %cl, %bx, %dx
380*9880d681SAndroid Build Coastguard Workershld  $1, %bx, %dx
381*9880d681SAndroid Build Coastguard Workershld  %bx, (%rax)
382*9880d681SAndroid Build Coastguard Workershld  %cl, %bx, (%rax)
383*9880d681SAndroid Build Coastguard Workershrd  %bx, %dx
384*9880d681SAndroid Build Coastguard Workershrd  %cl, %bx, %dx
385*9880d681SAndroid Build Coastguard Workershrd  $1, %bx, %dx
386*9880d681SAndroid Build Coastguard Workershrd  %bx, (%rax)
387*9880d681SAndroid Build Coastguard Workershrd  %cl, %bx, (%rax)
388*9880d681SAndroid Build Coastguard Worker
389*9880d681SAndroid Build Coastguard Worker// CHECK: sldtl	%ecx
390*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x00,0xc1]
391*9880d681SAndroid Build Coastguard Worker// CHECK: sldtw	%cx
392*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x00,0xc1]
393*9880d681SAndroid Build Coastguard Worker
394*9880d681SAndroid Build Coastguard Workersldt	%ecx
395*9880d681SAndroid Build Coastguard Workersldt	%cx
396*9880d681SAndroid Build Coastguard Worker
397*9880d681SAndroid Build Coastguard Worker// CHECK: lcalll	*3135175374
398*9880d681SAndroid Build Coastguard Worker// CHECK: ljmpl	*3135175374
399*9880d681SAndroid Build Coastguard Workerlcall	*0xbadeface
400*9880d681SAndroid Build Coastguard Workerljmp	*0xbadeface
401*9880d681SAndroid Build Coastguard Worker
402*9880d681SAndroid Build Coastguard Worker
403*9880d681SAndroid Build Coastguard Worker// rdar://8444631
404*9880d681SAndroid Build Coastguard Worker// CHECK: enter	$31438, $0
405*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc8,0xce,0x7a,0x00]
406*9880d681SAndroid Build Coastguard Worker// CHECK: enter	$31438, $1
407*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc8,0xce,0x7a,0x01]
408*9880d681SAndroid Build Coastguard Worker// CHECK: enter	$31438, $127
409*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc8,0xce,0x7a,0x7f]
410*9880d681SAndroid Build Coastguard Workerenter $0x7ace,$0
411*9880d681SAndroid Build Coastguard Workerenter $0x7ace,$1
412*9880d681SAndroid Build Coastguard Workerenter $0x7ace,$0x7f
413*9880d681SAndroid Build Coastguard Worker
414*9880d681SAndroid Build Coastguard Worker
415*9880d681SAndroid Build Coastguard Worker// rdar://8456364
416*9880d681SAndroid Build Coastguard Worker// CHECK: movw	%cs, %ax
417*9880d681SAndroid Build Coastguard Workermov %CS, %ax
418*9880d681SAndroid Build Coastguard Worker
419*9880d681SAndroid Build Coastguard Worker// rdar://8456391
420*9880d681SAndroid Build Coastguard Workerfcmovb %st(1), %st(0)   // CHECK: fcmovb	%st(1), %st(0)
421*9880d681SAndroid Build Coastguard Workerfcmove %st(1), %st(0)   // CHECK: fcmove	%st(1), %st(0)
422*9880d681SAndroid Build Coastguard Workerfcmovbe %st(1), %st(0)  // CHECK: fcmovbe	%st(1), %st(0)
423*9880d681SAndroid Build Coastguard Workerfcmovu %st(1), %st(0)   // CHECK: fcmovu	 %st(1), %st(0)
424*9880d681SAndroid Build Coastguard Worker
425*9880d681SAndroid Build Coastguard Workerfcmovnb %st(1), %st(0)  // CHECK: fcmovnb	%st(1), %st(0)
426*9880d681SAndroid Build Coastguard Workerfcmovne %st(1), %st(0)  // CHECK: fcmovne	%st(1), %st(0)
427*9880d681SAndroid Build Coastguard Workerfcmovnbe %st(1), %st(0) // CHECK: fcmovnbe	%st(1), %st(0)
428*9880d681SAndroid Build Coastguard Workerfcmovnu %st(1), %st(0)  // CHECK: fcmovnu	%st(1), %st(0)
429*9880d681SAndroid Build Coastguard Worker
430*9880d681SAndroid Build Coastguard Workerfcmovnae %st(1), %st(0) // CHECK: fcmovb	%st(1), %st(0)
431*9880d681SAndroid Build Coastguard Workerfcmovna %st(1), %st(0)  // CHECK: fcmovbe	%st(1), %st(0)
432*9880d681SAndroid Build Coastguard Worker
433*9880d681SAndroid Build Coastguard Workerfcmovae %st(1), %st(0)  // CHECK: fcmovnb	%st(1), %st(0)
434*9880d681SAndroid Build Coastguard Workerfcmova %st(1), %st(0)   // CHECK: fcmovnbe	%st(1), %st(0)
435*9880d681SAndroid Build Coastguard Worker
436*9880d681SAndroid Build Coastguard Worker// rdar://8456417
437*9880d681SAndroid Build Coastguard Worker.byte (88 + 1) & 15  // CHECK: .byte	9
438*9880d681SAndroid Build Coastguard Worker
439*9880d681SAndroid Build Coastguard Worker// rdar://8456412
440*9880d681SAndroid Build Coastguard Workermov %rdx, %cr0
441*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%rdx, %cr0
442*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x22,0xc2]
443*9880d681SAndroid Build Coastguard Workermov %rdx, %cr4
444*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%rdx, %cr4
445*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x22,0xe2]
446*9880d681SAndroid Build Coastguard Workermov %rdx, %cr8
447*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%rdx, %cr8
448*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x44,0x0f,0x22,0xc2]
449*9880d681SAndroid Build Coastguard Workermov %rdx, %cr15
450*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%rdx, %cr15
451*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x44,0x0f,0x22,0xfa]
452*9880d681SAndroid Build Coastguard Worker
453*9880d681SAndroid Build Coastguard Worker// rdar://8456371 - Handle commutable instructions written backward.
454*9880d681SAndroid Build Coastguard Worker// CHECK: 	faddp	%st(1)
455*9880d681SAndroid Build Coastguard Worker// CHECK:	fmulp	%st(2)
456*9880d681SAndroid Build Coastguard Workerfaddp %st, %st(1)
457*9880d681SAndroid Build Coastguard Workerfmulp %st, %st(2)
458*9880d681SAndroid Build Coastguard Worker
459*9880d681SAndroid Build Coastguard Worker// rdar://8468087 - Encode these accurately, they are not synonyms.
460*9880d681SAndroid Build Coastguard Worker// CHECK: fmul	%st(0), %st(1)
461*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xdc,0xc9]
462*9880d681SAndroid Build Coastguard Worker// CHECK: fmul	%st(1)
463*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xd8,0xc9]
464*9880d681SAndroid Build Coastguard Workerfmul %st, %st(1)
465*9880d681SAndroid Build Coastguard Workerfmul %st(1), %st
466*9880d681SAndroid Build Coastguard Worker
467*9880d681SAndroid Build Coastguard Worker// CHECK: fadd	%st(0), %st(1)
468*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xdc,0xc1]
469*9880d681SAndroid Build Coastguard Worker// CHECK: fadd	%st(1)
470*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xd8,0xc1]
471*9880d681SAndroid Build Coastguard Workerfadd %st, %st(1)
472*9880d681SAndroid Build Coastguard Workerfadd %st(1), %st
473*9880d681SAndroid Build Coastguard Worker
474*9880d681SAndroid Build Coastguard Worker
475*9880d681SAndroid Build Coastguard Worker// rdar://8416805
476*9880d681SAndroid Build Coastguard Worker// CHECK: xorb	%al, %al
477*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x30,0xc0]
478*9880d681SAndroid Build Coastguard Worker// CHECK: xorw	%di, %di
479*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x31,0xff]
480*9880d681SAndroid Build Coastguard Worker// CHECK: xorl	%esi, %esi
481*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x31,0xf6]
482*9880d681SAndroid Build Coastguard Worker// CHECK: xorq	%rsi, %rsi
483*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x31,0xf6]
484*9880d681SAndroid Build Coastguard Workerclrb    %al
485*9880d681SAndroid Build Coastguard Workerclr    %di
486*9880d681SAndroid Build Coastguard Workerclr    %esi
487*9880d681SAndroid Build Coastguard Workerclr    %rsi
488*9880d681SAndroid Build Coastguard Worker
489*9880d681SAndroid Build Coastguard Worker// rdar://8456378
490*9880d681SAndroid Build Coastguard Workercltq  // CHECK: cltq
491*9880d681SAndroid Build Coastguard Workercdqe  // CHECK: cltq
492*9880d681SAndroid Build Coastguard Workercwde  // CHECK: cwtl
493*9880d681SAndroid Build Coastguard Workercwtl  // CHECK: cwtl
494*9880d681SAndroid Build Coastguard Worker
495*9880d681SAndroid Build Coastguard Worker// rdar://8416805
496*9880d681SAndroid Build Coastguard Workercbw   // CHECK: cbtw
497*9880d681SAndroid Build Coastguard Workercwd   // CHECK: cwtd
498*9880d681SAndroid Build Coastguard Workercdq   // CHECK: cltd
499*9880d681SAndroid Build Coastguard Workercqo   // CHECK: cqto
500*9880d681SAndroid Build Coastguard Worker
501*9880d681SAndroid Build Coastguard Worker// rdar://8456378 and PR7557 - fstsw
502*9880d681SAndroid Build Coastguard Workerfstsw %ax
503*9880d681SAndroid Build Coastguard Worker// CHECK: wait
504*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw
505*9880d681SAndroid Build Coastguard Workerfstsw (%rax)
506*9880d681SAndroid Build Coastguard Worker// CHECK: wait
507*9880d681SAndroid Build Coastguard Worker// CHECK: fnstsw (%rax)
508*9880d681SAndroid Build Coastguard Worker
509*9880d681SAndroid Build Coastguard Worker// PR8259
510*9880d681SAndroid Build Coastguard Workerfstcw (%rsp)
511*9880d681SAndroid Build Coastguard Worker// CHECK: wait
512*9880d681SAndroid Build Coastguard Worker// CHECK: fnstcw (%rsp)
513*9880d681SAndroid Build Coastguard Worker
514*9880d681SAndroid Build Coastguard Worker// PR8259
515*9880d681SAndroid Build Coastguard Workerfstcw (%rsp)
516*9880d681SAndroid Build Coastguard Worker// CHECK: wait
517*9880d681SAndroid Build Coastguard Worker// CHECK: fnstcw (%rsp)
518*9880d681SAndroid Build Coastguard Worker
519*9880d681SAndroid Build Coastguard Worker// PR8258
520*9880d681SAndroid Build Coastguard Workerfinit
521*9880d681SAndroid Build Coastguard Worker// CHECK: wait
522*9880d681SAndroid Build Coastguard Worker// CHECK: fninit
523*9880d681SAndroid Build Coastguard Worker
524*9880d681SAndroid Build Coastguard Workerfsave	32493
525*9880d681SAndroid Build Coastguard Worker// CHECK: wait
526*9880d681SAndroid Build Coastguard Worker// CHECK: fnsave 32493
527*9880d681SAndroid Build Coastguard Worker
528*9880d681SAndroid Build Coastguard Worker
529*9880d681SAndroid Build Coastguard Worker// rdar://8456382 - cvtsd2si support.
530*9880d681SAndroid Build Coastguard Workercvtsd2si	%xmm1, %rax
531*9880d681SAndroid Build Coastguard Worker// CHECK: cvtsd2si	%xmm1, %rax
532*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf2,0x48,0x0f,0x2d,0xc1]
533*9880d681SAndroid Build Coastguard Workercvtsd2si	%xmm1, %eax
534*9880d681SAndroid Build Coastguard Worker// CHECK: cvtsd2si	%xmm1, %eax
535*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf2,0x0f,0x2d,0xc1]
536*9880d681SAndroid Build Coastguard Worker
537*9880d681SAndroid Build Coastguard Workercvtsd2siq %xmm0, %rax // CHECK: cvtsd2si	%xmm0, %rax
538*9880d681SAndroid Build Coastguard Workercvtsd2sil %xmm0, %eax // CHECK: cvtsd2si	%xmm0, %eax
539*9880d681SAndroid Build Coastguard Workercvtsd2si %xmm0, %rax  // CHECK: cvtsd2si	%xmm0, %rax
540*9880d681SAndroid Build Coastguard Worker
541*9880d681SAndroid Build Coastguard Worker
542*9880d681SAndroid Build Coastguard Workercvttpd2dq %xmm1, %xmm0  // CHECK: cvttpd2dq %xmm1, %xmm0
543*9880d681SAndroid Build Coastguard Workercvttpd2dq (%rax), %xmm0 // CHECK: cvttpd2dq (%rax), %xmm0
544*9880d681SAndroid Build Coastguard Worker
545*9880d681SAndroid Build Coastguard Workercvttps2dq %xmm1, %xmm0  // CHECK: cvttps2dq %xmm1, %xmm0
546*9880d681SAndroid Build Coastguard Workercvttps2dq (%rax), %xmm0 // CHECK: cvttps2dq (%rax), %xmm0
547*9880d681SAndroid Build Coastguard Worker
548*9880d681SAndroid Build Coastguard Worker// rdar://8456376 - llvm-mc rejects 'roundss'
549*9880d681SAndroid Build Coastguard Workerroundss $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0a,0xc0,0x0e]
550*9880d681SAndroid Build Coastguard Workerroundps $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x08,0xc0,0x0e]
551*9880d681SAndroid Build Coastguard Workerroundsd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x0b,0xc0,0x0e]
552*9880d681SAndroid Build Coastguard Workerroundpd $0xE, %xmm0, %xmm0 // CHECK: encoding: [0x66,0x0f,0x3a,0x09,0xc0,0x0e]
553*9880d681SAndroid Build Coastguard Worker
554*9880d681SAndroid Build Coastguard Worker
555*9880d681SAndroid Build Coastguard Worker// rdar://8482675 - 32-bit mem operand support in 64-bit mode (0x67 prefix)
556*9880d681SAndroid Build Coastguard Workerleal	8(%eax), %esi
557*9880d681SAndroid Build Coastguard Worker// CHECK: leal	8(%eax), %esi
558*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x8d,0x70,0x08]
559*9880d681SAndroid Build Coastguard Workerleaq	8(%eax), %rsi
560*9880d681SAndroid Build Coastguard Worker// CHECK: leaq	8(%eax), %rsi
561*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x48,0x8d,0x70,0x08]
562*9880d681SAndroid Build Coastguard Workerleaq	8(%rax), %rsi
563*9880d681SAndroid Build Coastguard Worker// CHECK: leaq	8(%rax), %rsi
564*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x8d,0x70,0x08]
565*9880d681SAndroid Build Coastguard Worker
566*9880d681SAndroid Build Coastguard Worker
567*9880d681SAndroid Build Coastguard Workercvttpd2dq	0xdeadbeef(%ebx,%ecx,8),%xmm5
568*9880d681SAndroid Build Coastguard Worker// CHECK: cvttpd2dq	3735928559(%ebx,%ecx,8), %xmm5
569*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x66,0x0f,0xe6,0xac,0xcb,0xef,0xbe,0xad,0xde]
570*9880d681SAndroid Build Coastguard Worker
571*9880d681SAndroid Build Coastguard Worker// rdar://8490728 - llvm-mc rejects 'movmskpd'
572*9880d681SAndroid Build Coastguard Workermovmskpd	%xmm6, %rax
573*9880d681SAndroid Build Coastguard Worker// CHECK: movmskpd	%xmm6, %eax
574*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x50,0xc6]
575*9880d681SAndroid Build Coastguard Workermovmskpd	%xmm6, %eax
576*9880d681SAndroid Build Coastguard Worker// CHECK: movmskpd	%xmm6, %eax
577*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x50,0xc6]
578*9880d681SAndroid Build Coastguard Worker
579*9880d681SAndroid Build Coastguard Worker// rdar://8491845 - Gas supports commuted forms of non-commutable instructions.
580*9880d681SAndroid Build Coastguard Workerfdivrp %st(0), %st(1) // CHECK: encoding: [0xde,0xf9]
581*9880d681SAndroid Build Coastguard Workerfdivrp %st(1), %st(0) // CHECK: encoding: [0xde,0xf9]
582*9880d681SAndroid Build Coastguard Worker
583*9880d681SAndroid Build Coastguard Workerfsubrp %ST(0), %ST(1) // CHECK: encoding: [0xde,0xe9]
584*9880d681SAndroid Build Coastguard Workerfsubrp %ST(1), %ST(0) // CHECK: encoding: [0xde,0xe9]
585*9880d681SAndroid Build Coastguard Worker
586*9880d681SAndroid Build Coastguard Worker// also PR8861
587*9880d681SAndroid Build Coastguard Workerfdivp %st(0), %st(1) // CHECK: encoding: [0xde,0xf1]
588*9880d681SAndroid Build Coastguard Workerfdivp %st(1), %st(0) // CHECK: encoding: [0xde,0xf1]
589*9880d681SAndroid Build Coastguard Worker
590*9880d681SAndroid Build Coastguard Worker
591*9880d681SAndroid Build Coastguard Workermovl	foo(%rip), %eax
592*9880d681SAndroid Build Coastguard Worker// CHECK: movl	foo(%rip), %eax
593*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x8b,0x05,A,A,A,A]
594*9880d681SAndroid Build Coastguard Worker// CHECK: fixup A - offset: 2, value: foo-4, kind: reloc_riprel_4byte
595*9880d681SAndroid Build Coastguard Worker
596*9880d681SAndroid Build Coastguard Workermovb	$12, foo(%rip)
597*9880d681SAndroid Build Coastguard Worker// CHECK: movb	$12, foo(%rip)
598*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc6,0x05,A,A,A,A,0x0c]
599*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 2, value: foo-5, kind: reloc_riprel_4byte
600*9880d681SAndroid Build Coastguard Worker
601*9880d681SAndroid Build Coastguard Workermovw	$12, foo(%rip)
602*9880d681SAndroid Build Coastguard Worker// CHECK: movw	$12, foo(%rip)
603*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0xc7,0x05,A,A,A,A,0x0c,0x00]
604*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 3, value: foo-6, kind: reloc_riprel_4byte
605*9880d681SAndroid Build Coastguard Worker
606*9880d681SAndroid Build Coastguard Workermovl	$12, foo(%rip)
607*9880d681SAndroid Build Coastguard Worker// CHECK: movl	$12, foo(%rip)
608*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
609*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 2, value: foo-8, kind: reloc_riprel_4byte
610*9880d681SAndroid Build Coastguard Worker
611*9880d681SAndroid Build Coastguard Workermovq	$12, foo(%rip)
612*9880d681SAndroid Build Coastguard Worker// CHECK:  movq	$12, foo(%rip)
613*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
614*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte
615*9880d681SAndroid Build Coastguard Worker
616*9880d681SAndroid Build Coastguard Workermovl	foo(%eip), %eax
617*9880d681SAndroid Build Coastguard Worker// CHECK: movl	foo(%eip), %eax
618*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x8b,0x05,A,A,A,A]
619*9880d681SAndroid Build Coastguard Worker// CHECK: fixup A - offset: 3, value: foo-4, kind: reloc_riprel_4byte
620*9880d681SAndroid Build Coastguard Worker
621*9880d681SAndroid Build Coastguard Workermovb	$12, foo(%eip)
622*9880d681SAndroid Build Coastguard Worker// CHECK: movb	$12, foo(%eip)
623*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0xc6,0x05,A,A,A,A,0x0c]
624*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 3, value: foo-5, kind: reloc_riprel_4byte
625*9880d681SAndroid Build Coastguard Worker
626*9880d681SAndroid Build Coastguard Workermovw	$12, foo(%eip)
627*9880d681SAndroid Build Coastguard Worker// CHECK: movw	$12, foo(%eip)
628*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x66,0xc7,0x05,A,A,A,A,0x0c,0x00]
629*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 4, value: foo-6, kind: reloc_riprel_4byte
630*9880d681SAndroid Build Coastguard Worker
631*9880d681SAndroid Build Coastguard Workermovl	$12, foo(%eip)
632*9880d681SAndroid Build Coastguard Worker// CHECK: movl	$12, foo(%eip)
633*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
634*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 3, value: foo-8, kind: reloc_riprel_4byte
635*9880d681SAndroid Build Coastguard Worker
636*9880d681SAndroid Build Coastguard Workermovq	$12, foo(%eip)
637*9880d681SAndroid Build Coastguard Worker// CHECK:  movq	$12, foo(%eip)
638*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x67,0x48,0xc7,0x05,A,A,A,A,0x0c,0x00,0x00,0x00]
639*9880d681SAndroid Build Coastguard Worker// CHECK:    fixup A - offset: 4, value: foo-8, kind: reloc_riprel_4byte
640*9880d681SAndroid Build Coastguard Worker
641*9880d681SAndroid Build Coastguard Worker// CHECK: addq	$-424, %rax
642*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x05,0x58,0xfe,0xff,0xff]
643*9880d681SAndroid Build Coastguard Workeraddq $-424, %rax
644*9880d681SAndroid Build Coastguard Worker
645*9880d681SAndroid Build Coastguard Worker
646*9880d681SAndroid Build Coastguard Worker// CHECK: movq	_foo@GOTPCREL(%rip), %rax
647*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x48,0x8b,0x05,A,A,A,A]
648*9880d681SAndroid Build Coastguard Worker// CHECK:  fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
649*9880d681SAndroid Build Coastguard Workermovq _foo@GOTPCREL(%rip), %rax
650*9880d681SAndroid Build Coastguard Worker
651*9880d681SAndroid Build Coastguard Worker// CHECK: movq	_foo@GOTPCREL(%rip), %r14
652*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x4c,0x8b,0x35,A,A,A,A]
653*9880d681SAndroid Build Coastguard Worker// CHECK:  fixup A - offset: 3, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
654*9880d681SAndroid Build Coastguard Workermovq _foo@GOTPCREL(%rip), %r14
655*9880d681SAndroid Build Coastguard Worker
656*9880d681SAndroid Build Coastguard Worker// CHECK: movq	_foo@GOTPCREL(%eip), %rax
657*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x67,0x48,0x8b,0x05,A,A,A,A]
658*9880d681SAndroid Build Coastguard Worker// CHECK:  fixup A - offset: 4, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
659*9880d681SAndroid Build Coastguard Workermovq _foo@GOTPCREL(%eip), %rax
660*9880d681SAndroid Build Coastguard Worker
661*9880d681SAndroid Build Coastguard Worker// CHECK: movq	_foo@GOTPCREL(%eip), %r14
662*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x67,0x4c,0x8b,0x35,A,A,A,A]
663*9880d681SAndroid Build Coastguard Worker// CHECK:  fixup A - offset: 4, value: _foo@GOTPCREL-4, kind: reloc_riprel_4byte_movq_load
664*9880d681SAndroid Build Coastguard Workermovq _foo@GOTPCREL(%eip), %r14
665*9880d681SAndroid Build Coastguard Worker
666*9880d681SAndroid Build Coastguard Worker// CHECK: movq	(%r13,%rax,8), %r13
667*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x4d,0x8b,0x6c,0xc5,0x00]
668*9880d681SAndroid Build Coastguard Workermovq 0x00(%r13,%rax,8),%r13
669*9880d681SAndroid Build Coastguard Worker
670*9880d681SAndroid Build Coastguard Worker// CHECK: testq	%rax, %rbx
671*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x48,0x85,0xc3]
672*9880d681SAndroid Build Coastguard Workertestq %rax, %rbx
673*9880d681SAndroid Build Coastguard Worker
674*9880d681SAndroid Build Coastguard Worker// CHECK: cmpq	%rbx, %r14
675*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0x49,0x39,0xde]
676*9880d681SAndroid Build Coastguard Worker        cmpq %rbx, %r14
677*9880d681SAndroid Build Coastguard Worker
678*9880d681SAndroid Build Coastguard Worker// rdar://7947167
679*9880d681SAndroid Build Coastguard Worker
680*9880d681SAndroid Build Coastguard Workermovsq
681*9880d681SAndroid Build Coastguard Worker// CHECK: movsq
682*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0x48,0xa5]
683*9880d681SAndroid Build Coastguard Worker
684*9880d681SAndroid Build Coastguard Workermovsl
685*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
686*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0xa5]
687*9880d681SAndroid Build Coastguard Worker
688*9880d681SAndroid Build Coastguard Workerstosq
689*9880d681SAndroid Build Coastguard Worker// CHECK: stosq
690*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0x48,0xab]
691*9880d681SAndroid Build Coastguard Workerstosl
692*9880d681SAndroid Build Coastguard Worker// CHECK: stosl
693*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0xab]
694*9880d681SAndroid Build Coastguard Worker
695*9880d681SAndroid Build Coastguard Worker
696*9880d681SAndroid Build Coastguard Worker// Not moffset forms of moves, they are x86-32 only! rdar://7947184
697*9880d681SAndroid Build Coastguard Workermovb	0, %al    // CHECK: movb 0, %al # encoding: [0x8a,0x04,0x25,0x00,0x00,0x00,0x00]
698*9880d681SAndroid Build Coastguard Workermovw	0, %ax    // CHECK: movw 0, %ax # encoding: [0x66,0x8b,0x04,0x25,0x00,0x00,0x00,0x00]
699*9880d681SAndroid Build Coastguard Workermovl	0, %eax   // CHECK: movl 0, %eax # encoding: [0x8b,0x04,0x25,0x00,0x00,0x00,0x00]
700*9880d681SAndroid Build Coastguard Worker
701*9880d681SAndroid Build Coastguard Worker// CHECK: pushfq	# encoding: [0x9c]
702*9880d681SAndroid Build Coastguard Worker        pushf
703*9880d681SAndroid Build Coastguard Worker// CHECK: pushfq	# encoding: [0x9c]
704*9880d681SAndroid Build Coastguard Worker        pushfq
705*9880d681SAndroid Build Coastguard Worker// CHECK: popfq	        # encoding: [0x9d]
706*9880d681SAndroid Build Coastguard Worker        popf
707*9880d681SAndroid Build Coastguard Worker// CHECK: popfq	        # encoding: [0x9d]
708*9880d681SAndroid Build Coastguard Worker        popfq
709*9880d681SAndroid Build Coastguard Worker
710*9880d681SAndroid Build Coastguard Worker// CHECK: movabsq $-281474976710654, %rax
711*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff]
712*9880d681SAndroid Build Coastguard Worker        movabsq $0xFFFF000000000002, %rax
713*9880d681SAndroid Build Coastguard Worker
714*9880d681SAndroid Build Coastguard Worker// CHECK: movabsq $-281474976710654, %rax
715*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xb8,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0xff]
716*9880d681SAndroid Build Coastguard Worker        movq $0xFFFF000000000002, %rax
717*9880d681SAndroid Build Coastguard Worker
718*9880d681SAndroid Build Coastguard Worker// CHECK: movq $-65536, %rax
719*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xc7,0xc0,0x00,0x00,0xff,0xff]
720*9880d681SAndroid Build Coastguard Worker        movq $0xFFFFFFFFFFFF0000, %rax
721*9880d681SAndroid Build Coastguard Worker
722*9880d681SAndroid Build Coastguard Worker// CHECK: movq $-256, %rax
723*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xc7,0xc0,0x00,0xff,0xff,0xff]
724*9880d681SAndroid Build Coastguard Worker        movq $0xFFFFFFFFFFFFFF00, %rax
725*9880d681SAndroid Build Coastguard Worker
726*9880d681SAndroid Build Coastguard Worker// CHECK: movq $10, %rax
727*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xc7,0xc0,0x0a,0x00,0x00,0x00]
728*9880d681SAndroid Build Coastguard Worker        movq $10, %rax
729*9880d681SAndroid Build Coastguard Worker
730*9880d681SAndroid Build Coastguard Worker// CHECK: movabsb -6066930261531658096, %al
731*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xa0,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
732*9880d681SAndroid Build Coastguard Worker        movabsb 0xabcdef1234567890,%al
733*9880d681SAndroid Build Coastguard Worker
734*9880d681SAndroid Build Coastguard Worker// CHECK: movabsw -6066930261531658096, %ax
735*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
736*9880d681SAndroid Build Coastguard Worker        movabsw 0xabcdef1234567890,%ax
737*9880d681SAndroid Build Coastguard Worker
738*9880d681SAndroid Build Coastguard Worker// CHECK: movabsl -6066930261531658096, %eax
739*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
740*9880d681SAndroid Build Coastguard Worker        movabsl 0xabcdef1234567890,%eax
741*9880d681SAndroid Build Coastguard Worker
742*9880d681SAndroid Build Coastguard Worker// CHECK: movabsq -6066930261531658096, %rax
743*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xa1,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
744*9880d681SAndroid Build Coastguard Worker        movabsq 0xabcdef1234567890, %rax
745*9880d681SAndroid Build Coastguard Worker
746*9880d681SAndroid Build Coastguard Worker// CHECK: movabsb %al, -6066930261531658096
747*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xa2,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
748*9880d681SAndroid Build Coastguard Worker        movabsb %al,0xabcdef1234567890
749*9880d681SAndroid Build Coastguard Worker
750*9880d681SAndroid Build Coastguard Worker// CHECK: movabsw %ax, -6066930261531658096
751*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
752*9880d681SAndroid Build Coastguard Worker        movabsw %ax,0xabcdef1234567890
753*9880d681SAndroid Build Coastguard Worker
754*9880d681SAndroid Build Coastguard Worker// CHECK: movabsl %eax, -6066930261531658096
755*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
756*9880d681SAndroid Build Coastguard Worker        movabsl %eax,0xabcdef1234567890
757*9880d681SAndroid Build Coastguard Worker
758*9880d681SAndroid Build Coastguard Worker// CHECK: movabsq %rax, -6066930261531658096
759*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xa3,0x90,0x78,0x56,0x34,0x12,0xef,0xcd,0xab]
760*9880d681SAndroid Build Coastguard Worker        movabsq %rax,0xabcdef1234567890
761*9880d681SAndroid Build Coastguard Worker
762*9880d681SAndroid Build Coastguard Worker// rdar://8014869
763*9880d681SAndroid Build Coastguard Worker//
764*9880d681SAndroid Build Coastguard Worker// CHECK: ret
765*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0xc3]
766*9880d681SAndroid Build Coastguard Worker        retq
767*9880d681SAndroid Build Coastguard Worker
768*9880d681SAndroid Build Coastguard Worker// CHECK: sete %al
769*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x94,0xc0]
770*9880d681SAndroid Build Coastguard Worker        setz %al
771*9880d681SAndroid Build Coastguard Worker
772*9880d681SAndroid Build Coastguard Worker// CHECK: setne %al
773*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x95,0xc0]
774*9880d681SAndroid Build Coastguard Worker        setnz %al
775*9880d681SAndroid Build Coastguard Worker
776*9880d681SAndroid Build Coastguard Worker// CHECK: je 0
777*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x74,A]
778*9880d681SAndroid Build Coastguard Worker        jz 0
779*9880d681SAndroid Build Coastguard Worker
780*9880d681SAndroid Build Coastguard Worker// CHECK: jne
781*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x75,A]
782*9880d681SAndroid Build Coastguard Worker        jnz 0
783*9880d681SAndroid Build Coastguard Worker
784*9880d681SAndroid Build Coastguard Worker// PR9264
785*9880d681SAndroid Build Coastguard Workerbtl	$1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
786*9880d681SAndroid Build Coastguard Workerbt	$1, 0 // CHECK: btl $1, 0 # encoding: [0x0f,0xba,0x24,0x25,0x00,0x00,0x00,0x00,0x01]
787*9880d681SAndroid Build Coastguard Worker
788*9880d681SAndroid Build Coastguard Worker// rdar://8017515
789*9880d681SAndroid Build Coastguard Workerbtq $0x01,%rdx
790*9880d681SAndroid Build Coastguard Worker// CHECK: btq	$1, %rdx
791*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x48,0x0f,0xba,0xe2,0x01]
792*9880d681SAndroid Build Coastguard Worker
793*9880d681SAndroid Build Coastguard Worker//rdar://8017633
794*9880d681SAndroid Build Coastguard Worker// CHECK: movzbl	%al, %esi
795*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0xb6,0xf0]
796*9880d681SAndroid Build Coastguard Worker        movzx %al, %esi
797*9880d681SAndroid Build Coastguard Worker
798*9880d681SAndroid Build Coastguard Worker// CHECK: movzbq	%al, %rsi
799*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x48,0x0f,0xb6,0xf0]
800*9880d681SAndroid Build Coastguard Worker        movzx %al, %rsi
801*9880d681SAndroid Build Coastguard Worker
802*9880d681SAndroid Build Coastguard Worker// CHECK: movsbw	%al, %ax
803*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xbe,0xc0]
804*9880d681SAndroid Build Coastguard Workermovsx %al, %ax
805*9880d681SAndroid Build Coastguard Worker
806*9880d681SAndroid Build Coastguard Worker// CHECK: movsbl	%al, %eax
807*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xbe,0xc0]
808*9880d681SAndroid Build Coastguard Workermovsx %al, %eax
809*9880d681SAndroid Build Coastguard Worker
810*9880d681SAndroid Build Coastguard Worker// CHECK: movswl	%ax, %eax
811*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xbf,0xc0]
812*9880d681SAndroid Build Coastguard Workermovsx %ax, %eax
813*9880d681SAndroid Build Coastguard Worker
814*9880d681SAndroid Build Coastguard Worker// CHECK: movsbq	%bl, %rax
815*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0xbe,0xc3]
816*9880d681SAndroid Build Coastguard Workermovsx %bl, %rax
817*9880d681SAndroid Build Coastguard Worker
818*9880d681SAndroid Build Coastguard Worker// CHECK: movswq %cx, %rax
819*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0xbf,0xc1]
820*9880d681SAndroid Build Coastguard Workermovsx %cx, %rax
821*9880d681SAndroid Build Coastguard Worker
822*9880d681SAndroid Build Coastguard Worker// CHECK: movslq	%edi, %rax
823*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x63,0xc7]
824*9880d681SAndroid Build Coastguard Workermovsx %edi, %rax
825*9880d681SAndroid Build Coastguard Worker
826*9880d681SAndroid Build Coastguard Worker// CHECK: movzbw	%al, %ax
827*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xb6,0xc0]
828*9880d681SAndroid Build Coastguard Workermovzx %al, %ax
829*9880d681SAndroid Build Coastguard Worker
830*9880d681SAndroid Build Coastguard Worker// CHECK: movzbl	%al, %eax
831*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xb6,0xc0]
832*9880d681SAndroid Build Coastguard Workermovzx %al, %eax
833*9880d681SAndroid Build Coastguard Worker
834*9880d681SAndroid Build Coastguard Worker// CHECK: movzwl	%ax, %eax
835*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xb7,0xc0]
836*9880d681SAndroid Build Coastguard Workermovzx %ax, %eax
837*9880d681SAndroid Build Coastguard Worker
838*9880d681SAndroid Build Coastguard Worker// CHECK: movzbq	%bl, %rax
839*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0xb6,0xc3]
840*9880d681SAndroid Build Coastguard Workermovzx %bl, %rax
841*9880d681SAndroid Build Coastguard Worker
842*9880d681SAndroid Build Coastguard Worker// CHECK: movzwq	%cx, %rax
843*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0xb7,0xc1]
844*9880d681SAndroid Build Coastguard Workermovzx %cx, %rax
845*9880d681SAndroid Build Coastguard Worker
846*9880d681SAndroid Build Coastguard Worker// CHECK: movsbw	(%rax), %ax
847*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xbe,0x00]
848*9880d681SAndroid Build Coastguard Workermovsx (%rax), %ax
849*9880d681SAndroid Build Coastguard Worker
850*9880d681SAndroid Build Coastguard Worker// CHECK: movzbw	(%rax), %ax
851*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xb6,0x00]
852*9880d681SAndroid Build Coastguard Workermovzx (%rax), %ax
853*9880d681SAndroid Build Coastguard Worker
854*9880d681SAndroid Build Coastguard Worker
855*9880d681SAndroid Build Coastguard Worker// rdar://7873482
856*9880d681SAndroid Build Coastguard Worker// CHECK: [0x65,0x8b,0x04,0x25,0x7c,0x00,0x00,0x00]
857*9880d681SAndroid Build Coastguard Worker        movl	%gs:124, %eax
858*9880d681SAndroid Build Coastguard Worker
859*9880d681SAndroid Build Coastguard Worker// CHECK: jmpq *8(%rax)
860*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0xff,0x60,0x08]
861*9880d681SAndroid Build Coastguard Worker	jmp	*8(%rax)
862*9880d681SAndroid Build Coastguard Worker
863*9880d681SAndroid Build Coastguard Worker// CHECK: btq $61, -216(%rbp)
864*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0x48,0x0f,0xba,0xa5,0x28,0xff,0xff,0xff,0x3d]
865*9880d681SAndroid Build Coastguard Worker	btq	$61, -216(%rbp)
866*9880d681SAndroid Build Coastguard Worker
867*9880d681SAndroid Build Coastguard Worker
868*9880d681SAndroid Build Coastguard Worker// rdar://8061602
869*9880d681SAndroid Build Coastguard WorkerL1:
870*9880d681SAndroid Build Coastguard Worker  jecxz L1
871*9880d681SAndroid Build Coastguard Worker// CHECK: jecxz L1
872*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0x67,0xe3,A]
873*9880d681SAndroid Build Coastguard Worker  jrcxz L1
874*9880d681SAndroid Build Coastguard Worker// CHECK: jrcxz L1
875*9880d681SAndroid Build Coastguard Worker// CHECK:   encoding: [0xe3,A]
876*9880d681SAndroid Build Coastguard Worker
877*9880d681SAndroid Build Coastguard Worker// PR8061
878*9880d681SAndroid Build Coastguard Workerxchgl   368(%rax),%ecx
879*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl	%ecx, 368(%rax)
880*9880d681SAndroid Build Coastguard Workerxchgl   %ecx, 368(%rax)
881*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl	%ecx, 368(%rax)
882*9880d681SAndroid Build Coastguard Worker
883*9880d681SAndroid Build Coastguard Worker// rdar://8407548
884*9880d681SAndroid Build Coastguard Workerxchg	0xdeadbeef(%rbx,%rcx,8),%bl
885*9880d681SAndroid Build Coastguard Worker// CHECK: xchgb	%bl, 3735928559(%rbx,%rcx,8)
886*9880d681SAndroid Build Coastguard Worker
887*9880d681SAndroid Build Coastguard Worker
888*9880d681SAndroid Build Coastguard Worker
889*9880d681SAndroid Build Coastguard Worker// PR7254
890*9880d681SAndroid Build Coastguard Workerlock  incl 1(%rsp)
891*9880d681SAndroid Build Coastguard Worker// CHECK: lock
892*9880d681SAndroid Build Coastguard Worker// CHECK: incl 1(%rsp)
893*9880d681SAndroid Build Coastguard Worker
894*9880d681SAndroid Build Coastguard Worker// rdar://8741045
895*9880d681SAndroid Build Coastguard Workerlock/incl 1(%rsp)
896*9880d681SAndroid Build Coastguard Worker// CHECK: lock
897*9880d681SAndroid Build Coastguard Worker// CHECK: incl 1(%rsp)
898*9880d681SAndroid Build Coastguard Worker
899*9880d681SAndroid Build Coastguard Worker
900*9880d681SAndroid Build Coastguard Workerlock addq %rsi, (%rdi)
901*9880d681SAndroid Build Coastguard Worker// CHECK: lock
902*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf0]
903*9880d681SAndroid Build Coastguard Worker// CHECK: addq %rsi, (%rdi)
904*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x01,0x37]
905*9880d681SAndroid Build Coastguard Worker
906*9880d681SAndroid Build Coastguard Workerlock subq %rsi, (%rdi)
907*9880d681SAndroid Build Coastguard Worker// CHECK: lock
908*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf0]
909*9880d681SAndroid Build Coastguard Worker// CHECK: subq %rsi, (%rdi)
910*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x29,0x37]
911*9880d681SAndroid Build Coastguard Worker
912*9880d681SAndroid Build Coastguard Workerlock andq %rsi, (%rdi)
913*9880d681SAndroid Build Coastguard Worker// CHECK: lock
914*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf0]
915*9880d681SAndroid Build Coastguard Worker// CHECK: andq %rsi, (%rdi)
916*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x21,0x37]
917*9880d681SAndroid Build Coastguard Worker
918*9880d681SAndroid Build Coastguard Workerlock orq %rsi, (%rdi)
919*9880d681SAndroid Build Coastguard Worker// CHECK: lock
920*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf0]
921*9880d681SAndroid Build Coastguard Worker// CHECK: orq %rsi, (%rdi)
922*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x09,0x37]
923*9880d681SAndroid Build Coastguard Worker
924*9880d681SAndroid Build Coastguard Workerlock xorq %rsi, (%rdi)
925*9880d681SAndroid Build Coastguard Worker// CHECK: lock
926*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf0]
927*9880d681SAndroid Build Coastguard Worker// CHECK: xorq %rsi, (%rdi)
928*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x31,0x37]
929*9880d681SAndroid Build Coastguard Worker
930*9880d681SAndroid Build Coastguard Worker
931*9880d681SAndroid Build Coastguard Worker// rdar://8033482
932*9880d681SAndroid Build Coastguard Workerrep movsl
933*9880d681SAndroid Build Coastguard Worker// CHECK: rep
934*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf3]
935*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
936*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xa5]
937*9880d681SAndroid Build Coastguard Worker
938*9880d681SAndroid Build Coastguard Worker
939*9880d681SAndroid Build Coastguard Worker// rdar://8403974
940*9880d681SAndroid Build Coastguard Workeriret
941*9880d681SAndroid Build Coastguard Worker// CHECK: iretl
942*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xcf]
943*9880d681SAndroid Build Coastguard Workeriretw
944*9880d681SAndroid Build Coastguard Worker// CHECK: iretw
945*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0xcf]
946*9880d681SAndroid Build Coastguard Workeriretl
947*9880d681SAndroid Build Coastguard Worker// CHECK: iretl
948*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xcf]
949*9880d681SAndroid Build Coastguard Workeriretq
950*9880d681SAndroid Build Coastguard Worker// CHECK: iretq
951*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0xcf]
952*9880d681SAndroid Build Coastguard Worker
953*9880d681SAndroid Build Coastguard Worker// rdar://8416805
954*9880d681SAndroid Build Coastguard Worker// CHECK: retw	$31438
955*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x66,0xc2,0xce,0x7a]
956*9880d681SAndroid Build Coastguard Worker        	retw	$0x7ace
957*9880d681SAndroid Build Coastguard Worker
958*9880d681SAndroid Build Coastguard Worker// CHECK: lretw	$31438
959*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x66,0xca,0xce,0x7a]
960*9880d681SAndroid Build Coastguard Worker        	lretw	$0x7ace
961*9880d681SAndroid Build Coastguard Worker
962*9880d681SAndroid Build Coastguard Worker// PR8592
963*9880d681SAndroid Build Coastguard Workerlretq  // CHECK: lretq # encoding: [0x48,0xcb]
964*9880d681SAndroid Build Coastguard Workerlretl  // CHECK: lretl # encoding: [0xcb]
965*9880d681SAndroid Build Coastguard Workerlret   // CHECK: lretl # encoding: [0xcb]
966*9880d681SAndroid Build Coastguard Workerlretw  // CHECK: lretw # encoding: [0x66,0xcb]
967*9880d681SAndroid Build Coastguard Worker
968*9880d681SAndroid Build Coastguard Worker// rdar://8403907
969*9880d681SAndroid Build Coastguard Workersysret
970*9880d681SAndroid Build Coastguard Worker// CHECK: sysretl
971*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x07]
972*9880d681SAndroid Build Coastguard Workersysretl
973*9880d681SAndroid Build Coastguard Worker// CHECK: sysretl
974*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x07]
975*9880d681SAndroid Build Coastguard Workersysretq
976*9880d681SAndroid Build Coastguard Worker// CHECK: sysretq
977*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0x07]
978*9880d681SAndroid Build Coastguard Worker
979*9880d681SAndroid Build Coastguard Worker// rdar://8407242
980*9880d681SAndroid Build Coastguard Workerpush %fs
981*9880d681SAndroid Build Coastguard Worker// CHECK: pushq	%fs
982*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xa0]
983*9880d681SAndroid Build Coastguard Workerpush %gs
984*9880d681SAndroid Build Coastguard Worker// CHECK: pushq	%gs
985*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xa8]
986*9880d681SAndroid Build Coastguard Worker
987*9880d681SAndroid Build Coastguard Workerpushw %fs
988*9880d681SAndroid Build Coastguard Worker// CHECK: pushw	%fs
989*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xa0]
990*9880d681SAndroid Build Coastguard Workerpushw %gs
991*9880d681SAndroid Build Coastguard Worker// CHECK: pushw	%gs
992*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xa8]
993*9880d681SAndroid Build Coastguard Worker
994*9880d681SAndroid Build Coastguard Worker
995*9880d681SAndroid Build Coastguard Workerpop %fs
996*9880d681SAndroid Build Coastguard Worker// CHECK: popq	%fs
997*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xa1]
998*9880d681SAndroid Build Coastguard Workerpop %gs
999*9880d681SAndroid Build Coastguard Worker// CHECK: popq	%gs
1000*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xa9]
1001*9880d681SAndroid Build Coastguard Worker
1002*9880d681SAndroid Build Coastguard Workerpopw %fs
1003*9880d681SAndroid Build Coastguard Worker// CHECK: popw	%fs
1004*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xa1]
1005*9880d681SAndroid Build Coastguard Workerpopw %gs
1006*9880d681SAndroid Build Coastguard Worker// CHECK: popw	%gs
1007*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0xa9]
1008*9880d681SAndroid Build Coastguard Worker
1009*9880d681SAndroid Build Coastguard Worker// rdar://8438816
1010*9880d681SAndroid Build Coastguard Workerfildq -8(%rsp)
1011*9880d681SAndroid Build Coastguard Workerfildll -8(%rsp)
1012*9880d681SAndroid Build Coastguard Worker// CHECK: fildll	-8(%rsp)
1013*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xdf,0x6c,0x24,0xf8]
1014*9880d681SAndroid Build Coastguard Worker// CHECK: fildll	-8(%rsp)
1015*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xdf,0x6c,0x24,0xf8]
1016*9880d681SAndroid Build Coastguard Worker
1017*9880d681SAndroid Build Coastguard Worker// CHECK: callq a
1018*9880d681SAndroid Build Coastguard Worker        callq a
1019*9880d681SAndroid Build Coastguard Worker
1020*9880d681SAndroid Build Coastguard Worker// CHECK: leaq	-40(%rbp), %r15
1021*9880d681SAndroid Build Coastguard Worker	leaq	-40(%rbp), %r15
1022*9880d681SAndroid Build Coastguard Worker
1023*9880d681SAndroid Build Coastguard Worker
1024*9880d681SAndroid Build Coastguard Worker
1025*9880d681SAndroid Build Coastguard Worker// rdar://8013734 - Alias dr6=db6
1026*9880d681SAndroid Build Coastguard Workermov %dr6, %rax
1027*9880d681SAndroid Build Coastguard Workermov %db6, %rax
1028*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%dr6, %rax
1029*9880d681SAndroid Build Coastguard Worker// CHECK: movq	%dr6, %rax
1030*9880d681SAndroid Build Coastguard Worker
1031*9880d681SAndroid Build Coastguard Worker
1032*9880d681SAndroid Build Coastguard Worker// INC/DEC encodings.
1033*9880d681SAndroid Build Coastguard Workerincb %al  // CHECK:	incb	%al # encoding: [0xfe,0xc0]
1034*9880d681SAndroid Build Coastguard Workerincw %ax  // CHECK:	incw	%ax # encoding: [0x66,0xff,0xc0]
1035*9880d681SAndroid Build Coastguard Workerincl %eax // CHECK:	incl	%eax # encoding: [0xff,0xc0]
1036*9880d681SAndroid Build Coastguard Workerdecb %al  // CHECK:	decb	%al # encoding: [0xfe,0xc8]
1037*9880d681SAndroid Build Coastguard Workerdecw %ax  // CHECK:	decw	%ax # encoding: [0x66,0xff,0xc8]
1038*9880d681SAndroid Build Coastguard Workerdecl %eax // CHECK:	decl	%eax # encoding: [0xff,0xc8]
1039*9880d681SAndroid Build Coastguard Worker
1040*9880d681SAndroid Build Coastguard Worker// rdar://8416805
1041*9880d681SAndroid Build Coastguard Worker// CHECK: lgdtq	4(%rax)
1042*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x50,0x04]
1043*9880d681SAndroid Build Coastguard Worker        	lgdt	4(%rax)
1044*9880d681SAndroid Build Coastguard Worker
1045*9880d681SAndroid Build Coastguard Worker// CHECK: lgdtq	4(%rax)
1046*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x50,0x04]
1047*9880d681SAndroid Build Coastguard Worker        	lgdtq	4(%rax)
1048*9880d681SAndroid Build Coastguard Worker
1049*9880d681SAndroid Build Coastguard Worker// CHECK: lidtq	4(%rax)
1050*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x58,0x04]
1051*9880d681SAndroid Build Coastguard Worker        	lidt	4(%rax)
1052*9880d681SAndroid Build Coastguard Worker
1053*9880d681SAndroid Build Coastguard Worker// CHECK: lidtq	4(%rax)
1054*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x58,0x04]
1055*9880d681SAndroid Build Coastguard Worker        	lidtq	4(%rax)
1056*9880d681SAndroid Build Coastguard Worker
1057*9880d681SAndroid Build Coastguard Worker// CHECK: sgdtq	4(%rax)
1058*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x40,0x04]
1059*9880d681SAndroid Build Coastguard Worker        	sgdt	4(%rax)
1060*9880d681SAndroid Build Coastguard Worker
1061*9880d681SAndroid Build Coastguard Worker// CHECK: sgdtq	4(%rax)
1062*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x40,0x04]
1063*9880d681SAndroid Build Coastguard Worker        	sgdtq	4(%rax)
1064*9880d681SAndroid Build Coastguard Worker
1065*9880d681SAndroid Build Coastguard Worker// CHECK: sidtq	4(%rax)
1066*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x48,0x04]
1067*9880d681SAndroid Build Coastguard Worker        	sidt	4(%rax)
1068*9880d681SAndroid Build Coastguard Worker
1069*9880d681SAndroid Build Coastguard Worker// CHECK: sidtq	4(%rax)
1070*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0x48,0x04]
1071*9880d681SAndroid Build Coastguard Worker        	sidtq	4(%rax)
1072*9880d681SAndroid Build Coastguard Worker
1073*9880d681SAndroid Build Coastguard Worker
1074*9880d681SAndroid Build Coastguard Worker// rdar://8208615
1075*9880d681SAndroid Build Coastguard Workermov (%rsi), %gs  // CHECK: movl	(%rsi), %gs # encoding: [0x8e,0x2e]
1076*9880d681SAndroid Build Coastguard Workermov %gs, (%rsi)  // CHECK: movl	%gs, (%rsi) # encoding: [0x8c,0x2e]
1077*9880d681SAndroid Build Coastguard Worker
1078*9880d681SAndroid Build Coastguard Worker
1079*9880d681SAndroid Build Coastguard Worker// rdar://8431864
1080*9880d681SAndroid Build Coastguard Worker//CHECK: divb	%bl
1081*9880d681SAndroid Build Coastguard Worker//CHECK: divw	%bx
1082*9880d681SAndroid Build Coastguard Worker//CHECK: divl	%ecx
1083*9880d681SAndroid Build Coastguard Worker//CHECK: divl	3735928559(%ebx,%ecx,8)
1084*9880d681SAndroid Build Coastguard Worker//CHECK: divl	69
1085*9880d681SAndroid Build Coastguard Worker//CHECK: divl	32493
1086*9880d681SAndroid Build Coastguard Worker//CHECK: divl	3133065982
1087*9880d681SAndroid Build Coastguard Worker//CHECK: divl	305419896
1088*9880d681SAndroid Build Coastguard Worker//CHECK: idivb	%bl
1089*9880d681SAndroid Build Coastguard Worker//CHECK: idivw	%bx
1090*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	%ecx
1091*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	3735928559(%ebx,%ecx,8)
1092*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	69
1093*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	32493
1094*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	3133065982
1095*9880d681SAndroid Build Coastguard Worker//CHECK: idivl	305419896
1096*9880d681SAndroid Build Coastguard Worker	div	%bl,%al
1097*9880d681SAndroid Build Coastguard Worker	div	%bx,%ax
1098*9880d681SAndroid Build Coastguard Worker	div	%ecx,%eax
1099*9880d681SAndroid Build Coastguard Worker	div	0xdeadbeef(%ebx,%ecx,8),%eax
1100*9880d681SAndroid Build Coastguard Worker	div	0x45,%eax
1101*9880d681SAndroid Build Coastguard Worker	div	0x7eed,%eax
1102*9880d681SAndroid Build Coastguard Worker	div	0xbabecafe,%eax
1103*9880d681SAndroid Build Coastguard Worker	div	0x12345678,%eax
1104*9880d681SAndroid Build Coastguard Worker	idiv	%bl,%al
1105*9880d681SAndroid Build Coastguard Worker	idiv	%bx,%ax
1106*9880d681SAndroid Build Coastguard Worker	idiv	%ecx,%eax
1107*9880d681SAndroid Build Coastguard Worker	idiv	0xdeadbeef(%ebx,%ecx,8),%eax
1108*9880d681SAndroid Build Coastguard Worker	idiv	0x45,%eax
1109*9880d681SAndroid Build Coastguard Worker	idiv	0x7eed,%eax
1110*9880d681SAndroid Build Coastguard Worker	idiv	0xbabecafe,%eax
1111*9880d681SAndroid Build Coastguard Worker	idiv	0x12345678,%eax
1112*9880d681SAndroid Build Coastguard Worker
1113*9880d681SAndroid Build Coastguard Worker// PR8524
1114*9880d681SAndroid Build Coastguard Workermovd	%rax, %mm5 // CHECK: movd %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8]
1115*9880d681SAndroid Build Coastguard Workermovd	%mm5, %rbx // CHECK: movd %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb]
1116*9880d681SAndroid Build Coastguard Workermovq	%rax, %mm5 // CHECK: movd %rax, %mm5 # encoding: [0x48,0x0f,0x6e,0xe8]
1117*9880d681SAndroid Build Coastguard Workermovq	%mm5, %rbx // CHECK: movd %mm5, %rbx # encoding: [0x48,0x0f,0x7e,0xeb]
1118*9880d681SAndroid Build Coastguard Worker
1119*9880d681SAndroid Build Coastguard Workerrex64 // CHECK: rex64 # encoding: [0x48]
1120*9880d681SAndroid Build Coastguard Workerdata16 // CHECK: data16 # encoding: [0x66]
1121*9880d681SAndroid Build Coastguard Worker
1122*9880d681SAndroid Build Coastguard Worker// PR8855
1123*9880d681SAndroid Build Coastguard Workermovq 18446744073709551615,%rbx   // CHECK: movq	-1, %rbx
1124*9880d681SAndroid Build Coastguard Worker
1125*9880d681SAndroid Build Coastguard Worker// PR8946
1126*9880d681SAndroid Build Coastguard Workermovdqu	%xmm0, %xmm1 // CHECK: movdqu	%xmm0, %xmm1 # encoding: [0xf3,0x0f,0x6f,0xc8]
1127*9880d681SAndroid Build Coastguard Worker
1128*9880d681SAndroid Build Coastguard Worker// PR8935
1129*9880d681SAndroid Build Coastguard Workerxgetbv // CHECK: xgetbv # encoding: [0x0f,0x01,0xd0]
1130*9880d681SAndroid Build Coastguard Workerxsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1]
1131*9880d681SAndroid Build Coastguard Worker
1132*9880d681SAndroid Build Coastguard Worker// CHECK: loope 0
1133*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xe1,A]
1134*9880d681SAndroid Build Coastguard Worker	loopz 0
1135*9880d681SAndroid Build Coastguard Worker
1136*9880d681SAndroid Build Coastguard Worker// CHECK: loopne 0
1137*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xe0,A]
1138*9880d681SAndroid Build Coastguard Worker	loopnz 0
1139*9880d681SAndroid Build Coastguard Worker
1140*9880d681SAndroid Build Coastguard Worker// CHECK: outsb (%rsi), %dx # encoding: [0x6e]
1141*9880d681SAndroid Build Coastguard Worker// CHECK: outsb
1142*9880d681SAndroid Build Coastguard Worker// CHECK: outsb
1143*9880d681SAndroid Build Coastguard Worker	outsb
1144*9880d681SAndroid Build Coastguard Worker	outsb	%ds:(%rsi), %dx
1145*9880d681SAndroid Build Coastguard Worker	outsb	(%rsi), %dx
1146*9880d681SAndroid Build Coastguard Worker
1147*9880d681SAndroid Build Coastguard Worker// CHECK: outsw (%rsi), %dx # encoding: [0x66,0x6f]
1148*9880d681SAndroid Build Coastguard Worker// CHECK: outsw
1149*9880d681SAndroid Build Coastguard Worker// CHECK: outsw
1150*9880d681SAndroid Build Coastguard Worker	outsw
1151*9880d681SAndroid Build Coastguard Worker	outsw	%ds:(%rsi), %dx
1152*9880d681SAndroid Build Coastguard Worker	outsw	(%rsi), %dx
1153*9880d681SAndroid Build Coastguard Worker
1154*9880d681SAndroid Build Coastguard Worker// CHECK: outsl (%rsi), %dx # encoding: [0x6f]
1155*9880d681SAndroid Build Coastguard Worker// CHECK: outsl
1156*9880d681SAndroid Build Coastguard Worker	outsl
1157*9880d681SAndroid Build Coastguard Worker	outsl	%ds:(%rsi), %dx
1158*9880d681SAndroid Build Coastguard Worker	outsl	(%rsi), %dx
1159*9880d681SAndroid Build Coastguard Worker
1160*9880d681SAndroid Build Coastguard Worker// CHECK: insb  %dx, %es:(%rdi) # encoding: [0x6c]
1161*9880d681SAndroid Build Coastguard Worker// CHECK: insb
1162*9880d681SAndroid Build Coastguard Worker	insb
1163*9880d681SAndroid Build Coastguard Worker	insb	%dx, %es:(%rdi)
1164*9880d681SAndroid Build Coastguard Worker
1165*9880d681SAndroid Build Coastguard Worker// CHECK: insw  %dx, %es:(%rdi) # encoding: [0x66,0x6d]
1166*9880d681SAndroid Build Coastguard Worker// CHECK: insw
1167*9880d681SAndroid Build Coastguard Worker	insw
1168*9880d681SAndroid Build Coastguard Worker	insw	%dx, %es:(%rdi)
1169*9880d681SAndroid Build Coastguard Worker
1170*9880d681SAndroid Build Coastguard Worker// CHECK: insl %dx, %es:(%rdi) # encoding: [0x6d]
1171*9880d681SAndroid Build Coastguard Worker// CHECK: insl
1172*9880d681SAndroid Build Coastguard Worker	insl
1173*9880d681SAndroid Build Coastguard Worker	insl	%dx, %es:(%rdi)
1174*9880d681SAndroid Build Coastguard Worker
1175*9880d681SAndroid Build Coastguard Worker// CHECK: movsb (%rsi), %es:(%rdi) # encoding: [0xa4]
1176*9880d681SAndroid Build Coastguard Worker// CHECK: movsb
1177*9880d681SAndroid Build Coastguard Worker// CHECK: movsb
1178*9880d681SAndroid Build Coastguard Worker	movsb
1179*9880d681SAndroid Build Coastguard Worker	movsb	%ds:(%rsi), %es:(%rdi)
1180*9880d681SAndroid Build Coastguard Worker	movsb	(%rsi), %es:(%rdi)
1181*9880d681SAndroid Build Coastguard Worker
1182*9880d681SAndroid Build Coastguard Worker// CHECK: movsw (%rsi), %es:(%rdi) # encoding: [0x66,0xa5]
1183*9880d681SAndroid Build Coastguard Worker// CHECK: movsw
1184*9880d681SAndroid Build Coastguard Worker// CHECK: movsw
1185*9880d681SAndroid Build Coastguard Worker	movsw
1186*9880d681SAndroid Build Coastguard Worker	movsw	%ds:(%rsi), %es:(%rdi)
1187*9880d681SAndroid Build Coastguard Worker	movsw	(%rsi), %es:(%rdi)
1188*9880d681SAndroid Build Coastguard Worker
1189*9880d681SAndroid Build Coastguard Worker// CHECK: movsl (%rsi), %es:(%rdi) # encoding: [0xa5]
1190*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
1191*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
1192*9880d681SAndroid Build Coastguard Worker	movsl
1193*9880d681SAndroid Build Coastguard Worker	movsl	%ds:(%rsi), %es:(%rdi)
1194*9880d681SAndroid Build Coastguard Worker	movsl	(%rsi), %es:(%rdi)
1195*9880d681SAndroid Build Coastguard Worker// rdar://10883092
1196*9880d681SAndroid Build Coastguard Worker// CHECK: movsl
1197*9880d681SAndroid Build Coastguard Worker	movsl	(%rsi), (%rdi)
1198*9880d681SAndroid Build Coastguard Worker
1199*9880d681SAndroid Build Coastguard Worker// CHECK: movsq (%rsi), %es:(%rdi) # encoding: [0x48,0xa5]
1200*9880d681SAndroid Build Coastguard Worker// CHECK: movsq
1201*9880d681SAndroid Build Coastguard Worker// CHECK: movsq
1202*9880d681SAndroid Build Coastguard Worker	movsq
1203*9880d681SAndroid Build Coastguard Worker	movsq	%ds:(%rsi), %es:(%rdi)
1204*9880d681SAndroid Build Coastguard Worker	movsq	(%rsi), %es:(%rdi)
1205*9880d681SAndroid Build Coastguard Worker
1206*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb (%rsi), %al # encoding: [0xac]
1207*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb
1208*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb
1209*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb
1210*9880d681SAndroid Build Coastguard Worker// CHECK: lodsb
1211*9880d681SAndroid Build Coastguard Worker	lodsb
1212*9880d681SAndroid Build Coastguard Worker	lodsb	%ds:(%rsi), %al
1213*9880d681SAndroid Build Coastguard Worker	lodsb	(%rsi), %al
1214*9880d681SAndroid Build Coastguard Worker	lods	%ds:(%rsi), %al
1215*9880d681SAndroid Build Coastguard Worker	lods	(%rsi), %al
1216*9880d681SAndroid Build Coastguard Worker
1217*9880d681SAndroid Build Coastguard Worker// CHECK: lodsw (%rsi), %ax # encoding: [0x66,0xad]
1218*9880d681SAndroid Build Coastguard Worker// CHECK: lodsw
1219*9880d681SAndroid Build Coastguard Worker// CHECK: lodsw
1220*9880d681SAndroid Build Coastguard Worker// CHECK: lodsw
1221*9880d681SAndroid Build Coastguard Worker// CHECK: lodsw
1222*9880d681SAndroid Build Coastguard Worker	lodsw
1223*9880d681SAndroid Build Coastguard Worker	lodsw	%ds:(%rsi), %ax
1224*9880d681SAndroid Build Coastguard Worker	lodsw	(%rsi), %ax
1225*9880d681SAndroid Build Coastguard Worker	lods	%ds:(%rsi), %ax
1226*9880d681SAndroid Build Coastguard Worker	lods	(%rsi), %ax
1227*9880d681SAndroid Build Coastguard Worker
1228*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl (%rsi), %eax # encoding: [0xad]
1229*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl
1230*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl
1231*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl
1232*9880d681SAndroid Build Coastguard Worker// CHECK: lodsl
1233*9880d681SAndroid Build Coastguard Worker	lodsl
1234*9880d681SAndroid Build Coastguard Worker	lodsl	%ds:(%rsi), %eax
1235*9880d681SAndroid Build Coastguard Worker	lodsl	(%rsi), %eax
1236*9880d681SAndroid Build Coastguard Worker	lods	%ds:(%rsi), %eax
1237*9880d681SAndroid Build Coastguard Worker	lods	(%rsi), %eax
1238*9880d681SAndroid Build Coastguard Worker
1239*9880d681SAndroid Build Coastguard Worker// CHECK: lodsq (%rsi), %rax # encoding: [0x48,0xad]
1240*9880d681SAndroid Build Coastguard Worker// CHECK: lodsq
1241*9880d681SAndroid Build Coastguard Worker// CHECK: lodsq
1242*9880d681SAndroid Build Coastguard Worker// CHECK: lodsq
1243*9880d681SAndroid Build Coastguard Worker// CHECK: lodsq
1244*9880d681SAndroid Build Coastguard Worker	lodsq
1245*9880d681SAndroid Build Coastguard Worker	lodsq	%ds:(%rsi), %rax
1246*9880d681SAndroid Build Coastguard Worker	lodsq	(%rsi), %rax
1247*9880d681SAndroid Build Coastguard Worker	lods	%ds:(%rsi), %rax
1248*9880d681SAndroid Build Coastguard Worker	lods	(%rsi), %rax
1249*9880d681SAndroid Build Coastguard Worker
1250*9880d681SAndroid Build Coastguard Worker// CHECK: stosb %al, %es:(%rdi) # encoding: [0xaa]
1251*9880d681SAndroid Build Coastguard Worker// CHECK: stosb
1252*9880d681SAndroid Build Coastguard Worker// CHECK: stosb
1253*9880d681SAndroid Build Coastguard Worker	stosb
1254*9880d681SAndroid Build Coastguard Worker	stosb	%al, %es:(%rdi)
1255*9880d681SAndroid Build Coastguard Worker	stos	%al, %es:(%rdi)
1256*9880d681SAndroid Build Coastguard Worker
1257*9880d681SAndroid Build Coastguard Worker// CHECK: stosw %ax, %es:(%rdi) # encoding: [0x66,0xab]
1258*9880d681SAndroid Build Coastguard Worker// CHECK: stosw
1259*9880d681SAndroid Build Coastguard Worker// CHECK: stosw
1260*9880d681SAndroid Build Coastguard Worker	stosw
1261*9880d681SAndroid Build Coastguard Worker	stosw	%ax, %es:(%rdi)
1262*9880d681SAndroid Build Coastguard Worker	stos	%ax, %es:(%rdi)
1263*9880d681SAndroid Build Coastguard Worker
1264*9880d681SAndroid Build Coastguard Worker// CHECK: stosl %eax, %es:(%rdi) # encoding: [0xab]
1265*9880d681SAndroid Build Coastguard Worker// CHECK: stosl
1266*9880d681SAndroid Build Coastguard Worker// CHECK: stosl
1267*9880d681SAndroid Build Coastguard Worker	stosl
1268*9880d681SAndroid Build Coastguard Worker	stosl	%eax, %es:(%rdi)
1269*9880d681SAndroid Build Coastguard Worker	stos	%eax, %es:(%rdi)
1270*9880d681SAndroid Build Coastguard Worker
1271*9880d681SAndroid Build Coastguard Worker// CHECK: stosq %rax, %es:(%rdi) # encoding: [0x48,0xab]
1272*9880d681SAndroid Build Coastguard Worker// CHECK: stosq
1273*9880d681SAndroid Build Coastguard Worker// CHECK: stosq
1274*9880d681SAndroid Build Coastguard Worker	stosq
1275*9880d681SAndroid Build Coastguard Worker	stosq	%rax, %es:(%rdi)
1276*9880d681SAndroid Build Coastguard Worker	stos	%rax, %es:(%rdi)
1277*9880d681SAndroid Build Coastguard Worker
1278*9880d681SAndroid Build Coastguard Worker// CHECK: strw
1279*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1280*9880d681SAndroid Build Coastguard Worker	str %ax
1281*9880d681SAndroid Build Coastguard Worker
1282*9880d681SAndroid Build Coastguard Worker// CHECK: strl
1283*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x00,0xc8]
1284*9880d681SAndroid Build Coastguard Worker	str %eax
1285*9880d681SAndroid Build Coastguard Worker
1286*9880d681SAndroid Build Coastguard Worker// CHECK: strw
1287*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x00,0xc8]
1288*9880d681SAndroid Build Coastguard Worker	str %ax
1289*9880d681SAndroid Build Coastguard Worker
1290*9880d681SAndroid Build Coastguard Worker// CHECK: strq
1291*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0x00,0xc8]
1292*9880d681SAndroid Build Coastguard Worker	str %rax
1293*9880d681SAndroid Build Coastguard Worker
1294*9880d681SAndroid Build Coastguard Worker// CHECK: movd %rdi, %xmm0
1295*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1296*9880d681SAndroid Build Coastguard Worker	movq %rdi,%xmm0
1297*9880d681SAndroid Build Coastguard Worker
1298*9880d681SAndroid Build Coastguard Worker// CHECK: movd %rdi, %xmm0
1299*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
1300*9880d681SAndroid Build Coastguard Worker	movd %rdi,%xmm0
1301*9880d681SAndroid Build Coastguard Worker
1302*9880d681SAndroid Build Coastguard Worker// CHECK: movd  %xmm0, %rax
1303*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x48,0x0f,0x7e,0xc0]
1304*9880d681SAndroid Build Coastguard Worker        movd  %xmm0, %rax
1305*9880d681SAndroid Build Coastguard Worker
1306*9880d681SAndroid Build Coastguard Worker// CHECK: movntil %eax, (%rdi)
1307*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xc3,0x07]
1308*9880d681SAndroid Build Coastguard Worker// CHECK: movntil
1309*9880d681SAndroid Build Coastguard Workermovntil %eax, (%rdi)
1310*9880d681SAndroid Build Coastguard Workermovnti %eax, (%rdi)
1311*9880d681SAndroid Build Coastguard Worker
1312*9880d681SAndroid Build Coastguard Worker// CHECK: movntiq %rax, (%rdi)
1313*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0xc3,0x07]
1314*9880d681SAndroid Build Coastguard Worker// CHECK: movntiq
1315*9880d681SAndroid Build Coastguard Workermovntiq %rax, (%rdi)
1316*9880d681SAndroid Build Coastguard Workermovnti %rax, (%rdi)
1317*9880d681SAndroid Build Coastguard Worker
1318*9880d681SAndroid Build Coastguard Worker// CHECK: pclmulqdq	$17, %xmm0, %xmm1
1319*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x11]
1320*9880d681SAndroid Build Coastguard Workerpclmulhqhqdq %xmm0, %xmm1
1321*9880d681SAndroid Build Coastguard Worker
1322*9880d681SAndroid Build Coastguard Worker// CHECK: pclmulqdq	$1, %xmm0, %xmm1
1323*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0xc8,0x01]
1324*9880d681SAndroid Build Coastguard Workerpclmulqdq $1, %xmm0, %xmm1
1325*9880d681SAndroid Build Coastguard Worker
1326*9880d681SAndroid Build Coastguard Worker// CHECK: pclmulqdq	$16, (%rdi), %xmm1
1327*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x10]
1328*9880d681SAndroid Build Coastguard Workerpclmullqhqdq (%rdi), %xmm1
1329*9880d681SAndroid Build Coastguard Worker
1330*9880d681SAndroid Build Coastguard Worker// CHECK: pclmulqdq	$0, (%rdi), %xmm1
1331*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x0f,0x3a,0x44,0x0f,0x00]
1332*9880d681SAndroid Build Coastguard Workerpclmulqdq $0, (%rdi), %xmm1
1333*9880d681SAndroid Build Coastguard Worker
1334*9880d681SAndroid Build Coastguard Worker// PR10345
1335*9880d681SAndroid Build Coastguard Worker// CHECK: xchgq %rax, %rax
1336*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x90]
1337*9880d681SAndroid Build Coastguard Workerxchgq %rax, %rax
1338*9880d681SAndroid Build Coastguard Worker
1339*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %eax, %eax
1340*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x87,0xc0]
1341*9880d681SAndroid Build Coastguard Workerxchgl %eax, %eax
1342*9880d681SAndroid Build Coastguard Worker
1343*9880d681SAndroid Build Coastguard Worker// CHECK: xchgw %ax, %ax
1344*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x90]
1345*9880d681SAndroid Build Coastguard Workerxchgw %ax, %ax
1346*9880d681SAndroid Build Coastguard Worker
1347*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %ecx, %eax
1348*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x91]
1349*9880d681SAndroid Build Coastguard Workerxchgl %ecx, %eax
1350*9880d681SAndroid Build Coastguard Worker
1351*9880d681SAndroid Build Coastguard Worker// CHECK: xchgl %ecx, %eax
1352*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x91]
1353*9880d681SAndroid Build Coastguard Workerxchgl %eax, %ecx
1354*9880d681SAndroid Build Coastguard Worker
1355*9880d681SAndroid Build Coastguard Worker// CHECK: sysexit
1356*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x35]
1357*9880d681SAndroid Build Coastguard Workersysexit
1358*9880d681SAndroid Build Coastguard Worker
1359*9880d681SAndroid Build Coastguard Worker// CHECK: sysexitl
1360*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x35]
1361*9880d681SAndroid Build Coastguard Workersysexitl
1362*9880d681SAndroid Build Coastguard Worker
1363*9880d681SAndroid Build Coastguard Worker// CHECK: sysexitq
1364*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x0f,0x35]
1365*9880d681SAndroid Build Coastguard Workersysexitq
1366*9880d681SAndroid Build Coastguard Worker
1367*9880d681SAndroid Build Coastguard Worker// CHECK: clac
1368*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xca]
1369*9880d681SAndroid Build Coastguard Workerclac
1370*9880d681SAndroid Build Coastguard Worker
1371*9880d681SAndroid Build Coastguard Worker// CHECK: stac
1372*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0x01,0xcb]
1373*9880d681SAndroid Build Coastguard Workerstac
1374*9880d681SAndroid Build Coastguard Worker
1375*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1)
1376*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1)
1377*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1)
1378*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1)
1379*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1)
1380*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1)
1381*9880d681SAndroid Build Coastguard Workerfaddp %st(0), %st(1)
1382*9880d681SAndroid Build Coastguard Workerfmulp %st(0), %st(1)
1383*9880d681SAndroid Build Coastguard Workerfsubp %st(0), %st(1)
1384*9880d681SAndroid Build Coastguard Workerfsubrp %st(0), %st(1)
1385*9880d681SAndroid Build Coastguard Workerfdivp %st(0), %st(1)
1386*9880d681SAndroid Build Coastguard Workerfdivrp %st(0), %st(1)
1387*9880d681SAndroid Build Coastguard Worker
1388*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1)
1389*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1)
1390*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1)
1391*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1)
1392*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1)
1393*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1)
1394*9880d681SAndroid Build Coastguard Workerfaddp %st(1), %st(0)
1395*9880d681SAndroid Build Coastguard Workerfmulp %st(1), %st(0)
1396*9880d681SAndroid Build Coastguard Workerfsubp %st(1), %st(0)
1397*9880d681SAndroid Build Coastguard Workerfsubrp %st(1), %st(0)
1398*9880d681SAndroid Build Coastguard Workerfdivp %st(1), %st(0)
1399*9880d681SAndroid Build Coastguard Workerfdivrp %st(1), %st(0)
1400*9880d681SAndroid Build Coastguard Worker
1401*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1)
1402*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1)
1403*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1)
1404*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1)
1405*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1)
1406*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1)
1407*9880d681SAndroid Build Coastguard Workerfaddp %st(1)
1408*9880d681SAndroid Build Coastguard Workerfmulp %st(1)
1409*9880d681SAndroid Build Coastguard Workerfsubp %st(1)
1410*9880d681SAndroid Build Coastguard Workerfsubrp %st(1)
1411*9880d681SAndroid Build Coastguard Workerfdivp %st(1)
1412*9880d681SAndroid Build Coastguard Workerfdivrp %st(1)
1413*9880d681SAndroid Build Coastguard Worker
1414*9880d681SAndroid Build Coastguard Worker// CHECK: faddp %st(1)
1415*9880d681SAndroid Build Coastguard Worker// CHECK: fmulp %st(1)
1416*9880d681SAndroid Build Coastguard Worker// CHECK: fsubp %st(1)
1417*9880d681SAndroid Build Coastguard Worker// CHECK: fsubrp %st(1)
1418*9880d681SAndroid Build Coastguard Worker// CHECK: fdivp %st(1)
1419*9880d681SAndroid Build Coastguard Worker// CHECK: fdivrp %st(1)
1420*9880d681SAndroid Build Coastguard Workerfaddp
1421*9880d681SAndroid Build Coastguard Workerfmulp
1422*9880d681SAndroid Build Coastguard Workerfsubp
1423*9880d681SAndroid Build Coastguard Workerfsubrp
1424*9880d681SAndroid Build Coastguard Workerfdivp
1425*9880d681SAndroid Build Coastguard Workerfdivrp
1426*9880d681SAndroid Build Coastguard Worker
1427*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(1)
1428*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(1)
1429*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(1)
1430*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(1)
1431*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(1)
1432*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(1)
1433*9880d681SAndroid Build Coastguard Workerfadd %st(1), %st(0)
1434*9880d681SAndroid Build Coastguard Workerfmul %st(1), %st(0)
1435*9880d681SAndroid Build Coastguard Workerfsub %st(1), %st(0)
1436*9880d681SAndroid Build Coastguard Workerfsubr %st(1), %st(0)
1437*9880d681SAndroid Build Coastguard Workerfdiv %st(1), %st(0)
1438*9880d681SAndroid Build Coastguard Workerfdivr %st(1), %st(0)
1439*9880d681SAndroid Build Coastguard Worker
1440*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(0), %st(1)
1441*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(0), %st(1)
1442*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(0), %st(1)
1443*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(0), %st(1)
1444*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(0), %st(1)
1445*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(0), %st(1)
1446*9880d681SAndroid Build Coastguard Workerfadd %st(0), %st(1)
1447*9880d681SAndroid Build Coastguard Workerfmul %st(0), %st(1)
1448*9880d681SAndroid Build Coastguard Workerfsub %st(0), %st(1)
1449*9880d681SAndroid Build Coastguard Workerfsubr %st(0), %st(1)
1450*9880d681SAndroid Build Coastguard Workerfdiv %st(0), %st(1)
1451*9880d681SAndroid Build Coastguard Workerfdivr %st(0), %st(1)
1452*9880d681SAndroid Build Coastguard Worker
1453*9880d681SAndroid Build Coastguard Worker// CHECK: fadd %st(1)
1454*9880d681SAndroid Build Coastguard Worker// CHECK: fmul %st(1)
1455*9880d681SAndroid Build Coastguard Worker// CHECK: fsub %st(1)
1456*9880d681SAndroid Build Coastguard Worker// CHECK: fsubr %st(1)
1457*9880d681SAndroid Build Coastguard Worker// CHECK: fdiv %st(1)
1458*9880d681SAndroid Build Coastguard Worker// CHECK: fdivr %st(1)
1459*9880d681SAndroid Build Coastguard Workerfadd %st(1)
1460*9880d681SAndroid Build Coastguard Workerfmul %st(1)
1461*9880d681SAndroid Build Coastguard Workerfsub %st(1)
1462*9880d681SAndroid Build Coastguard Workerfsubr %st(1)
1463*9880d681SAndroid Build Coastguard Workerfdiv %st(1)
1464*9880d681SAndroid Build Coastguard Workerfdivr %st(1)
1465*9880d681SAndroid Build Coastguard Worker
1466*9880d681SAndroid Build Coastguard Worker// CHECK: movd %xmm0, %eax
1467*9880d681SAndroid Build Coastguard Worker// CHECK: movd %xmm0, %rax
1468*9880d681SAndroid Build Coastguard Worker// CHECK: movd %xmm0, %rax
1469*9880d681SAndroid Build Coastguard Worker// CHECK: vmovd %xmm0, %eax
1470*9880d681SAndroid Build Coastguard Worker// CHECK: vmovq %xmm0, %rax
1471*9880d681SAndroid Build Coastguard Worker// CHECK: vmovq %xmm0, %rax
1472*9880d681SAndroid Build Coastguard Workermovd %xmm0, %eax
1473*9880d681SAndroid Build Coastguard Workermovd %xmm0, %rax
1474*9880d681SAndroid Build Coastguard Workermovq %xmm0, %rax
1475*9880d681SAndroid Build Coastguard Workervmovd %xmm0, %eax
1476*9880d681SAndroid Build Coastguard Workervmovd %xmm0, %rax
1477*9880d681SAndroid Build Coastguard Workervmovq %xmm0, %rax
1478*9880d681SAndroid Build Coastguard Worker
1479*9880d681SAndroid Build Coastguard Worker// CHECK: seto 3735928559(%r10,%r9,8)
1480*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x43,0x0f,0x90,0x84,0xca,0xef,0xbe,0xad,0xde]
1481*9880d681SAndroid Build Coastguard Worker	seto 0xdeadbeef(%r10,%r9,8)
1482*9880d681SAndroid Build Coastguard Worker
1483*9880d681SAndroid Build Coastguard Worker// CHECK: 	monitorx
1484*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0xfa]
1485*9880d681SAndroid Build Coastguard Worker        	monitorx
1486*9880d681SAndroid Build Coastguard Worker
1487*9880d681SAndroid Build Coastguard Worker// CHECK: 	monitorx
1488*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0xfa]
1489*9880d681SAndroid Build Coastguard Worker        	monitorx %rax, %rcx, %rdx
1490*9880d681SAndroid Build Coastguard Worker
1491*9880d681SAndroid Build Coastguard Worker// CHECK: 	mwaitx
1492*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0xfb]
1493*9880d681SAndroid Build Coastguard Worker        	mwaitx
1494*9880d681SAndroid Build Coastguard Worker
1495*9880d681SAndroid Build Coastguard Worker// CHECK: 	mwaitx
1496*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x0f,0x01,0xfb]
1497*9880d681SAndroid Build Coastguard Worker        	mwaitx %rax, %rcx, %rbx
1498*9880d681SAndroid Build Coastguard Worker
1499*9880d681SAndroid Build Coastguard Worker// CHECK: 	movl %r15d, (%r15,%r15)
1500*9880d681SAndroid Build Coastguard Worker// CHECK:  encoding: [0x47,0x89,0x3c,0x3f]
1501*9880d681SAndroid Build Coastguard Workermovl %r15d, (%r15,%r15)
1502