| Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 1 | //===-- ARMTargetAsmInfo.cpp - ARM asm properties ---------------*- C++ -*-===// | 
|  | 2 | // | 
|  | 3 | //                     The LLVM Compiler Infrastructure | 
|  | 4 | // | 
| Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source | 
|  | 6 | // License. See LICENSE.TXT for details. | 
| Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 7 | // | 
|  | 8 | //===----------------------------------------------------------------------===// | 
|  | 9 | // | 
|  | 10 | // This file contains the declarations of the ARMTargetAsmInfo properties. | 
|  | 11 | // | 
|  | 12 | //===----------------------------------------------------------------------===// | 
|  | 13 |  | 
|  | 14 | #include "ARMTargetAsmInfo.h" | 
| Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame] | 15 | #include "ARMTargetMachine.h" | 
| Dale Johannesen | 24fb52d | 2007-04-23 20:04:35 +0000 | [diff] [blame] | 16 | #include <cstring> | 
|  | 17 | #include <cctype> | 
| Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 18 | using namespace llvm; | 
|  | 19 |  | 
| Anton Korobeynikov | 32b952a | 2008-09-25 21:00:33 +0000 | [diff] [blame] | 20 | const char *const llvm::arm_asm_table[] = { | 
| Chris Lattner | a93ca92 | 2009-06-18 23:41:35 +0000 | [diff] [blame] | 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 | }; | 
| Lauro Ramos Venancio | 61718a6 | 2007-06-08 21:06:23 +0000 | [diff] [blame] | 45 |  | 
| Anton Korobeynikov | d49ea77 | 2009-06-26 21:28:53 +0000 | [diff] [blame] | 46 | ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM): | 
| Anton Korobeynikov | 32b952a | 2008-09-25 21:00:33 +0000 | [diff] [blame] | 47 | ARMTargetAsmInfo<DarwinTargetAsmInfo>(TM) { | 
| Dan Gohman | 8f09225 | 2008-11-03 18:22:42 +0000 | [diff] [blame] | 48 | Subtarget = &TM.getSubtarget<ARMSubtarget>(); | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 49 |  | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 50 | ZeroDirective = "\t.space\t"; | 
|  | 51 | ZeroFillDirective = "\t.zerofill\t";  // Uses .zerofill | 
|  | 52 | SetDirective = "\t.set\t"; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 53 | ProtectedDirective = NULL; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 54 | HasDotTypeDotSizeDirective = false; | 
| Devang Patel | 14a55d9 | 2009-06-19 21:54:26 +0000 | [diff] [blame] | 55 | SupportsDebugInformation = true; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 56 | } | 
|  | 57 |  | 
| Anton Korobeynikov | d49ea77 | 2009-06-26 21:28:53 +0000 | [diff] [blame] | 58 | ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM): | 
| Chris Lattner | 8d4a0a3 | 2009-08-02 04:27:24 +0000 | [diff] [blame] | 59 | ARMTargetAsmInfo<TargetAsmInfo>(TM) { | 
| Dan Gohman | 8f09225 | 2008-11-03 18:22:42 +0000 | [diff] [blame] | 60 | Subtarget = &TM.getSubtarget<ARMSubtarget>(); | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 61 |  | 
|  | 62 | NeedsSet = false; | 
|  | 63 | HasLEB128 = true; | 
|  | 64 | AbsoluteDebugSectionOffsets = true; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 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"; | 
| Chris Lattner | b839c3f | 2009-06-18 23:31:37 +0000 | [diff] [blame] | 79 | DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits"; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 80 |  | 
| Devang Patel | 14a55d9 | 2009-06-19 21:54:26 +0000 | [diff] [blame] | 81 | SupportsDebugInformation = true; | 
| Anton Korobeynikov | 0f3cc65 | 2008-08-07 09:54:23 +0000 | [diff] [blame] | 82 | } | 
|  | 83 |  | 
| Anton Korobeynikov | 6381a13 | 2008-10-05 08:53:29 +0000 | [diff] [blame] | 84 | // Instantiate default implementation. | 
|  | 85 | TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>); |