summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-13 18:48:39 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-13 18:48:39 +0000
commit0a860df8ef1cee578f87d8012289468b4f9ac9d5 (patch)
treec24467bae4e8780fe99bac65e9df6b5b45275d9a /llvm/lib
parent2841ea4749faaabd1cc62316d318b824d13a466e (diff)
downloadbcm5719-llvm-0a860df8ef1cee578f87d8012289468b4f9ac9d5.tar.gz
bcm5719-llvm-0a860df8ef1cee578f87d8012289468b4f9ac9d5.zip
On greater than Leopard systems, place exception tables in the __TEXT section.
llvm-svn: 75484
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index 4b24ccc2d96..244d2f16a9b 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -40,7 +40,7 @@ const char *const llvm::x86_asm_table[] = {
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo<DarwinTargetAsmInfo>(TM) {
- const X86Subtarget* Subtarget = &TM.getSubtarget<X86Subtarget>();
+ const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
bool is64Bit = Subtarget->is64Bit();
AlignmentIsInBytes = false;
@@ -60,10 +60,12 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
SectionFlags::Mergeable);
LCOMMDirective = "\t.lcomm\t";
+
// Leopard and above support aligned common symbols.
COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
HasDotTypeDotSizeDirective = false;
NonLocalEHFrameLabel = true;
+
if (is64Bit) {
PersonalityPrefix = "";
PersonalitySuffix = "+4@GOTPCREL";
@@ -71,6 +73,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
PersonalityPrefix = "L";
PersonalitySuffix = "$non_lazy_ptr";
}
+
InlineAsmStart = "## InlineAsm Start";
InlineAsmEnd = "## InlineAsm End";
CommentString = "##";
@@ -80,7 +83,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
ProtectedDirective = "\t.globl\t";
SupportsDebugInformation = true;
-
DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
DwarfUsesInlineInfoSection = true;
@@ -91,7 +93,13 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
AbsoluteEHSectionOffsets = false;
DwarfEHFrameSection =
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
- DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
+
+ // Leopard and earlier put exception tables in __DATA. Greater than Leopard
+ // put them in __TEXT.
+ if (Subtarget->getDarwinVers() < 10)
+ DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
+ else
+ DwarfExceptionSection = ".section __TEXT,__gcc_except_tab";
}
unsigned
OpenPOWER on IntegriCloud