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 | // |
| 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 Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame^] | 15 | #include "ARMTargetMachine.h" |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 16 | using namespace llvm; |
| 17 | |
| 18 | ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame^] | 19 | 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 Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 57 | Data64bitsDirective = 0; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 58 | CommentString = "@"; |
Evan Cheng | a8e2989 | 2007-01-19 07:51:42 +0000 | [diff] [blame^] | 59 | DataSection = "\t.data"; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 60 | ConstantPoolSection = "\t.text\n"; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 61 | } |