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 ZeroDirective = "\t.space\t";
23 PrivateGlobalPrefix = "L";
24 BSSSection = 0; // no BSS section.
25 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
26 SetDirective = "\t.set";
27 WeakRefDirective = "\t.weak_reference\t";
28 HiddenDirective = "\t.private_extern\t";
29 JumpTableDataSection = ".const";
30 CStringSection = "\t.cstring";
31 LCOMMDirective = "\t.lcomm\t";
32 COMMDirectiveTakesAlignment = false;
33 HasDotTypeDotSizeDirective = false;
34 StaticCtorsSection = ".mod_init_func";
35 StaticDtorsSection = ".mod_term_func";
36 InlineAsmStart = "@ InlineAsm Start";
37 InlineAsmEnd = "@ InlineAsm End";
39 // In non-PIC modes, emit a special label before jump tables so that the
40 // linker can perform more accurate dead code stripping.
41 if (TM.getRelocationModel() != Reloc::PIC_) {
42 // Emit a local label that is preserved until the linker runs.
43 JumpTableSpecialLabelPrefix = "l";
47 DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
48 DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
49 DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
50 DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
51 DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
52 DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
53 DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
54 DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
55 DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
56 DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
57 DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
59 Data16bitsDirective = "\t.half\t";
60 Data32bitsDirective = "\t.word\t";
61 ZeroDirective = "\t.skip\t";
62 WeakRefDirective = "\t.weak\t";
63 StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
64 StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
66 AlignmentIsInBytes = false;
67 Data64bitsDirective = 0;
69 DataSection = "\t.data";
70 ConstantPoolSection = "\t.text\n";