mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
On 64bit we may have a personality function which requires 64 bits to
be encoded. llvm-svn: 64600
This commit is contained in:
parent
6c1ce1dbd5
commit
93eebdfcc7
@ -519,14 +519,20 @@ JITDwarfEmitter::EmitCommonEHFrame(const Function* Personality) const {
|
|||||||
MCE->emitByte(RI->getDwarfRegNum(RI->getRARegister(), true));
|
MCE->emitByte(RI->getDwarfRegNum(RI->getRARegister(), true));
|
||||||
|
|
||||||
if (Personality) {
|
if (Personality) {
|
||||||
MCE->emitULEB128Bytes(7);
|
// Augmentation Size: 3 small ULEBs of one byte each, and the personality
|
||||||
|
// function which size is PointerSize.
|
||||||
|
MCE->emitULEB128Bytes(3 + PointerSize);
|
||||||
|
|
||||||
// Direct encoding, because we use the function pointer. Not relative,
|
// We set the encoding of the personality as direct encoding because we use
|
||||||
// because the current PC value may be bigger than the personality
|
// the function pointer. The encoding is not relative because the current
|
||||||
// function pointer.
|
// PC value may be bigger than the personality function pointer.
|
||||||
MCE->emitByte(dwarf::DW_EH_PE_sdata4);
|
if (PointerSize == 4) {
|
||||||
|
MCE->emitByte(dwarf::DW_EH_PE_sdata4);
|
||||||
MCE->emitInt32(((intptr_t)Jit.getPointerToGlobal(Personality)));
|
MCE->emitInt32(((intptr_t)Jit.getPointerToGlobal(Personality)));
|
||||||
|
} else {
|
||||||
|
MCE->emitByte(dwarf::DW_EH_PE_sdata8);
|
||||||
|
MCE->emitInt64(((intptr_t)Jit.getPointerToGlobal(Personality)));
|
||||||
|
}
|
||||||
|
|
||||||
MCE->emitULEB128Bytes(dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4);
|
MCE->emitULEB128Bytes(dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4);
|
||||||
MCE->emitULEB128Bytes(dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4);
|
MCE->emitULEB128Bytes(dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4);
|
||||||
|
Loading…
Reference in New Issue
Block a user