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 1d
00 00 00 00 00 00 imulw $
0, (%rip
), %bx
11 // CHECK-NEXT
: 9: 69 1d
00 00 00 00 00 00 00 00 imull $
0, (%rip
), %ebx
12 // CHECK-NEXT
: 13: 48 69 1d
00 00 00 00 00 00 00 00 imulq $
0, (%rip
), %rbx
14 imul $foo
, bar
(%rip
), %bx
15 imul $foo
, bar
(%rip
), %ebx
16 imul $foo
, bar
(%rip
), %rbx
19 // CHECK
: Disassembly of section
and:
22 // CHECK-NEXT
: 0: 66 81 25 00 00 00 00 00 00 andw $
0, (%rip
)
23 // CHECK-NEXT
: 9: 81 25 00 00 00 00 00 00 00 00 andl $
0, (%rip
)
24 // CHECK-NEXT
: 13: 48 81 25 00 00 00 00 00 00 00 00 andq $
0, (%rip
)
30 // CHECK
: Disassembly of section
or:
33 // CHECK-NEXT
: 0: 66 81 0d
00 00 00 00 00 00 orw $
0, (%rip
)
34 // CHECK-NEXT
: 9: 81 0d
00 00 00 00 00 00 00 00 orl $
0, (%rip
)
35 // CHECK-NEXT
: 13: 48 81 0d
00 00 00 00 00 00 00 00 orq $
0, (%rip
)
41 // CHECK
: Disassembly of section
xor:
44 // CHECK-NEXT
: 0: 66 81 35 00 00 00 00 00 00 xorw $
0, (%rip
)
45 // CHECK-NEXT
: 9: 81 35 00 00 00 00 00 00 00 00 xorl $
0, (%rip
)
46 // CHECK-NEXT
: 13: 48 81 35 00 00 00 00 00 00 00 00 xorq $
0, (%rip
)
52 // CHECK
: Disassembly of section
add:
55 // CHECK-NEXT
: 0: 66 81 05 00 00 00 00 00 00 addw $
0, (%rip
)
56 // CHECK-NEXT
: 9: 81 05 00 00 00 00 00 00 00 00 addl $
0, (%rip
)
57 // CHECK-NEXT
: 13: 48 81 05 00 00 00 00 00 00 00 00 addq $
0, (%rip
)
63 // CHECK
: Disassembly of section
sub:
66 // CHECK-NEXT
: 0: 66 81 2d
00 00 00 00 00 00 subw $
0, (%rip
)
67 // CHECK-NEXT
: 9: 81 2d
00 00 00 00 00 00 00 00 subl $
0, (%rip
)
68 // CHECK-NEXT
: 13: 48 81 2d
00 00 00 00 00 00 00 00 subq $
0, (%rip
)
74 // CHECK
: Disassembly of section
cmp:
77 // CHECK-NEXT
: 0: 66 81 3d
00 00 00 00 00 00 cmpw $
0, (%rip
)
78 // CHECK-NEXT
: 9: 81 3d
00 00 00 00 00 00 00 00 cmpl $
0, (%rip
)
79 // CHECK-NEXT
: 13: 48 81 3d
00 00 00 00 00 00 00 00 cmpq $
0, (%rip
)