Add support for the same encodings of the personality function that gnu as

supports.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122577 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2010-12-27 00:36:05 +00:00
parent def548f9a0
commit 3a83c40ab6
11 changed files with 518 additions and 46 deletions

View File

@@ -231,6 +231,7 @@ namespace llvm {
MCSymbol *End;
const MCSymbol *Personality;
const MCSymbol *Lsda;
unsigned PersonalityEncoding;
};
class MCDwarfFrameEmitter {

View File

@@ -25,6 +25,7 @@ enum MCFixupKind {
FK_PCRel_1, ///< A one-byte pc relative fixup.
FK_PCRel_2, ///< A two-byte pc relative fixup.
FK_PCRel_4, ///< A four-byte pc relative fixup.
FK_PCRel_8, ///< A eight-byte pc relative fixup.
FirstTargetFixupKind = 128,
@@ -86,9 +87,7 @@ public:
case 1: return isPCRel ? FK_PCRel_1 : FK_Data_1;
case 2: return isPCRel ? FK_PCRel_2 : FK_Data_2;
case 4: return isPCRel ? FK_PCRel_4 : FK_Data_4;
case 8:
assert(!isPCRel && "8 byte pc relative fixup is not supported.");
return FK_Data_8;
case 8: return isPCRel ? FK_PCRel_8 : FK_Data_8;
}
}
};

View File

@@ -394,7 +394,8 @@ namespace llvm {
virtual bool EmitCFIDefCfaOffset(int64_t Offset);
virtual bool EmitCFIDefCfaRegister(int64_t Register);
virtual bool EmitCFIOffset(int64_t Register, int64_t Offset);
virtual bool EmitCFIPersonality(const MCSymbol *Sym);
virtual bool EmitCFIPersonality(const MCSymbol *Sym,
unsigned Encoding);
virtual bool EmitCFILsda(const MCSymbol *Sym);
/// EmitInstruction - Emit the given @p Instruction into the current