blob: 65848e53765e43283dfee75c4c5b070225cf2cbe [file] [log] [blame]
Jim Laskey8e8de8f2006-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 Chenga8e29892007-01-19 07:51:42 +000015#include "ARMTargetMachine.h"
Jim Laskey8e8de8f2006-09-07 22:05:02 +000016using namespace llvm;
17
18ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) {
Evan Chenga8e29892007-01-19 07:51:42 +000019 const ARMSubtarget *Subtarget = &TM.getSubtarget<ARMSubtarget>();
20 if (Subtarget->isDarwin()) {
21 HasDotTypeDotSizeDirective = false;
22 PrivateGlobalPrefix = "L";
23 GlobalPrefix = "_";
24 ZeroDirective = "\t.space\t";
25 SetDirective = "\t.set";
26 WeakRefDirective = "\t.weak_reference\t";
27 JumpTableDataSection = ".const";
28 CStringSection = "\t.cstring";
29 StaticCtorsSection = ".mod_init_func";
30 StaticDtorsSection = ".mod_term_func";
31 InlineAsmStart = "@ InlineAsm Start";
32 InlineAsmEnd = "@ InlineAsm End";
33 LCOMMDirective = "\t.lcomm\t";
34 COMMDirectiveTakesAlignment = false;
35
36 NeedsSet = true;
37 DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
38 DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
39 DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
40 DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
41 DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
42 DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
43 DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
44 DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
45 DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
46 DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
47 DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
48 } else {
49 Data16bitsDirective = "\t.half\t";
50 Data32bitsDirective = "\t.word\t";
51 ZeroDirective = "\t.skip\t";
52 WeakRefDirective = "\t.weak\t";
53 StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits";
54 StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits";
55 }
56 AlignmentIsInBytes = false;
Jim Laskey8e8de8f2006-09-07 22:05:02 +000057 Data64bitsDirective = 0;
Jim Laskey8e8de8f2006-09-07 22:05:02 +000058 CommentString = "@";
Evan Chenga8e29892007-01-19 07:51:42 +000059 DataSection = "\t.data";
Jim Laskey8e8de8f2006-09-07 22:05:02 +000060 ConstantPoolSection = "\t.text\n";
Jim Laskey8e8de8f2006-09-07 22:05:02 +000061}