[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / X86 / x86_64-imm-widths.s
blob97b60ff3aff8e44d54132b1d6624a0be9ba770a5
1 // RUN: llvm-mc -triple x86_64- --show-encoding %s | FileCheck %s
3 // CHECK: addb $0, %al
4 // CHECK: encoding: [0x04,0x00]
5 addb $0x00, %al
7 // CHECK: addb $127, %al
8 // CHECK: encoding: [0x04,0x7f]
9 addb $0x7F, %al
11 // CHECK: addb $128, %al
12 // CHECK: encoding: [0x04,0x80]
13 addb $0x80, %al
15 // CHECK: addb $255, %al
16 // CHECK: encoding: [0x04,0xff]
17 addb $0xFF, %al
19 // CHECK: addw $0, %ax
20 // CHECK: encoding: [0x66,0x83,0xc0,0x00]
21 addw $0x0000, %ax
23 // CHECK: addw $127, %ax
24 // CHECK: encoding: [0x66,0x83,0xc0,0x7f]
25 addw $0x007F, %ax
27 // CHECK: addw $65408, %ax
28 // CHECK: encoding: [0x66,0x83,0xc0,0x80]
29 addw $0xFF80, %ax
31 // CHECK: addw $65535, %ax
32 // CHECK: encoding: [0x66,0x83,0xc0,0xff]
33 addw $0xFFFF, %ax
35 // CHECK: addl $0, %eax
36 // CHECK: encoding: [0x83,0xc0,0x00]
37 addl $0x00000000, %eax
39 // CHECK: addl $127, %eax
40 // CHECK: encoding: [0x83,0xc0,0x7f]
41 addl $0x0000007F, %eax
43 // CHECK: addl $65408, %eax
44 // CHECK: encoding: [0x05,0x80,0xff,0x00,0x00]
45 addl $0xFF80, %eax
47 // CHECK: addl $65535, %eax
48 // CHECK: encoding: [0x05,0xff,0xff,0x00,0x00]
49 addl $0xFFFF, %eax
51 // CHECK: addl $4294967168, %eax
52 // CHECK: encoding: [0x83,0xc0,0x80]
53 addl $0xFFFFFF80, %eax
55 // CHECK: addl $4294967295, %eax
56 // CHECK: encoding: [0x83,0xc0,0xff]
57 addl $0xFFFFFFFF, %eax
59 // CHECK: addq $0, %rax
60 // CHECK: encoding: [0x48,0x83,0xc0,0x00]
61 addq $0x0000000000000000, %rax
63 // CHECK: addq $127, %rax
64 // CHECK: encoding: [0x48,0x83,0xc0,0x7f]
65 addq $0x000000000000007F, %rax
67 // CHECK: addq $-128, %rax
68 // CHECK: encoding: [0x48,0x83,0xc0,0x80]
69 addq $0xFFFFFFFFFFFFFF80, %rax
71 // CHECK: addq $-1, %rax
72 // CHECK: encoding: [0x48,0x83,0xc0,0xff]
73 addq $0xFFFFFFFFFFFFFFFF, %rax
75 // CHECK: addq $0, %rax
76 // CHECK: encoding: [0x48,0x83,0xc0,0x00]
77 addq $0x0000000000000000, %rax
79 // CHECK: addq $65408, %rax
80 // CHECK: encoding: [0x48,0x05,0x80,0xff,0x00,0x00]
81 addq $0xFF80, %rax
83 // CHECK: addq $65535, %rax
84 // CHECK: encoding: [0x48,0x05,0xff,0xff,0x00,0x00]
85 addq $0xFFFF, %rax
87 // CHECK: movabsq $4294967168, %rax
88 // CHECK: encoding: [0x48,0xb8,0x80,0xff,0xff,0xff,0x00,0x00,0x00,0x00]
89 movq $0xFFFFFF80, %rax
91 // CHECK: movabsq $4294967295, %rax
92 // CHECK: encoding: [0x48,0xb8,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00]
93 movq $0xFFFFFFFF, %rax
95 // CHECK: addq $2147483647, %rax
96 // CHECK: encoding: [0x48,0x05,0xff,0xff,0xff,0x7f]
97 addq $0x000000007FFFFFFF, %rax
99 // CHECK: addq $-2147483648, %rax
100 // CHECK: encoding: [0x48,0x05,0x00,0x00,0x00,0x80]
101 addq $0xFFFFFFFF80000000, %rax
103 // CHECK: addq $-256, %rax
104 // CHECK: encoding: [0x48,0x05,0x00,0xff,0xff,0xff]
105 addq $0xFFFFFFFFFFFFFF00, %rax