32 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-main.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-call-pc-helper.s -o %thelper.o5# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper.o -o %t.exe -Wl,-q6# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections -reorder-blocks=reverse --debug-thread-count=4 --cu-processing-batch-size=47# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe > %tmain.txt8# RUN: llvm-objdump %t.exe --disassemble >> %tmain.txt9# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.exe.bolt > %tmainbolt.txt10# RUN: llvm-objdump %t.exe.bolt --disassemble >> %tmainbolt.txt11# RUN: cat %tmain.txt | FileCheck --check-prefix=PRECHECK %s12# RUN: cat %tmainbolt.txt | FileCheck --check-prefix=POSTCHECK %s13 14## Test checks that DW_AT_call_pc address points to a correct address for jmp instruction.15 16# PRECHECK: DW_TAG_call_site [6]17# PRECHECK-NEXT: DW_AT_call_origin [DW_FORM_ref4]18# PRECHECK-NEXT: DW_AT_call_tail_call19# PRECHECK-NEXT: DW_AT_call_pc [DW_FORM_addrx]20# PRECHECK-SAME: address = 0x[[#%x,ADDR:]])21# PRECHECK: [[#ADDR]]:22# PRECHECK-SAME: jmp23 24# POSTCHECK: DW_TAG_call_site [6]25# POSTCHECK-NEXT: DW_AT_call_origin [DW_FORM_ref4]26# POSTCHECK-NEXT: DW_AT_call_tail_call27# POSTCHECK-NEXT: DW_AT_call_pc [DW_FORM_addrx]28# POSTCHECK-SAME: address = 0x[[#%x,ADDR:]])29# POSTCHECK: <main>:30# POSTCHECK: [[#ADDR]]:31# POSTCHECK-SAME: jmp32