• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
67LBB0_3:
68// CHECK: encoding: [0xeb,A]
69	jmp	LBB0_3
70// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
71        movsd   XMM5, QWORD PTR [-8]
72
73// CHECK: encoding: [0xd1,0xe7]
74	shl	EDI, 1
75
76// CHECK: encoding: [0x0f,0xc2,0xd1,0x01]
77	cmpltps XMM2, XMM1
78
79// CHECK: encoding: [0xc3]
80    ret
81
82// CHECK: encoding: [0xcb]
83    retf
84
85// CHECK: encoding: [0xc2,0x08,0x00]
86    ret 8
87
88// CHECK: encoding: [0xca,0x08,0x00]
89    retf 8
90
91    .set FOO, 2
92    cmp eax, FOO
93// CHECK: encoding: [0x83,0xf8,0x02]
94    cmp eax, FOO[eax]
95// CHECK: encoding: [0x67,0x3b,0x40,0x02]
96