1// RUN: llvm-mc -x86-asm-syntax=intel -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
2
3// CHECK: encoding: [0x66,0x83,0xf0,0x0c]
4	xor	ax, 12
5// CHECK: encoding: [0x83,0xf0,0x0c]
6	xor	eax, 12
7// CHECK: encoding: [0x48,0x83,0xf0,0x0c]
8	xor	rax, 12
9
10// CHECK: encoding: [0x66,0x83,0xc8,0x0c]
11	or	ax, 12
12// CHECK: encoding: [0x83,0xc8,0x0c]
13	or	eax, 12
14// CHECK: encoding: [0x48,0x83,0xc8,0x0c]
15	or	rax, 12
16
17// CHECK: encoding: [0x66,0x83,0xf8,0x0c]
18	cmp	ax, 12
19// CHECK: encoding: [0x83,0xf8,0x0c]
20	cmp	eax, 12
21// CHECK: encoding: [0x48,0x83,0xf8,0x0c]
22	cmp	rax, 12
23
24// CHECK: encoding: [0x48,0x89,0x44,0x24,0xf0]
25	mov	QWORD PTR [RSP - 16], RAX
26
27// CHECK: encoding: [0x66,0x83,0xc0,0xf4]
28	add	ax, -12
29// CHECK: encoding: [0x83,0xc0,0xf4]
30	add	eax, -12
31// CHECK: encoding: [0x48,0x83,0xc0,0xf4]
32	add	rax, -12
33
34// CHECK: encoding: [0x66,0x83,0xd0,0xf4]
35	adc	ax, -12
36// CHECK: encoding: [0x83,0xd0,0xf4]
37	adc	eax, -12
38// CHECK: encoding: [0x48,0x83,0xd0,0xf4]
39	adc	rax, -12
40
41// CHECK: encoding: [0x66,0x83,0xd8,0xf4]
42	sbb	ax, -12
43// CHECK: encoding: [0x83,0xd8,0xf4]
44	sbb	eax, -12
45// CHECK: encoding: [0x48,0x83,0xd8,0xf4]
46	sbb	rax, -12
47
48// CHECK: encoding: [0x66,0x83,0xf8,0xf4]
49	cmp	ax, -12
50// CHECK: encoding: [0x83,0xf8,0xf4]
51	cmp	eax, -12
52// CHECK: encoding: [0x48,0x83,0xf8,0xf4]
53	cmp	rax, -12
54
55  acquire lock add [rax], rax
56// CHECK: encoding: [0xf2]
57// CHECK: encoding: [0xf0,0x48,0x01,0x00]
58  release lock add [rax], rax
59// CHECK: encoding: [0xf3]
60// CHECK: encoding: [0xf0,0x48,0x01,0x00]
61
62// CHECK: encoding: [0x9c]
63// CHECK: encoding: [0x9d]
64pushf
65popf
66
67// CHECK: encoding: [0x66,0x9c]
68// CHECK: encoding: [0x66,0x9d]
69pushfw
70popfw
71
72LBB0_3:
73// CHECK: encoding: [0xeb,A]
74	jmp	LBB0_3
75// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
76        movsd   XMM5, QWORD PTR [-8]
77
78// CHECK: encoding: [0xd1,0xe7]
79	shl	EDI, 1
80
81// CHECK: encoding: [0x0f,0xc2,0xd1,0x01]
82	cmpltps XMM2, XMM1
83
84// CHECK: encoding: [0xc3]
85    ret
86
87// CHECK: encoding: [0xcb]
88    retf
89
90// CHECK: encoding: [0xc2,0x08,0x00]
91    ret 8
92
93// CHECK: encoding: [0xca,0x08,0x00]
94    retf 8
95
96    .set FOO, 2
97    cmp eax, FOO
98// CHECK: encoding: [0x83,0xf8,0x02]
99    cmp eax, FOO[eax]
100// CHECK: encoding: [0x67,0x3b,0x40,0x02]
101