xref: /llvm-project/llvm/test/tools/llvm-objdump/X86/disassemble-align.s (revision d25e572421a66270c0ee8d51c96256f2958a6f1d)
1# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
2
3# Use '|' to show where the tabs line up.
4# RUN: llvm-objdump -d --print-imm-hex %t | tr '\t' '|' | \
5# RUN:   FileCheck --match-full-lines --strict-whitespace %s
6
7# RUN: llvm-objdump -d --print-imm-hex --no-show-raw-insn %t | tr '\t' '|' | \
8# RUN:   FileCheck -check-prefix=NORAW --match-full-lines -strict-whitespace %s
9
10# Instructions are expected to be aligned if the instruction in hex is not too long.
11
12#      CHECK:       0: c3                           |retq
13# CHECK-NEXT:       1: 48 8b 05 56 34 12 00         |movq|0x123456(%rip), %rax    # 0x12345e <.text+0x12345e>
14# CHECK-NEXT:       8: 48 b8 54 55 55 55 55 55 55 55|movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
15# CHECK-NEXT:      12: 8f ea 00 12 4c 02 40 00 00 00 00     |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
16# CHECK-NEXT:      1d: 8f ea 00 12 04 25 f0 1c f0 1c 00 00 00 00    |lwpins|$0x0, 0x1cf01cf0, %r15d
17# CHECK-NEXT:      2b: ff ff                        |<unknown>
18
19#      NORAW:       0:      |retq
20# NORAW-NEXT:       1:      |movq|0x123456(%rip), %rax    # 0x12345e <.text+0x12345e>
21# NORAW-NEXT:       8:      |movabsq|$0x5555555555555554, %rax # imm = 0x5555555555555554
22# NORAW-NEXT:      12:      |lwpval|$0x0, 0x40(%rdx,%rax), %r15d
23# NORAW-NEXT:      1d:      |lwpins|$0x0, 0x1cf01cf0, %r15d
24# NORAW-NEXT:      2b:      |<unknown>
25
26.text
27  retq
28  movq 0x123456(%rip),%rax
29  movabs $0x5555555555555554,%rax
30  lwpval $0x0, 0x40(%rdx,%rax), %r15d
31  lwpins $0x0, 0x1cf01cf0, %r15d
32  .word 0xffff
33