brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 8e35ef6 Raw
30 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-return-pc-form-addr-main.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-return-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_return_pc points to an address after the callq instruction.15 16# PRECHECK: DW_TAG_call_site [11]17# PRECHECK-NEXT: DW_AT_call_origin [DW_FORM_ref4]18# PRECHECK-NEXT: DW_AT_call_return_pc [DW_FORM_addr]19# PRECHECK-SAME: 0x[[#%x,ADDR:]])20# PRECHECK: callq21# PRECHECK-NEXT: [[#ADDR]]:22 23# POSTCHECK: DW_TAG_call_site [11]24# POSTCHECK-NEXT: DW_AT_call_origin [DW_FORM_ref4]25# POSTCHECK-NEXT: DW_AT_call_return_pc [DW_FORM_addr]26# POSTCHECK-SAME: 0x[[#%x,ADDR:]])27# POSTCHECK: <main>:28# POSTCHECK: callq29# POSTCHECK-NEXT: [[#ADDR]]:30