aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/X86/x86_64-imm-widths.s
blob: 97b60ff3aff8e44d54132b1d6624a0be9ba770a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// RUN: llvm-mc -triple x86_64- --show-encoding %s | FileCheck %s

// CHECK: addb $0, %al
// CHECK: encoding: [0x04,0x00]
 	addb $0x00, %al

// CHECK: addb $127, %al
// CHECK: encoding: [0x04,0x7f]
 	addb $0x7F, %al

// CHECK: addb $128, %al
// CHECK: encoding: [0x04,0x80]
 	addb $0x80, %al

// CHECK: addb $255, %al
// CHECK: encoding: [0x04,0xff]
 	addb $0xFF, %al

// CHECK: addw $0, %ax
// CHECK: encoding: [0x66,0x83,0xc0,0x00]
 	addw $0x0000, %ax

// CHECK: addw $127, %ax
// CHECK: encoding: [0x66,0x83,0xc0,0x7f]
 	addw $0x007F, %ax

// CHECK: addw $65408, %ax
// CHECK: encoding: [0x66,0x83,0xc0,0x80]
 	addw $0xFF80, %ax

// CHECK: addw $65535, %ax
// CHECK: encoding: [0x66,0x83,0xc0,0xff]
	addw $0xFFFF, %ax

// CHECK: addl $0, %eax
// CHECK: encoding: [0x83,0xc0,0x00]
 	addl $0x00000000, %eax

// CHECK: addl $127, %eax
// CHECK: encoding: [0x83,0xc0,0x7f]
 	addl $0x0000007F, %eax

// CHECK: addl $65408, %eax
// CHECK: encoding: [0x05,0x80,0xff,0x00,0x00]
 	addl $0xFF80, %eax

// CHECK: addl $65535, %eax
// CHECK: encoding: [0x05,0xff,0xff,0x00,0x00]
	addl $0xFFFF, %eax

// CHECK: addl $4294967168, %eax
// CHECK: encoding: [0x83,0xc0,0x80]
 	addl $0xFFFFFF80, %eax

// CHECK: addl $4294967295, %eax
// CHECK: encoding: [0x83,0xc0,0xff]
 	addl $0xFFFFFFFF, %eax

// CHECK: addq $0, %rax
// CHECK: encoding: [0x48,0x83,0xc0,0x00]
 	addq $0x0000000000000000, %rax

// CHECK: addq $127, %rax
// CHECK: encoding: [0x48,0x83,0xc0,0x7f]
 	addq $0x000000000000007F, %rax

// CHECK: addq $-128, %rax
// CHECK: encoding: [0x48,0x83,0xc0,0x80]
 	addq $0xFFFFFFFFFFFFFF80, %rax

// CHECK: addq $-1, %rax
// CHECK: encoding: [0x48,0x83,0xc0,0xff]
 	addq $0xFFFFFFFFFFFFFFFF, %rax

// CHECK: addq $0, %rax
// CHECK: encoding: [0x48,0x83,0xc0,0x00]
 	addq $0x0000000000000000, %rax

// CHECK: addq $65408, %rax
// CHECK: encoding: [0x48,0x05,0x80,0xff,0x00,0x00]
 	addq $0xFF80, %rax

// CHECK: addq $65535, %rax
// CHECK: encoding: [0x48,0x05,0xff,0xff,0x00,0x00]
	addq $0xFFFF, %rax

// CHECK: movabsq $4294967168, %rax
// CHECK: encoding: [0x48,0xb8,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00]
 	movq $0xFFFFFF80, %rax

// CHECK: movabsq $4294967295, %rax
// CHECK: encoding: [0x48,0xb8,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00]
        movq $0xFFFFFFFF, %rax

// CHECK: addq $2147483647, %rax
// CHECK: encoding: [0x48,0x05,0xff,0xff,0xff,0x7f]
 	addq $0x000000007FFFFFFF, %rax

// CHECK: addq $-2147483648, %rax
// CHECK: encoding: [0x48,0x05,0x00,0x00,0x00,0x80]
	addq $0xFFFFFFFF80000000, %rax

// CHECK: addq $-256, %rax
// CHECK: encoding: [0x48,0x05,0x00,0xff,0xff,0xff]
 	addq $0xFFFFFFFFFFFFFF00, %rax