1 //===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by James M. Laskey and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declarations of the ARMTargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "ARMTargetAsmInfo.h"
15 #include "ARMTargetMachine.h"
18 ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
19 const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
20 if (Subtarget->isTargetDarwin()) {
22 PrivateGlobalPrefix = "L";
23 BSSSection = 0; // no BSS section.
24 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
25 SetDirective = "\t.set";
26 WeakRefDirective = "\t.weak_reference\t";
27 HiddenDirective = "\t.private_extern\t";
28 JumpTableDataSection = ".const";
29 CStringSection = "\t.cstring";
30 HasDotTypeDotSizeDirective = false;
31 StaticCtorsSection = ".mod_init_func";
32 StaticDtorsSection = ".mod_term_func";
34 // In non-PIC modes, emit a special label before jump tables so that the
35 // linker can perform more accurate dead code stripping.
36 if (TM.getRelocationModel() != Reloc::PIC_) {
37 // Emit a local label that is preserved until the linker runs.
38 JumpTableSpecialLabelPrefix = "l";
42 DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
43 DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
44 DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
45 DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
46 DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
47 DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
48 DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
49 DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
50 DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
51 DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
52 DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
54 WeakRefDirective = "\t.weak\t";
55 StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
56 StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
59 ZeroDirective = "\t.space\t";
60 AlignmentIsInBytes = false;
61 Data64bitsDirective = 0;
63 DataSection = "\t.data";
64 ConstantPoolSection = "\t.text\n";
65 COMMDirectiveTakesAlignment = false;
66 InlineAsmStart = "@ InlineAsm Start";
67 InlineAsmEnd = "@ InlineAsm End";
68 LCOMMDirective = "\t.lcomm\t";