mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[AsmPrinter] Make the encoding of call sites in .gcc_except_table configurable and use for RISC-V
The original behavior was to always emit the offsets to each call site in the call site table as uleb128 values, however on some architectures (eg RISCV) these uleb128 offsets into the code cannot always be resolved until link time (because relaxation will invalidate any calculated offsets), and there are no appropriate relocations for uleb128 values. As a consequence it needs to be possible to specify an alternative. This also switches RISCV to use DW_EH_PE_udata4 for call side encodings in .gcc_except_table Differential Revision: https://reviews.llvm.org/D63415 Patch by Edward Jones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -218,6 +218,7 @@ 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:
|
||||
@@ -226,6 +227,7 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user