mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Retrying r91337:
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine, but we need it to actually be 4-bytes in the FDE for some platforms. Allow individual platforms to decide for themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -283,17 +283,28 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
|
||||
if (MMI->getPersonalities()[0] != NULL) {
|
||||
bool is4Byte = TD->getPointerSize() == sizeof(int32_t);
|
||||
|
||||
Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
|
||||
Asm->EOL("Augmentation size");
|
||||
if (Asm->TM.getLSDAEncoding() == DwarfLSDAEncoding::FourByte) {
|
||||
Asm->EmitULEB128Bytes(4);
|
||||
Asm->EOL("Augmentation size");
|
||||
|
||||
if (EHFrameInfo.hasLandingPads)
|
||||
EmitReference("exception", EHFrameInfo.Number, true, false);
|
||||
else {
|
||||
if (is4Byte)
|
||||
Asm->EmitInt32((int)0);
|
||||
if (EHFrameInfo.hasLandingPads)
|
||||
EmitReference("exception", EHFrameInfo.Number, true, true);
|
||||
else
|
||||
Asm->EmitInt64((int)0);
|
||||
Asm->EmitInt32((int)0);
|
||||
} else {
|
||||
Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
|
||||
Asm->EOL("Augmentation size");
|
||||
|
||||
if (EHFrameInfo.hasLandingPads) {
|
||||
EmitReference("exception", EHFrameInfo.Number, true, false);
|
||||
} else {
|
||||
if (is4Byte)
|
||||
Asm->EmitInt32((int)0);
|
||||
else
|
||||
Asm->EmitInt64((int)0);
|
||||
}
|
||||
}
|
||||
|
||||
Asm->EOL("Language Specific Data Area");
|
||||
} else {
|
||||
Asm->EmitULEB128Bytes(0);
|
||||
|
Reference in New Issue
Block a user