49 lines · plain
1# RUN: llvm-mc %s -filetype=obj -triple=i386 -o %t.32.o2# RUN: llvm-mc %s -filetype=obj -triple=x86_64 -o %t.64.o3 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-whitespace6# RUN: llvm-objdump -D %t.64.o | FileCheck --check-prefixes=ADDR64,ADDR %s --match-full-lines --strict-whitespace7# ADDR32:00000000 <foo>:8# ADDR64:0000000000000000 <foo>:9# ADDR-NEXT: 0: 90{{ +}} nop10# ADDR-NEXT: 1: 90{{ +}} nop11#ADDR-EMPTY:12# ADDR32:00000002 <bar>:13# ADDR64:0000000000000002 <bar>:14# ADDR-NEXT: 2: 90{{ +}} nop15# ADDR:Disassembly of section .data:16#ADDR-EMPTY:17# ADDR32:00000000 <.data>:18# ADDR64:0000000000000000 <.data>:19# ADDR-NEXT: 0: 01 00{{ +}} addl %eax, (%{{[er]}}ax)20#ADDR-EMPTY:21 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.txt24# RUN: llvm-objdump -d --no-leading-addr %t.64.o > %t.64.txt25# RUN: FileCheck --input-file=%t.32.txt %s --check-prefix=NOADDR --match-full-lines --strict-whitespace26# RUN: FileCheck --input-file=%t.64.txt %s --check-prefix=NOADDR --match-full-lines --strict-whitespace27# 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 -29 30# NOADDR:<foo>:31# NOADDR-NEXT: 90{{ +}} nop32# NOADDR-NEXT: 90{{ +}} nop33#NOADDR-EMPTY:34# NOADDR:<bar>:35# NOADDR-NEXT: 90{{ +}} nop36 37.text38.globl foo39.type foo, @function40foo:41 nop42 nop43 44bar:45 nop46 47.data48 .word 149