brintos

brintos / llvm-project-archived public Read only

0
0
Text · 773 B · deea802 Raw
18 lines · plain
1# Test that BOLT can handle CIE's produced by GNU as. On RISC-V, GNU as produces2# the following initial instruction:3# DW_CFA_def_cfa_register: r24# While I believe it is technically incorrect to use this instruction without5# first using a DW_CFA_def_cfa (since the offset is unspecified), both readelf6# and llvm-dwarfdump accept this and implicitly set the offset to 0.7# In BOLT, this used to trigger an assert, however, since it (correctly)8# believed the offset was not set. This test checks we can handle this9# situation.10 11RUN: yaml2obj -o %t %p/Inputs/cie-gnu.yaml12RUN: llvm-bolt -o %t.bolt %t --reorder-blocks=reverse13RUN: llvm-dwarfdump --debug-frame %t.bolt | FileCheck %s14 15CHECK: 0x400000: CFA=X216CHECK: 0x400004: CFA=X2: X5=undefined17CHECK: 0x400006: CFA=X218