blob: b1ae524bba3585bfc4b8f424f649f6a6bcd38623 [file] [log] [blame]
Jim Laskey8e8de8f2006-09-07 22:05:02 +00001//===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey8e8de8f2006-09-07 22:05:02 +00007//
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"
Dale Johannesen24fb52d2007-04-23 20:04:35 +000016#include <cstring>
17#include <cctype>
Jim Laskey8e8de8f2006-09-07 22:05:02 +000018using namespace llvm;
19
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000020const char *const llvm::arm_asm_table[] = {
Chris Lattnera93ca922009-06-18 23:41:35 +000021 "{r0}", "r0",
22 "{r1}", "r1",
23 "{r2}", "r2",
24 "{r3}", "r3",
25 "{r4}", "r4",
26 "{r5}", "r5",
27 "{r6}", "r6",
28 "{r7}", "r7",
29 "{r8}", "r8",
30 "{r9}", "r9",
31 "{r10}", "r10",
32 "{r11}", "r11",
33 "{r12}", "r12",
34 "{r13}", "r13",
35 "{r14}", "r14",
36 "{lr}", "lr",
37 "{sp}", "sp",
38 "{ip}", "ip",
39 "{fp}", "fp",
40 "{sl}", "sl",
41 "{memory}", "memory",
42 "{cc}", "cc",
43 0,0
44};
Lauro Ramos Venancio61718a62007-06-08 21:06:23 +000045
Anton Korobeynikovd49ea772009-06-26 21:28:53 +000046ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM):
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000047 ARMTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
Dan Gohman8f092252008-11-03 18:22:42 +000048 Subtarget = &TM.getSubtarget<ARMSubtarget>();
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000049
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000050 ZeroDirective = "\t.space\t";
51 ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
52 SetDirective = "\t.set\t";
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000053 ProtectedDirective = NULL;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000054 HasDotTypeDotSizeDirective = false;
Devang Patel14a55d92009-06-19 21:54:26 +000055 SupportsDebugInformation = true;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000056}
57
Anton Korobeynikovd49ea772009-06-26 21:28:53 +000058ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM):
Chris Lattner8d4a0a32009-08-02 04:27:24 +000059 ARMTargetAsmInfo<TargetAsmInfo>(TM) {
Dan Gohman8f092252008-11-03 18:22:42 +000060 Subtarget = &TM.getSubtarget<ARMSubtarget>();
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000061
62 NeedsSet = false;
63 HasLEB128 = true;
64 AbsoluteDebugSectionOffsets = true;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000065 PrivateGlobalPrefix = ".L";
66 WeakRefDirective = "\t.weak\t";
67 SetDirective = "\t.set\t";
68 DwarfRequiresFrameSection = false;
69 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",%progbits";
70 DwarfInfoSection = "\t.section\t.debug_info,\"\",%progbits";
71 DwarfLineSection = "\t.section\t.debug_line,\"\",%progbits";
72 DwarfFrameSection = "\t.section\t.debug_frame,\"\",%progbits";
73 DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",%progbits";
74 DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",%progbits";
75 DwarfStrSection = "\t.section\t.debug_str,\"\",%progbits";
76 DwarfLocSection = "\t.section\t.debug_loc,\"\",%progbits";
77 DwarfARangesSection = "\t.section\t.debug_aranges,\"\",%progbits";
78 DwarfRangesSection = "\t.section\t.debug_ranges,\"\",%progbits";
Chris Lattnerb839c3f2009-06-18 23:31:37 +000079 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000080
Devang Patel14a55d92009-06-19 21:54:26 +000081 SupportsDebugInformation = true;
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000082}
83
Anton Korobeynikov6381a132008-10-05 08:53:29 +000084// Instantiate default implementation.
85TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);