1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | llvm-objdump
-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
41 // CHECK
: Disassembly of section
or:
44 // CHECK-NEXT
: 0: 66 81 cb
00 00 orw $
0, %bx
45 // CHECK-NEXT
: 5: 66 81 0c
25 00 00 00 00 00 00 orw $
0, 0
46 // CHECK-NEXT
: f
: 81 cb
00 00 00 00 orl $
0, %ebx
47 // CHECK-NEXT
: 15: 81 0c
25 00 00 00 00 00 00 00 00 orl $
0, 0
48 // CHECK-NEXT
: 20: 48 81 cb
00 00 00 00 orq $
0, %rbx
49 // CHECK-NEXT
: 27: 48 81 0c
25 00 00 00 00 00 00 00 00 orq $
0, 0
58 // CHECK
: Disassembly of section
xor:
61 // CHECK-NEXT
: 0: 66 81 f3 00 00 xorw $
0, %bx
62 // CHECK-NEXT
: 5: 66 81 34 25 00 00 00 00 00 00 xorw $
0, 0
63 // CHECK-NEXT
: f
: 81 f3 00 00 00 00 xorl $
0, %ebx
64 // CHECK-NEXT
: 15: 81 34 25 00 00 00 00 00 00 00 00 xorl $
0, 0
65 // CHECK-NEXT
: 20: 48 81 f3 00 00 00 00 xorq $
0, %rbx
66 // CHECK-NEXT
: 27: 48 81 34 25 00 00 00 00 00 00 00 00 xorq $
0, 0
75 // CHECK
: Disassembly of section
add:
78 // CHECK-NEXT
: 0: 66 81 c3
00 00 addw $
0, %bx
79 // CHECK-NEXT
: 5: 66 81 04 25 00 00 00 00 00 00 addw $
0, 0
80 // CHECK-NEXT
: f
: 81 c3
00 00 00 00 addl $
0, %ebx
81 // CHECK-NEXT
: 15: 81 04 25 00 00 00 00 00 00 00 00 addl $
0, 0
82 // CHECK-NEXT
: 20: 48 81 c3
00 00 00 00 addq $
0, %rbx
83 // CHECK-NEXT
: 27: 48 81 04 25 00 00 00 00 00 00 00 00 addq $
0, 0
92 // CHECK
: Disassembly of section
sub:
95 // CHECK-NEXT
: 0: 66 81 eb
00 00 subw $
0, %bx
96 // CHECK-NEXT
: 5: 66 81 2c
25 00 00 00 00 00 00 subw $
0, 0
97 // CHECK-NEXT
: f
: 81 eb
00 00 00 00 subl $
0, %ebx
98 // CHECK-NEXT
: 15: 81 2c
25 00 00 00 00 00 00 00 00 subl $
0, 0
99 // CHECK-NEXT
: 20: 48 81 eb
00 00 00 00 subq $
0, %rbx
100 // CHECK-NEXT
: 27: 48 81 2c
25 00 00 00 00 00 00 00 00 subq $
0, 0
109 // CHECK
: Disassembly of section
cmp:
112 // CHECK-NEXT
: 0: 66 81 fb
00 00 cmpw $
0, %bx
113 // CHECK-NEXT
: 5: 66 81 3c
25 00 00 00 00 00 00 cmpw $
0, 0
114 // CHECK-NEXT
: f
: 81 fb
00 00 00 00 cmpl $
0, %ebx
115 // CHECK-NEXT
: 15: 81 3c
25 00 00 00 00 00 00 00 00 cmpl $
0, 0
116 // CHECK-NEXT
: 20: 48 81 fb
00 00 00 00 cmpq $
0, %rbx
117 // CHECK-NEXT
: 27: 48 81 3c
25 00 00 00 00 00 00 00 00 cmpq $
0, 0
126 // CHECK
: Disassembly of section push
:
129 // CHECK-NEXT
: 0: 66 68 00 00 pushw $
0
130 // CHECK-NEXT
: 4: 68 00 00 00 00 pushq $
0
135 // CHECK
: Disassembly of section adc
:
138 // CHECK-NEXT
: 0: 66 81 d3
00 00 adcw $
0, %bx
139 // CHECK-NEXT
: 5: 66 81 14 25 00 00 00 00 00 00 adcw $
0, 0
140 // CHECK-NEXT
: f
: 81 d3
00 00 00 00 adcl $
0, %ebx
141 // CHECK-NEXT
: 15: 81 14 25 00 00 00 00 00 00 00 00 adcl $
0, 0
142 // CHECK-NEXT
: 20: 48 81 d3
00 00 00 00 adcq $
0, %rbx
143 // CHECK-NEXT
: 27: 48 81 14 25 00 00 00 00 00 00 00 00 adcq $
0, 0
152 // CHECK
: Disassembly of section sbb
:
155 // CHECK-NEXT
: 0: 66 81 db
00 00 sbbw $
0, %bx
156 // CHECK-NEXT
: 5: 66 81 1c
25 00 00 00 00 00 00 sbbw $
0, 0
157 // CHECK-NEXT
: f
: 81 db
00 00 00 00 sbbl $
0, %ebx
158 // CHECK-NEXT
: 15: 81 1c
25 00 00 00 00 00 00 00 00 sbbl $
0, 0
159 // CHECK-NEXT
: 20: 48 81 db
00 00 00 00 sbbq $
0, %rbx
160 // CHECK-NEXT
: 27: 48 81 1c
25 00 00 00 00 00 00 00 00 sbbq $
0, 0