Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 1 | //===-- PPCTargetAsmInfo.cpp - PPC 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 DarwinTargetAsmInfo properties. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "PPCTargetAsmInfo.h" |
| 15 | #include "PPCTargetMachine.h" |
Chris Lattner | b56dcc4 | 2006-10-05 00:35:50 +0000 | [diff] [blame] | 16 | #include "llvm/Function.h" |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 17 | using namespace llvm; |
| 18 | |
| 19 | DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) { |
| 20 | bool isPPC64 = TM.getSubtargetImpl()->isPPC64(); |
| 21 | |
| 22 | CommentString = ";"; |
| 23 | GlobalPrefix = "_"; |
| 24 | PrivateGlobalPrefix = "L"; |
| 25 | ZeroDirective = "\t.space\t"; |
| 26 | SetDirective = "\t.set"; |
Jim Laskey | f45c25f | 2006-09-08 13:06:56 +0000 | [diff] [blame] | 27 | Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 28 | AlignmentIsInBytes = false; |
| 29 | ConstantPoolSection = "\t.const\t"; |
| 30 | JumpTableDataSection = ".const"; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 31 | LCOMMDirective = "\t.lcomm\t"; |
| 32 | StaticCtorsSection = ".mod_init_func"; |
| 33 | StaticDtorsSection = ".mod_term_func"; |
Chris Lattner | a53115b | 2006-09-26 03:39:53 +0000 | [diff] [blame] | 34 | UsedDirective = "\t.no_dead_strip\t"; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 35 | InlineAsmStart = "# InlineAsm Start"; |
| 36 | InlineAsmEnd = "# InlineAsm End"; |
| 37 | |
| 38 | NeedsSet = true; |
| 39 | AddressSize = isPPC64 ? 8 : 4; |
Jim Laskey | 5059dda | 2006-10-17 11:30:57 +0000 | [diff] [blame^] | 40 | DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; |
| 41 | DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; |
| 42 | DwarfLineSection = ".section __DWARF,__debug_line,regular,debug"; |
| 43 | DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug"; |
| 44 | DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug"; |
| 45 | DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug"; |
| 46 | DwarfStrSection = ".section __DWARF,__debug_str,regular,debug"; |
| 47 | DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug"; |
| 48 | DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug"; |
| 49 | DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; |
| 50 | DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 51 | } |
Chris Lattner | b56dcc4 | 2006-10-05 00:35:50 +0000 | [diff] [blame] | 52 | |