1 # RUN: llvm-mc %s -filetype=obj -triple=i386 -o %t.32.o
2 # RUN: llvm-mc %s -filetype=obj -triple=x86_64 -o %t.64.o
4 ## Check we print the address of `foo` and `bar`.
5 # RUN: llvm-objdump -D %t.32.o | FileCheck --check-prefixes=ADDR32,ADDR %s --match-full-lines --strict-whitespace
6 # RUN: llvm-objdump -D %t.64.o | FileCheck --check-prefixes=ADDR64,ADDR %s --match-full-lines --strict-whitespace
7 # ADDR32:00000000 <foo>:
8 # ADDR64:0000000000000000 <foo>:
9 # ADDR-NEXT: 0: 90{{ +}} nop
10 # ADDR-NEXT: 1: 90{{ +}} nop
12 # ADDR32:00000002 <bar>:
13 # ADDR64:0000000000000002 <bar>:
14 # ADDR-NEXT: 2: 90{{ +}} nop
15 # ADDR:Disassembly of section .data:
17 # ADDR32:00000000 <.data>:
18 # ADDR64:0000000000000000 <.data>:
19 # ADDR-NEXT: 0: 01 00{{ +}} addl %eax, (%{{[er]}}ax)
22 ## Check we do not print the addresses with --no-leading-addr.
23 # RUN: llvm-objdump -d --no-leading-addr %t.32.o > %t.32.txt
24 # RUN: llvm-objdump -d --no-leading-addr %t.64.o > %t.64.txt
25 # RUN: FileCheck --input-file=%t.32.txt %s --check-prefix=NOADDR --match-full-lines --strict-whitespace
26 # RUN: FileCheck --input-file=%t.64.txt %s --check-prefix=NOADDR --match-full-lines --strict-whitespace
27 # RUN: llvm-objdump -d --no-addresses %t.32.o | diff %t.32.txt -
28 # RUN: llvm-objdump -d --no-addresses %t.64.o | diff %t.64.txt -
31 # NOADDR-NEXT: 90{{ +}} nop
32 # NOADDR-NEXT: 90{{ +}} nop
35 # NOADDR-NEXT: 90{{ +}} nop