forked from OSchip/llvm-project
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
information for EH. llvm-svn: 41852
This commit is contained in:
parent
69c1b10993
commit
74fb0f1a1c
|
@ -116,6 +116,11 @@ namespace llvm {
|
||||||
const char *PersonalityPrefix; // Defaults to ""
|
const char *PersonalityPrefix; // Defaults to ""
|
||||||
const char *PersonalitySuffix; // Defaults to ""
|
const char *PersonalitySuffix; // Defaults to ""
|
||||||
|
|
||||||
|
/// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
|
||||||
|
/// for EH in Dwarf.
|
||||||
|
///
|
||||||
|
bool NeedsIndirectEncoding; // Defaults to false
|
||||||
|
|
||||||
/// InlineAsmStart/End - If these are nonempty, they contain a directive to
|
/// InlineAsmStart/End - If these are nonempty, they contain a directive to
|
||||||
/// emit before and after an inline assembly statement.
|
/// emit before and after an inline assembly statement.
|
||||||
const char *InlineAsmStart; // Defaults to "#APP\n"
|
const char *InlineAsmStart; // Defaults to "#APP\n"
|
||||||
|
|
|
@ -2789,7 +2789,12 @@ private:
|
||||||
if (Personality) {
|
if (Personality) {
|
||||||
Asm->EmitULEB128Bytes(7);
|
Asm->EmitULEB128Bytes(7);
|
||||||
Asm->EOL("Augmentation Size");
|
Asm->EOL("Augmentation Size");
|
||||||
|
|
||||||
|
if (TAI->getNeedsIndirectEncoding())
|
||||||
Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect);
|
Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4 | DW_EH_PE_indirect);
|
||||||
|
else
|
||||||
|
Asm->EmitInt8(DW_EH_PE_pcrel | DW_EH_PE_sdata4);
|
||||||
|
|
||||||
Asm->EOL("Personality (pcrel sdata4 indirect)");
|
Asm->EOL("Personality (pcrel sdata4 indirect)");
|
||||||
|
|
||||||
PrintRelDirective();
|
PrintRelDirective();
|
||||||
|
|
|
@ -40,6 +40,7 @@ TargetAsmInfo::TargetAsmInfo() :
|
||||||
FunctionAddrSuffix(""),
|
FunctionAddrSuffix(""),
|
||||||
PersonalityPrefix(""),
|
PersonalityPrefix(""),
|
||||||
PersonalitySuffix(""),
|
PersonalitySuffix(""),
|
||||||
|
NeedsIndirectEncoding(false),
|
||||||
InlineAsmStart("#APP"),
|
InlineAsmStart("#APP"),
|
||||||
InlineAsmEnd("#NO_APP"),
|
InlineAsmEnd("#NO_APP"),
|
||||||
AssemblerDialect(0),
|
AssemblerDialect(0),
|
||||||
|
|
|
@ -70,6 +70,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
|
||||||
}
|
}
|
||||||
PersonalityPrefix = "L";
|
PersonalityPrefix = "L";
|
||||||
PersonalitySuffix = "$non_lazy_ptr";
|
PersonalitySuffix = "$non_lazy_ptr";
|
||||||
|
NeedsIndirectEncoding = true;
|
||||||
InlineAsmStart = "# InlineAsm Start";
|
InlineAsmStart = "# InlineAsm Start";
|
||||||
InlineAsmEnd = "# InlineAsm End";
|
InlineAsmEnd = "# InlineAsm End";
|
||||||
SetDirective = "\t.set";
|
SetDirective = "\t.set";
|
||||||
|
|
Loading…
Reference in New Issue