[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / tools / llvm-objdump / X86 / start-stop-address-relocatable-object.test
blob14de4ec69cbafe0c4ad1155d7c18ed2d73bcde85
1 ## Show how --start-address and --stop-address work in a relocatable object.
2 ## They limit the disassembly to the relative offset ranges within sections.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-objdump -d %t.o --start-address=1 --stop-address=2 | FileCheck %s --check-prefix=COMMON
5 # RUN: llvm-objdump -d %t.o --start-address=1 | FileCheck %s --check-prefixes=START,COMMON
6 # RUN: llvm-objdump -d %t.o --stop-address=2 | FileCheck %s --check-prefixes=STOP,COMMON
8 # COMMON:       Disassembly of section .text:
9 # COMMON-EMPTY:
10 # COMMON-NEXT:  0000000000000000 <.text>:
11 # STOP-NEXT:           0: 90                            nop
12 # COMMON-NEXT:         1: 90                            nop
13 # START-NEXT:          2: 90                            nop
14 # COMMON-EMPTY:
15 # COMMON-NEXT:  Disassembly of section .text2:
16 # COMMON-EMPTY:
17 # COMMON-NEXT:  0000000000000000 <.text2>:
18 # STOP-NEXT:           0: c3                            retq
19 # COMMON-NEXT:         1: c3                            retq
20 # START-NEXT:          2: c3                            retq
21 # STOP-EMPTY:
22 # STOP-NEXT:    Disassembly of section .text3:
23 # STOP-EMPTY:
24 # STOP-NEXT:    0000000000000000 <.text3>:
25 # STOP-NEXT:           0: cc                            int3
26 # COMMON-NOT:   {{.}}
28 --- !ELF
29 FileHeader:
30   Class:   ELFCLASS64
31   Data:    ELFDATA2LSB
32   Type:    ET_REL
33   Machine: EM_X86_64
34 Sections:
35   - Name:         .text
36     Type:         SHT_PROGBITS
37     Flags:        [SHF_ALLOC, SHF_EXECINSTR]
38     Content:      '909090'
39   - Name:         .text2
40     Type:         SHT_PROGBITS
41     Flags:        [SHF_ALLOC, SHF_EXECINSTR]
42     Content:      'c3c3c3'
43   - Name:         .text3
44     Type:         SHT_PROGBITS
45     Flags:        [SHF_ALLOC, SHF_EXECINSTR]
46     Content:      'cc'