Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / MC / X86 / disassemble-zeroes.s
blob2ecfdad0c2d91b2b0374ac0748b226acc24d61df
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: Disassembly of section .text:
9 // NODISASM-NEXT: 0000000000000000 main:
10 // NODISASM-NEXT: 0: 00 00 addb %al, (%rax)
11 // NODISASM-NEXT: 2: 00 00 addb %al, (%rax)
12 // NODISASM-NEXT: 4: 00 00 addb %al, (%rax)
13 // NODISASM-NEXT: 6: 00 90 00 00 00 00 addb %dl, (%rax)
14 // NODISASM-NEXT: ...
15 // NODISASM-NEXT: 20: 90 nop
16 // NODISASM-NEXT: ...
17 // NODISASM: 0000000000000031 foo:
18 // NODISASM-NEXT: 31: 00 00 addb %al, (%rax)
19 // NODISASM-NEXT: 33: 00 00 addb %al, (%rax)
20 // NODISASM: 0000000000000035 bar:
21 // NODISASM-NEXT: ...
23 // Check that with -z we disassemble blocks of zeroes.
24 // RUN: llvm-objdump -d -z %t | FileCheck %s --check-prefix=DISASM
26 // DISASM: Disassembly of section .text:
27 // DISASM-NEXT: 0000000000000000 main:
28 // DISASM-NEXT: 0: 00 00 addb %al, (%rax)
29 // DISASM-NEXT: 2: 00 00 addb %al, (%rax)
30 // DISASM-NEXT: 4: 00 00 addb %al, (%rax)
31 // DISASM-NEXT: 6: 00 90 00 00 00 00 addb %dl, (%rax)
32 // DISASM-NEXT: c: 00 00 addb %al, (%rax)
33 // DISASM-NEXT: e: 00 00 addb %al, (%rax)
34 // DISASM-NEXT: 10: 00 00 addb %al, (%rax)
35 // DISASM-NEXT: 12: 00 00 addb %al, (%rax)
36 // DISASM-NEXT: 14: 00 00 addb %al, (%rax)
37 // DISASM-NEXT: 16: 00 00 addb %al, (%rax)
38 // DISASM-NEXT: 18: 00 00 addb %al, (%rax)
39 // DISASM-NEXT: 1a: 00 00 addb %al, (%rax)
40 // DISASM-NEXT: 1c: 00 00 addb %al, (%rax)
41 // DISASM-NEXT: 1e: 00 00 addb %al, (%rax)
42 // DISASM-NEXT: 20: 90 nop
43 // DISASM-NEXT: 21: 00 00 addb %al, (%rax)
44 // DISASM-NEXT: 23: 00 00 addb %al, (%rax)
45 // DISASM-NEXT: 25: 00 00 addb %al, (%rax)
46 // DISASM-NEXT: 27: 00 00 addb %al, (%rax)
47 // DISASM-NEXT: 29: 00 00 addb %al, (%rax)
48 // DISASM-NEXT: 2b: 00 00 addb %al, (%rax)
49 // DISASM-NEXT: 2d: 00 00 addb %al, (%rax)
50 // DISASM-NEXT: 2f: 00 00 addb %al, (%rax)
51 // DISASM: 0000000000000031 foo:
52 // DISASM-NEXT: 31: 00 00 addb %al, (%rax)
53 // DISASM-NEXT: 33: 00 00 addb %al, (%rax)
54 // DISASM: 0000000000000035 bar:
55 // DISASM-NEXT: 35: 00 00 addb %al, (%rax)
56 // DISASM-NEXT: 37: 00 00 addb %al, (%rax)
57 // DISASM-NEXT: 39: 00 00 addb %al, (%rax)
58 // DISASM-NEXT: 3b: 00 00 addb %al, (%rax)
60 // Check that --disassemble-zeroes work as alias for -z.
61 // RUN: llvm-objdump -d --disassemble-zeroes %t | FileCheck %s --check-prefix=DISASM
63 .text
64 .globl main
65 .type main, @function
66 main:
67 .long 0
68 .byte 0
69 .byte 0
70 .byte 0
71 nop
72 .quad 0
73 .quad 0
74 .quad 0
75 nop
76 .quad 0
77 .quad 0
78 foo:
79 .long 0
80 bar:
81 .quad 0