1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | llvm-objdump
--no-print-imm-hex
-d
- | FileCheck
%s
3 // Test that we correctly relax these instructions into versions that use
4 // 16 or 32 bit immediate values.
7 // CHECK
: Disassembly of section imul
:
10 // CHECK-NEXT
: 0: 66 69 db
00 00 imulw $
0, %bx
, %bx
11 // CHECK-NEXT
: 5: 66 69 1c
25 00 00 00 00 00 00 imulw $
0, 0, %bx
12 // CHECK-NEXT
: f
: 69 db
00 00 00 00 imull $
0, %ebx
, %ebx
13 // CHECK-NEXT
: 15: 69 1c
25 00 00 00 00 00 00 00 00 imull $
0, 0, %ebx
14 // CHECK-NEXT
: 20: 48 69 db
00 00 00 00 imulq $
0, %rbx
, %rbx
15 // CHECK-NEXT
: 27: 48 69 1c
25 00 00 00 00 00 00 00 00 imulq $
0, 0, %rbx
24 // CHECK
: Disassembly of section
and:
27 // CHECK-NEXT
: 0: 66 81 e3
00 00 andw $
0, %bx
28 // CHECK-NEXT
: 5: 66 81 24 25 00 00 00 00 00 00 andw $
0, 0
29 // CHECK-NEXT
: f
: 81 e3
00 00 00 00 andl $
0, %ebx
30 // CHECK-NEXT
: 15: 81 24 25 00 00 00 00 00 00 00 00 andl $
0, 0
31 // CHECK-NEXT
: 20: 48 81 e3
00 00 00 00 andq $
0, %rbx
32 // CHECK-NEXT
: 27: 48 81 24 25 00 00 00 00 00 00 00 00 andq $
0, 0
42 // CHECK-NEXT
: 0: 66 81 cb
00 00 orw $
0, %bx
43 // CHECK-NEXT
: 5: 66 81 0c
25 00 00 00 00 00 00 orw $
0, 0
44 // CHECK-NEXT
: f
: 81 cb
00 00 00 00 orl $
0, %ebx
45 // CHECK-NEXT
: 15: 81 0c
25 00 00 00 00 00 00 00 00 orl $
0, 0
46 // CHECK-NEXT
: 20: 48 81 cb
00 00 00 00 orq $
0, %rbx
47 // CHECK-NEXT
: 27: 48 81 0c
25 00 00 00 00 00 00 00 00 orq $
0, 0
56 // CHECK
: Disassembly of section
xor:
59 // CHECK-NEXT
: 0: 66 81 f3 00 00 xorw $
0, %bx
60 // CHECK-NEXT
: 5: 66 81 34 25 00 00 00 00 00 00 xorw $
0, 0
61 // CHECK-NEXT
: f
: 81 f3 00 00 00 00 xorl $
0, %ebx
62 // CHECK-NEXT
: 15: 81 34 25 00 00 00 00 00 00 00 00 xorl $
0, 0
63 // CHECK-NEXT
: 20: 48 81 f3 00 00 00 00 xorq $
0, %rbx
64 // CHECK-NEXT
: 27: 48 81 34 25 00 00 00 00 00 00 00 00 xorq $
0, 0
73 // CHECK
: Disassembly of section
add:
76 // CHECK-NEXT
: 0: 66 81 c3
00 00 addw $
0, %bx
77 // CHECK-NEXT
: 5: 66 81 04 25 00 00 00 00 00 00 addw $
0, 0
78 // CHECK-NEXT
: f
: 81 c3
00 00 00 00 addl $
0, %ebx
79 // CHECK-NEXT
: 15: 81 04 25 00 00 00 00 00 00 00 00 addl $
0, 0
80 // CHECK-NEXT
: 20: 48 81 c3
00 00 00 00 addq $
0, %rbx
81 // CHECK-NEXT
: 27: 48 81 04 25 00 00 00 00 00 00 00 00 addq $
0, 0
90 // CHECK
: Disassembly of section
sub:
93 // CHECK-NEXT
: 0: 66 81 eb
00 00 subw $
0, %bx
94 // CHECK-NEXT
: 5: 66 81 2c
25 00 00 00 00 00 00 subw $
0, 0
95 // CHECK-NEXT
: f
: 81 eb
00 00 00 00 subl $
0, %ebx
96 // CHECK-NEXT
: 15: 81 2c
25 00 00 00 00 00 00 00 00 subl $
0, 0
97 // CHECK-NEXT
: 20: 48 81 eb
00 00 00 00 subq $
0, %rbx
98 // CHECK-NEXT
: 27: 48 81 2c
25 00 00 00 00 00 00 00 00 subq $
0, 0
107 // CHECK
: Disassembly of section
cmp:
109 // CHECK-NEXT
: <cmp>:
110 // CHECK-NEXT
: 0: 66 81 fb
00 00 cmpw $
0, %bx
111 // CHECK-NEXT
: 5: 66 81 3c
25 00 00 00 00 00 00 cmpw $
0, 0
112 // CHECK-NEXT
: f
: 81 fb
00 00 00 00 cmpl $
0, %ebx
113 // CHECK-NEXT
: 15: 81 3c
25 00 00 00 00 00 00 00 00 cmpl $
0, 0
114 // CHECK-NEXT
: 20: 48 81 fb
00 00 00 00 cmpq $
0, %rbx
115 // CHECK-NEXT
: 27: 48 81 3c
25 00 00 00 00 00 00 00 00 cmpq $
0, 0
124 // CHECK
: Disassembly of section push
:
126 // CHECK-NEXT
: <push
>:
127 // CHECK-NEXT
: 0: 66 68 00 00 pushw $
0
128 // CHECK-NEXT
: 4: 68 00 00 00 00 pushq $
0
133 // CHECK
: Disassembly of section adc
:
135 // CHECK-NEXT
: <adc
>:
136 // CHECK-NEXT
: 0: 66 81 d3
00 00 adcw $
0, %bx
137 // CHECK-NEXT
: 5: 66 81 14 25 00 00 00 00 00 00 adcw $
0, 0
138 // CHECK-NEXT
: f
: 81 d3
00 00 00 00 adcl $
0, %ebx
139 // CHECK-NEXT
: 15: 81 14 25 00 00 00 00 00 00 00 00 adcl $
0, 0
140 // CHECK-NEXT
: 20: 48 81 d3
00 00 00 00 adcq $
0, %rbx
141 // CHECK-NEXT
: 27: 48 81 14 25 00 00 00 00 00 00 00 00 adcq $
0, 0
150 // CHECK
: Disassembly of section sbb
:
152 // CHECK-NEXT
: <sbb
>:
153 // CHECK-NEXT
: 0: 66 81 db
00 00 sbbw $
0, %bx
154 // CHECK-NEXT
: 5: 66 81 1c
25 00 00 00 00 00 00 sbbw $
0, 0
155 // CHECK-NEXT
: f
: 81 db
00 00 00 00 sbbl $
0, %ebx
156 // CHECK-NEXT
: 15: 81 1c
25 00 00 00 00 00 00 00 00 sbbl $
0, 0
157 // CHECK-NEXT
: 20: 48 81 db
00 00 00 00 sbbq $
0, %rbx
158 // CHECK-NEXT
: 27: 48 81 1c
25 00 00 00 00 00 00 00 00 sbbq $
0, 0