1 ## Test that in the presence of SHT_LLVM_BB_ADDR_MAP sections,
2 ## --symbolize-operands can display <BB*> labels.
4 ## Executable object file with separate SHT_LLVM_BB_ADDR_MAP sections for multiple text sections.
5 ## RUN: yaml2obj --docnum=1 %s -o %t1
6 ## RUN: llvm-objdump %t1 -d --symbolize-operands -M intel --no-show-raw-insn --no-leading-addr | \
7 ## RUN: FileCheck %s --match-full-lines --check-prefixes=INTEL
8 ## RUN: llvm-objdump %t1 -d --symbolize-operands -M att --no-show-raw-insn --no-leading-addr | \
9 ## RUN: FileCheck %s --match-full-lines --check-prefixes=ATT
11 ## Executable object file with a single SHT_LLVM_BB_ADDR_MAP for multiple text sections.
12 # RUN: yaml2obj --docnum=2 %s -o %t2
13 # RUN: llvm-objdump %t2 -d --symbolize-operands -M intel --no-show-raw-insn --no-leading-addr | \
14 # RUN: FileCheck %s --match-full-lines --check-prefixes=INTEL
15 # RUN: llvm-objdump %t2 -d --symbolize-operands -M att --no-show-raw-insn --no-leading-addr | \
16 # RUN: FileCheck %s --match-full-lines --check-prefixes=ATT
18 ## Expect to find the branch and basic block labels and global variable name.
21 # ATT-NEXT: pushq %rax
23 # ATT-NEXT: cmpl , %eax <symbol>
29 # ATT-NEXT: jge <foo.cold>
34 # ATT-NEXT: pushq %rax
35 # ATT-NEXT: movl %edx, %eax
38 # ATT-NEXT: xorl %esi, %esi
40 # ATT-NEXT: callq <bar>
48 # INTEL-NEXT: push rax
50 # INTEL-NEXT: cmp eax, dword ptr <symbol>
53 # INTEL-NEXT: jge <BB5>
54 # INTEL-NEXT: jmp <BB1>
56 # INTEL-NEXT: jge <foo.cold>
61 # INTEL-NEXT: push rax
62 # INTEL-NEXT: mov eax, edx
63 # INTEL-NEXT: je <BB2>
65 # INTEL-NEXT: xor esi, esi
67 # INTEL-NEXT: call <bar>
73 ## This object file contains a separate text section and SHT_LLVM_BB_ADDR_MAP
74 ## section for each of the two functions foo and bar.
75 ## This is used to test --symbolize-operands on reloctable and non-relocotable
87 Flags: [SHF_ALLOC, SHF_EXECINSTR]
88 Content: '503b0505300000907d08ebf50f8dee1f0000c3'
92 Flags: [SHF_ALLOC, SHF_EXECINSTR]
93 Content: '5089d0740231f6e8f4ffffffc3'
97 Flags: [SHF_ALLOC, SHF_EXECINSTR]
101 Flags: [SHF_ALLOC, SHF_WRITE]
103 - Name: .llvm_bb_addr_map.foo
104 Type: SHT_LLVM_BB_ADDR_MAP
110 - BaseAddress: 0x4000
132 - BaseAddress: 0x6000
138 - Name: .llvm_bb_addr_map.bar
139 Type: SHT_LLVM_BB_ADDR_MAP
144 - BaseAddress: 0x5000
170 ## This object file contains a single SHT_LLVM_BB_ADDR_MAP for two text
171 ## sections .text.foo and .text.bar.
182 Flags: [SHF_ALLOC, SHF_EXECINSTR]
183 Content: '503b0505300000907d08ebf50f8dee1f0000c3'
187 Flags: [SHF_ALLOC, SHF_EXECINSTR]
188 Content: '5089d0740231f6e8f4ffffffc3'
192 Flags: [SHF_ALLOC, SHF_EXECINSTR]
196 Flags: [SHF_ALLOC, SHF_WRITE]
198 - Name: .llvm_bb_addr_map.foo
199 Type: SHT_LLVM_BB_ADDR_MAP
205 - BaseAddress: 0x4000
227 - BaseAddress: 0x6000
235 - BaseAddress: 0x5000