diff options
author | Fangrui Song <i@maskray.me> | 2024-01-07 22:43:57 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-01-07 22:43:57 -0800 |
commit | faf0bcf968a20b759d3647da45a63f466d098488 (patch) | |
tree | a5c276e0cc1daec68b76ef9a77052baf0e25b614 | |
parent | 1dfb9498333a6c7c6ac012eb70dc593f5165a025 (diff) |
[𝘀𝗽𝗿] initial versionupstream/users/MaskRay/spr/riscv-restore-dw_eh_pe_uleb128-call-site-encoding-for-gcc_except_table
Created using spr 1.3.4
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/RISCV/dwarf-eh.ll | 15 |
2 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 6e69dc66429d..cf9522dc140c 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -244,7 +244,6 @@ void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx, PersonalityEncoding = dwarf::DW_EH_PE_absptr; TTypeEncoding = dwarf::DW_EH_PE_absptr; } - CallSiteEncoding = dwarf::DW_EH_PE_udata4; break; case Triple::riscv32: case Triple::riscv64: @@ -253,7 +252,6 @@ void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx, dwarf::DW_EH_PE_sdata4; TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; - CallSiteEncoding = dwarf::DW_EH_PE_udata4; break; case Triple::sparcv9: LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4; diff --git a/llvm/test/CodeGen/RISCV/dwarf-eh.ll b/llvm/test/CodeGen/RISCV/dwarf-eh.ll index 39cc0d52c9fe..9e13ecf81aac 100644 --- a/llvm/test/CodeGen/RISCV/dwarf-eh.ll +++ b/llvm/test/CodeGen/RISCV/dwarf-eh.ll @@ -52,15 +52,14 @@ try.cont: ; TTypeEncoding = DW_EH_PE_indirect | DW_EH_PE_pcrel | DW_EH_PE_sdata4 ; CHECK-NEXT: .byte 155 # @TType Encoding = indirect pcrel sdata4 ; CHECK: .Lttbaseref0: -; CallSiteEncoding = dwarf::DW_EH_PE_udata4 -; CHECK-NEXT: .byte 3 # Call site Encoding = udata4 +; CHECK-NEXT: .byte 1 # Call site Encoding = uleb128 ; CHECK-NEXT: .uleb128 .Lcst_end0-.Lcst_begin0 ; CHECK-NEXT: cst_begin0: -; CHECK-NEXT: .word .Ltmp0-.Lfunc_begin0 # >> Call Site 1 << -; CHECK-NEXT: .word .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1 -; CHECK-NEXT: .word .Ltmp2-.Lfunc_begin0 # jumps to .Ltmp2 +; CHECK-NEXT: .uleb128 .Ltmp0-.Lfunc_begin0 # >> Call Site 1 << +; CHECK-NEXT: .uleb128 .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1 +; CHECK-NEXT: .uleb128 .Ltmp2-.Lfunc_begin0 # jumps to .Ltmp2 ; CHECK-NEXT: .byte 1 # On action: 1 -; CHECK-NEXT: .word .Ltmp1-.Lfunc_begin0 # >> Call Site 2 << -; CHECK-NEXT: .word .Lfunc_end0-.Ltmp1 # Call between .Ltmp1 and .Lfunc_end0 -; CHECK-NEXT: .word 0 # has no landing pad +; CHECK-NEXT: .uleb128 .Ltmp1-.Lfunc_begin0 # >> Call Site 2 << +; CHECK-NEXT: .uleb128 .Lfunc_end0-.Ltmp1 # Call between .Ltmp1 and .Lfunc_end0 +; CHECK-NEXT: .byte 0 # has no landing pad ; CHECK-NEXT: .byte 0 # On action: cleanup |