blob: f896eb724cabb4cf1b62a2ed05b9271e223739b2 [file] [log] [blame]
Jim Laskey0e835412006-09-07 22:05:02 +00001//===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declarations of the ARMTargetAsmInfo properties.
11//
12//===----------------------------------------------------------------------===//
13
14#include "ARMTargetAsmInfo.h"
Evan Cheng10043e22007-01-19 07:51:42 +000015#include "ARMTargetMachine.h"
Jim Laskey0e835412006-09-07 22:05:02 +000016using namespace llvm;
17
18ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
Evan Cheng10043e22007-01-19 07:51:42 +000019 const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
Evan Cheng023c7d62007-01-19 19:23:47 +000020 if (Subtarget->isTargetDarwin()) {
Evan Cheng10043e22007-01-19 07:51:42 +000021 GlobalPrefix = "_";
Evan Cheng023c7d62007-01-19 19:23:47 +000022 PrivateGlobalPrefix = "L";
23 BSSSection = 0; // no BSS section.
24 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
Evan Cheng10043e22007-01-19 07:51:42 +000025 SetDirective = "\t.set";
26 WeakRefDirective = "\t.weak_reference\t";
Evan Cheng2cfbcce2007-01-23 19:06:03 +000027 HiddenDirective = "\t.private_extern\t";
Evan Cheng10043e22007-01-19 07:51:42 +000028 JumpTableDataSection = ".const";
29 CStringSection = "\t.cstring";
Evan Cheng023c7d62007-01-19 19:23:47 +000030 HasDotTypeDotSizeDirective = false;
Evan Cheng10043e22007-01-19 07:51:42 +000031 StaticCtorsSection = ".mod_init_func";
32 StaticDtorsSection = ".mod_term_func";
Evan Cheng10043e22007-01-19 07:51:42 +000033
Evan Chengdf622502007-01-19 18:59:56 +000034 // 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";
39 }
40
Evan Cheng10043e22007-01-19 07:51:42 +000041 NeedsSet = true;
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";
53 } else {
Evan Cheng10043e22007-01-19 07:51:42 +000054 WeakRefDirective = "\t.weak\t";
55 StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
56 StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
57 }
Lauro Ramos Venancio7d477192007-01-26 23:24:43 +000058
59 ZeroDirective = "\t.space\t";
60 AlignmentIsInBytes = false;
Jim Laskey0e835412006-09-07 22:05:02 +000061 Data64bitsDirective = 0;
Jim Laskey0e835412006-09-07 22:05:02 +000062 CommentString = "@";
Evan Cheng10043e22007-01-19 07:51:42 +000063 DataSection = "\t.data";
Jim Laskey0e835412006-09-07 22:05:02 +000064 ConstantPoolSection = "\t.text\n";
Lauro Ramos Venancio7d477192007-01-26 23:24:43 +000065 COMMDirectiveTakesAlignment = false;
66 InlineAsmStart = "@ InlineAsm Start";
67 InlineAsmEnd = "@ InlineAsm End";
68 LCOMMDirective = "\t.lcomm\t";
Jim Laskey0e835412006-09-07 22:05:02 +000069}