Move the getInlineAsmLength virtual method from TAI to TII, where
[oota-llvm.git] / lib / Target / ARM / ARMTargetAsmInfo.cpp
1 //===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // 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"
15 #include "ARMTargetMachine.h"
16 #include <cstring>
17 #include <cctype>
18 using namespace llvm;
19
20 const char *const llvm::arm_asm_table[] = {
21   "{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 };
45
46 ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM):
47   ARMTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
48   Subtarget = &TM.getSubtarget<ARMSubtarget>();
49
50   ZeroDirective = "\t.space\t";
51   ZeroFillDirective = "\t.zerofill\t";  // Uses .zerofill
52   SetDirective = "\t.set\t";
53   ProtectedDirective = NULL;
54   HasDotTypeDotSizeDirective = false;
55   SupportsDebugInformation = true;
56 }
57
58 ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM):
59   ARMTargetAsmInfo<TargetAsmInfo>(TM) {
60   Subtarget = &TM.getSubtarget<ARMSubtarget>();
61
62   NeedsSet = false;
63   HasLEB128 = true;
64   AbsoluteDebugSectionOffsets = true;
65   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";
79   DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
80
81   SupportsDebugInformation = true;
82 }
83
84 // Instantiate default implementation.
85 TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);