summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-12-29 22:12:11 +0000
committerBill Wendling <isanbard@gmail.com>2008-12-29 22:12:11 +0000
commit03f2af79b84fab0858bb8d09e49293addb0fe601 (patch)
treef160233d00fc712b90bd5e2facfd9fad5ccb8f13
parentb13c83ac18f8d645bd7a2f281152dae0282cecd9 (diff)
downloadbcm5719-llvm-03f2af79b84fab0858bb8d09e49293addb0fe601.tar.gz
bcm5719-llvm-03f2af79b84fab0858bb8d09e49293addb0fe601.zip
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
-rw-r--r--llvm/include/llvm/Target/TargetAsmInfo.h8
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp6
-rw-r--r--llvm/lib/Target/TargetAsmInfo.cpp1
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.cpp1
4 files changed, 14 insertions, 2 deletions
diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h
index aa9c14514c9..c880179038d 100644
--- a/llvm/include/llvm/Target/TargetAsmInfo.h
+++ b/llvm/include/llvm/Target/TargetAsmInfo.h
@@ -457,6 +457,11 @@ namespace llvm {
///
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
/// tables globally visible.
///
@@ -829,6 +834,9 @@ namespace llvm {
bool doesRequireNonLocalEHFrameLabel() const {
return NonLocalEHFrameLabel;
}
+ bool doesRequire32BitFDEReference() const {
+ return Force32BitFDEReference;
+ }
const char *getGlobalEHDirective() const {
return GlobalEHDirective;
}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 6534f401cc6..691c922d0af 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -3119,10 +3119,12 @@ private:
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");
EmitDifference("eh_func_end", EHFrameInfo.Number,
- "eh_func_begin", EHFrameInfo.Number);
+ "eh_func_begin", EHFrameInfo.Number,
+ TAI->doesRequire32BitFDEReference());
Asm->EOL("FDE address range");
// If there is a personality and landing pads then point to the language
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index c9a525a506e..5cf298aa95b 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -101,6 +101,7 @@ void TargetAsmInfo::fillDefaultValues() {
DwarfRequiresFrameSection = true;
FDEEncodingRequiresSData4 = true;
NonLocalEHFrameLabel = false;
+ Force32BitFDEReference = true;
GlobalEHDirective = 0;
SupportsWeakOmittedEHFrame = true;
DwarfSectionOffsetDirective = 0;
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index 4dfb214ec71..de655e732b2 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -72,6 +72,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
HasSingleParameterDotFile = false;
FDEEncodingRequiresSData4 = false;
NonLocalEHFrameLabel = true;
+ Force32BitFDEReference = false;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
StaticDtorsSection = ".destructor";
OpenPOWER on IntegriCloud