mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Fix MIPS exception personality encoding.
For MIPS, we have to encode the personality routine with an indirect pointer to absptr; otherwise, some link warning warning will be raised, and the program might crash in some early MIPS Android device. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -48,16 +48,12 @@ MCSymbol *TargetLoweringObjectFileELF::getCFIPersonalitySymbol(
|
||||
const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM,
|
||||
MachineModuleInfo *MMI) const {
|
||||
unsigned Encoding = getPersonalityEncoding();
|
||||
switch (Encoding & 0x70) {
|
||||
default:
|
||||
report_fatal_error("We do not support this DWARF encoding yet!");
|
||||
case dwarf::DW_EH_PE_absptr:
|
||||
return TM.getSymbol(GV, Mang);
|
||||
case dwarf::DW_EH_PE_pcrel: {
|
||||
if ((Encoding & 0x80) == dwarf::DW_EH_PE_indirect)
|
||||
return getContext().GetOrCreateSymbol(StringRef("DW.ref.") +
|
||||
TM.getSymbol(GV, Mang)->getName());
|
||||
}
|
||||
}
|
||||
if ((Encoding & 0x70) == dwarf::DW_EH_PE_absptr)
|
||||
return TM.getSymbol(GV, Mang);
|
||||
report_fatal_error("We do not support this DWARF encoding yet!");
|
||||
}
|
||||
|
||||
void TargetLoweringObjectFileELF::emitPersonalityValue(MCStreamer &Streamer,
|
||||
|
Reference in New Issue
Block a user