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 | // |
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 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" |
Anton Korobeynikov | 7b1b7f5 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 17 | #include "llvm/Support/Dwarf.h" |
| 18 | |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 19 | using namespace llvm; |
Anton Korobeynikov | 7b1b7f5 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 20 | using namespace llvm::dwarf; |
Jim Laskey | 8e8de8f | 2006-09-07 22:05:02 +0000 | [diff] [blame] | 21 | |
Chris Lattner | 4e0f25b | 2009-06-19 00:08:39 +0000 | [diff] [blame] | 22 | PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) : |
Anton Korobeynikov | 32b952a | 2008-09-25 21:00:33 +0000 | [diff] [blame] | 23 | PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) { |
Jim Laskey | b82313f | 2007-02-01 16:31:34 +0000 | [diff] [blame] | 24 | PCSymbol = "."; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 25 | CommentString = ";"; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 26 | UsedDirective = "\t.no_dead_strip\t"; |
Dale Johannesen | 696f768 | 2007-12-19 21:54:36 +0000 | [diff] [blame] | 27 | SupportsExceptionHandling = true; |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 28 | |
| 29 | DwarfEHFrameSection = |
Chris Lattner | 4e0f25b | 2009-06-19 00:08:39 +0000 | [diff] [blame] | 30 | ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support"; |
Dale Johannesen | 038129d | 2008-01-10 02:03:30 +0000 | [diff] [blame] | 31 | GlobalEHDirective = "\t.globl\t"; |
| 32 | SupportsWeakOmittedEHFrame = false; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 33 | } |
| 34 | |
Anton Korobeynikov | 7396e59 | 2008-08-08 18:23:49 +0000 | [diff] [blame] | 35 | PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) : |
Anton Korobeynikov | 32b952a | 2008-09-25 21:00:33 +0000 | [diff] [blame] | 36 | PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) { |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 37 | CommentString = "#"; |
| 38 | GlobalPrefix = ""; |
Rafael Espindola | 2f6fea9 | 2008-12-19 10:55:56 +0000 | [diff] [blame] | 39 | PrivateGlobalPrefix = ".L"; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 40 | UsedDirective = "\t# .no_dead_strip\t"; |
| 41 | WeakRefDirective = "\t.weak\t"; |
Nick Lewycky | e2b9052 | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 42 | |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 43 | // Debug Information |
| 44 | AbsoluteDebugSectionOffsets = true; |
| 45 | SupportsDebugInformation = true; |
Nick Lewycky | e2b9052 | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 46 | DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits"; |
| 47 | DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits"; |
| 48 | DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits"; |
| 49 | DwarfFrameSection = "\t.section\t.debug_frame,\"\",@progbits"; |
| 50 | DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits"; |
| 51 | DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits"; |
| 52 | DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits"; |
| 53 | DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits"; |
| 54 | DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits"; |
| 55 | DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits"; |
Chris Lattner | b839c3f | 2009-06-18 23:31:37 +0000 | [diff] [blame] | 56 | DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits"; |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 57 | |
Nicolas Geoffray | 616585b | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 58 | PCSymbol = "."; |
| 59 | |
| 60 | // Set up DWARF directives |
| 61 | HasLEB128 = true; // Target asm supports leb128 directives (little-endian) |
| 62 | |
| 63 | // Exceptions handling |
| 64 | if (!TM.getSubtargetImpl()->isPPC64()) |
| 65 | SupportsExceptionHandling = true; |
| 66 | AbsoluteEHSectionOffsets = false; |
| 67 | DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\",@progbits"; |
Jim Laskey | bf11182 | 2006-12-21 20:26:09 +0000 | [diff] [blame] | 68 | } |
Anton Korobeynikov | 7b1b7f5 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 69 | |
Anton Korobeynikov | 6381a13 | 2008-10-05 08:53:29 +0000 | [diff] [blame] | 70 | |
| 71 | // Instantiate default implementation. |
| 72 | TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>); |