1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-unknown-unknown
%s
-o
%t
2 // RUN
: llvm-objdump
-d
%t | FileCheck
%s
--check-prefix
=NODISASM
4 // The exact rules of skipping the bytes you can find in the code.
5 // This test checks that we follow these rules
and can force
6 // dissasembly of zero blocks with the
-z
and --disassemble-zeroes options.
8 // NODISASM
: 0000000000000000 main
:
9 // NODISASM-NEXT
: 0: 00 00 addb
%al
, (%rax
)
10 // NODISASM-NEXT
: 2: 00 00 addb
%al
, (%rax
)
11 // NODISASM-NEXT
: 4: 00 00 addb
%al
, (%rax
)
12 // NODISASM-NEXT
: 6: 00 90 00 00 00 00 addb
%dl
, (%rax
)
14 // NODISASM-NEXT
: 20: 90 nop
16 // NODISASM
: 0000000000000031 foo
:
17 // NODISASM-NEXT
: 31: 00 00 addb
%al
, (%rax
)
18 // NODISASM-NEXT
: 33: 00 00 addb
%al
, (%rax
)
19 // NODISASM
: 0000000000000035 bar
:
22 // Check that with
-z we disassemble blocks of zeroes.
23 // RUN
: llvm-objdump
-d
-z
%t | FileCheck
%s
--check-prefix
=DISASM
25 // DISASM
: 0000000000000000 main
:
26 // DISASM-NEXT
: 0: 00 00 addb
%al
, (%rax
)
27 // DISASM-NEXT
: 2: 00 00 addb
%al
, (%rax
)
28 // DISASM-NEXT
: 4: 00 00 addb
%al
, (%rax
)
29 // DISASM-NEXT
: 6: 00 90 00 00 00 00 addb
%dl
, (%rax
)
30 // DISASM-NEXT
: c
: 00 00 addb
%al
, (%rax
)
31 // DISASM-NEXT
: e
: 00 00 addb
%al
, (%rax
)
32 // DISASM-NEXT
: 10: 00 00 addb
%al
, (%rax
)
33 // DISASM-NEXT
: 12: 00 00 addb
%al
, (%rax
)
34 // DISASM-NEXT
: 14: 00 00 addb
%al
, (%rax
)
35 // DISASM-NEXT
: 16: 00 00 addb
%al
, (%rax
)
36 // DISASM-NEXT
: 18: 00 00 addb
%al
, (%rax
)
37 // DISASM-NEXT
: 1a: 00 00 addb
%al
, (%rax
)
38 // DISASM-NEXT
: 1c
: 00 00 addb
%al
, (%rax
)
39 // DISASM-NEXT
: 1e
: 00 00 addb
%al
, (%rax
)
40 // DISASM-NEXT
: 20: 90 nop
41 // DISASM-NEXT
: 21: 00 00 addb
%al
, (%rax
)
42 // DISASM-NEXT
: 23: 00 00 addb
%al
, (%rax
)
43 // DISASM-NEXT
: 25: 00 00 addb
%al
, (%rax
)
44 // DISASM-NEXT
: 27: 00 00 addb
%al
, (%rax
)
45 // DISASM-NEXT
: 29: 00 00 addb
%al
, (%rax
)
46 // DISASM-NEXT
: 2b: 00 00 addb
%al
, (%rax
)
47 // DISASM-NEXT
: 2d
: 00 00 addb
%al
, (%rax
)
48 // DISASM-NEXT
: 2f
: 00 00 addb
%al
, (%rax
)
49 // DISASM
: 0000000000000031 foo
:
50 // DISASM-NEXT
: 31: 00 00 addb
%al
, (%rax
)
51 // DISASM-NEXT
: 33: 00 00 addb
%al
, (%rax
)
52 // DISASM
: 0000000000000035 bar
:
53 // DISASM-NEXT
: 35: 00 00 addb
%al
, (%rax
)
54 // DISASM-NEXT
: 37: 00 00 addb
%al
, (%rax
)
55 // DISASM-NEXT
: 39: 00 00 addb
%al
, (%rax
)
56 // DISASM-NEXT
: 3b: 00 00 addb
%al
, (%rax
)
58 // Check that
--disassemble-zeroes work as alias for
-z.
59 // RUN
: llvm-objdump
-d
--disassemble-zeroes
%t | FileCheck
%s
--check-prefix
=DISASM