diff options
Diffstat (limited to 'lib/Target/ARM/ARMTargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetAsmInfo.cpp | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp index a1c623c85a..65848e5376 100644 --- a/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -12,18 +12,50 @@ //===----------------------------------------------------------------------===// #include "ARMTargetAsmInfo.h" - +#include "ARMTargetMachine.h" using namespace llvm; ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { - Data16bitsDirective = "\t.half\t"; - Data32bitsDirective = "\t.word\t"; + const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>(); + if (Subtarget->isDarwin()) { + HasDotTypeDotSizeDirective = false; + PrivateGlobalPrefix = "L"; + GlobalPrefix = "_"; + ZeroDirective = "\t.space\t"; + SetDirective = "\t.set"; + WeakRefDirective = "\t.weak_reference\t"; + JumpTableDataSection = ".const"; + CStringSection = "\t.cstring"; + StaticCtorsSection = ".mod_init_func"; + StaticDtorsSection = ".mod_term_func"; + InlineAsmStart = "@ InlineAsm Start"; + InlineAsmEnd = "@ InlineAsm End"; + LCOMMDirective = "\t.lcomm\t"; + COMMDirectiveTakesAlignment = false; + + NeedsSet = true; + DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; + DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; + DwarfLineSection = ".section __DWARF,__debug_line,regular,debug"; + DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug"; + DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug"; + DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug"; + DwarfStrSection = ".section __DWARF,__debug_str,regular,debug"; + DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug"; + DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug"; + DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; + DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; + } else { + Data16bitsDirective = "\t.half\t"; + Data32bitsDirective = "\t.word\t"; + ZeroDirective = "\t.skip\t"; + WeakRefDirective = "\t.weak\t"; + StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits"; + StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits"; + } + AlignmentIsInBytes = false; Data64bitsDirective = 0; - ZeroDirective = "\t.skip\t"; CommentString = "@"; + DataSection = "\t.data"; ConstantPoolSection = "\t.text\n"; - AlignmentIsInBytes = false; - WeakRefDirective = "\t.weak\t"; - StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits"; - StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits"; } |