xref: /aosp_15_r20/external/llvm/test/MC/X86/intel-syntax-encoding.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -x86-asm-syntax=intel -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xf0,0x0c]
4*9880d681SAndroid Build Coastguard Worker	xor	ax, 12
5*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xf0,0x0c]
6*9880d681SAndroid Build Coastguard Worker	xor	eax, 12
7*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xf0,0x0c]
8*9880d681SAndroid Build Coastguard Worker	xor	rax, 12
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xc8,0x0c]
11*9880d681SAndroid Build Coastguard Worker	or	ax, 12
12*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xc8,0x0c]
13*9880d681SAndroid Build Coastguard Worker	or	eax, 12
14*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xc8,0x0c]
15*9880d681SAndroid Build Coastguard Worker	or	rax, 12
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xf8,0x0c]
18*9880d681SAndroid Build Coastguard Worker	cmp	ax, 12
19*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xf8,0x0c]
20*9880d681SAndroid Build Coastguard Worker	cmp	eax, 12
21*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xf8,0x0c]
22*9880d681SAndroid Build Coastguard Worker	cmp	rax, 12
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x89,0x44,0x24,0xf0]
25*9880d681SAndroid Build Coastguard Worker	mov	QWORD PTR [RSP - 16], RAX
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xc0,0xf4]
28*9880d681SAndroid Build Coastguard Worker	add	ax, -12
29*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xc0,0xf4]
30*9880d681SAndroid Build Coastguard Worker	add	eax, -12
31*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xc0,0xf4]
32*9880d681SAndroid Build Coastguard Worker	add	rax, -12
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xd0,0xf4]
35*9880d681SAndroid Build Coastguard Worker	adc	ax, -12
36*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xd0,0xf4]
37*9880d681SAndroid Build Coastguard Worker	adc	eax, -12
38*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xd0,0xf4]
39*9880d681SAndroid Build Coastguard Worker	adc	rax, -12
40*9880d681SAndroid Build Coastguard Worker
41*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xd8,0xf4]
42*9880d681SAndroid Build Coastguard Worker	sbb	ax, -12
43*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xd8,0xf4]
44*9880d681SAndroid Build Coastguard Worker	sbb	eax, -12
45*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xd8,0xf4]
46*9880d681SAndroid Build Coastguard Worker	sbb	rax, -12
47*9880d681SAndroid Build Coastguard Worker
48*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x66,0x83,0xf8,0xf4]
49*9880d681SAndroid Build Coastguard Worker	cmp	ax, -12
50*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x83,0xf8,0xf4]
51*9880d681SAndroid Build Coastguard Worker	cmp	eax, -12
52*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x48,0x83,0xf8,0xf4]
53*9880d681SAndroid Build Coastguard Worker	cmp	rax, -12
54*9880d681SAndroid Build Coastguard Worker
55*9880d681SAndroid Build Coastguard WorkerLBB0_3:
56*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xeb,A]
57*9880d681SAndroid Build Coastguard Worker	jmp	LBB0_3
58*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
59*9880d681SAndroid Build Coastguard Worker        movsd   XMM5, QWORD PTR [-8]
60*9880d681SAndroid Build Coastguard Worker
61*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xd1,0xe7]
62*9880d681SAndroid Build Coastguard Worker	shl	EDI, 1
63*9880d681SAndroid Build Coastguard Worker
64*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0x0f,0xc2,0xd1,0x01]
65*9880d681SAndroid Build Coastguard Worker	cmpltps XMM2, XMM1
66*9880d681SAndroid Build Coastguard Worker
67*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc3]
68*9880d681SAndroid Build Coastguard Worker    ret
69*9880d681SAndroid Build Coastguard Worker
70*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xcb]
71*9880d681SAndroid Build Coastguard Worker    retf
72*9880d681SAndroid Build Coastguard Worker
73*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xc2,0x08,0x00]
74*9880d681SAndroid Build Coastguard Worker    ret 8
75*9880d681SAndroid Build Coastguard Worker
76*9880d681SAndroid Build Coastguard Worker// CHECK: encoding: [0xca,0x08,0x00]
77*9880d681SAndroid Build Coastguard Worker    retf 8
78*9880d681SAndroid Build Coastguard Worker
79