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;
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";
PersonalityPrefix = "L";
PersonalitySuffix = "$non_lazy_ptr";
}
+
InlineAsmStart = "## InlineAsm Start";
InlineAsmEnd = "## InlineAsm End";
CommentString = "##";
ProtectedDirective = "\t.globl\t";
SupportsDebugInformation = true;
-
DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
DwarfUsesInlineInfoSection = true;
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