forked from OSchip/llvm-project
Linux wants the FDE initial location and address range to be forced to 32-bit.
Darwin doesn't. Make this optional for platforms. llvm-svn: 61484
This commit is contained in:
parent
b13c83ac18
commit
03f2af79b8
llvm
include/llvm/Target
lib
|
@ -457,6 +457,11 @@ namespace llvm {
|
||||||
///
|
///
|
||||||
bool NonLocalEHFrameLabel; // Defaults to false.
|
bool NonLocalEHFrameLabel; // Defaults to false.
|
||||||
|
|
||||||
|
/// Force32BitFDEReference - Force the FDE initial location and address
|
||||||
|
/// range to be 32-bit sized.
|
||||||
|
///
|
||||||
|
bool Force32BitFDEReference; // Defaults to true.
|
||||||
|
|
||||||
/// GlobalEHDirective - This is the directive used to make exception frame
|
/// GlobalEHDirective - This is the directive used to make exception frame
|
||||||
/// tables globally visible.
|
/// tables globally visible.
|
||||||
///
|
///
|
||||||
|
@ -829,6 +834,9 @@ namespace llvm {
|
||||||
bool doesRequireNonLocalEHFrameLabel() const {
|
bool doesRequireNonLocalEHFrameLabel() const {
|
||||||
return NonLocalEHFrameLabel;
|
return NonLocalEHFrameLabel;
|
||||||
}
|
}
|
||||||
|
bool doesRequire32BitFDEReference() const {
|
||||||
|
return Force32BitFDEReference;
|
||||||
|
}
|
||||||
const char *getGlobalEHDirective() const {
|
const char *getGlobalEHDirective() const {
|
||||||
return GlobalEHDirective;
|
return GlobalEHDirective;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3119,10 +3119,12 @@ private:
|
||||||
|
|
||||||
Asm->EOL("FDE CIE offset");
|
Asm->EOL("FDE CIE offset");
|
||||||
|
|
||||||
EmitReference("eh_func_begin", EHFrameInfo.Number, true);
|
EmitReference("eh_func_begin", EHFrameInfo.Number, true,
|
||||||
|
TAI->doesRequire32BitFDEReference());
|
||||||
Asm->EOL("FDE initial location");
|
Asm->EOL("FDE initial location");
|
||||||
EmitDifference("eh_func_end", EHFrameInfo.Number,
|
EmitDifference("eh_func_end", EHFrameInfo.Number,
|
||||||
"eh_func_begin", EHFrameInfo.Number);
|
"eh_func_begin", EHFrameInfo.Number,
|
||||||
|
TAI->doesRequire32BitFDEReference());
|
||||||
Asm->EOL("FDE address range");
|
Asm->EOL("FDE address range");
|
||||||
|
|
||||||
// If there is a personality and landing pads then point to the language
|
// If there is a personality and landing pads then point to the language
|
||||||
|
|
|
@ -101,6 +101,7 @@ void TargetAsmInfo::fillDefaultValues() {
|
||||||
DwarfRequiresFrameSection = true;
|
DwarfRequiresFrameSection = true;
|
||||||
FDEEncodingRequiresSData4 = true;
|
FDEEncodingRequiresSData4 = true;
|
||||||
NonLocalEHFrameLabel = false;
|
NonLocalEHFrameLabel = false;
|
||||||
|
Force32BitFDEReference = true;
|
||||||
GlobalEHDirective = 0;
|
GlobalEHDirective = 0;
|
||||||
SupportsWeakOmittedEHFrame = true;
|
SupportsWeakOmittedEHFrame = true;
|
||||||
DwarfSectionOffsetDirective = 0;
|
DwarfSectionOffsetDirective = 0;
|
||||||
|
|
|
@ -72,6 +72,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
||||||
HasSingleParameterDotFile = false;
|
HasSingleParameterDotFile = false;
|
||||||
FDEEncodingRequiresSData4 = false;
|
FDEEncodingRequiresSData4 = false;
|
||||||
NonLocalEHFrameLabel = true;
|
NonLocalEHFrameLabel = true;
|
||||||
|
Force32BitFDEReference = false;
|
||||||
if (TM.getRelocationModel() == Reloc::Static) {
|
if (TM.getRelocationModel() == Reloc::Static) {
|
||||||
StaticCtorsSection = ".constructor";
|
StaticCtorsSection = ".constructor";
|
||||||
StaticDtorsSection = ".destructor";
|
StaticDtorsSection = ".destructor";
|
||||||
|
|
Loading…
Reference in New Issue