Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 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. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +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" |
| 16 | #include "llvm/Function.h" |
Anton Korobeynikov | 0aeac60 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 17 | #include "llvm/Support/Dwarf.h" |
| 18 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 19 | using namespace llvm; |
Anton Korobeynikov | 0aeac60 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 20 | using namespace llvm::dwarf; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 21 | |
Chris Lattner | ca07217 | 2009-06-19 00:08:39 +0000 | [diff] [blame] | 22 | PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) : |
Anton Korobeynikov | 3829e8a | 2008-09-25 21:00:33 +0000 | [diff] [blame] | 23 | PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 24 | PCSymbol = "."; |
| 25 | CommentString = ";"; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 26 | UsedDirective = "\t.no_dead_strip\t"; |
Dale Johannesen | 15e8f53 | 2007-12-19 21:54:36 +0000 | [diff] [blame] | 27 | SupportsExceptionHandling = true; |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 28 | |
Dale Johannesen | f09b599 | 2008-01-10 02:03:30 +0000 | [diff] [blame] | 29 | GlobalEHDirective = "\t.globl\t"; |
| 30 | SupportsWeakOmittedEHFrame = false; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Anton Korobeynikov | 894be4b | 2008-08-08 18:23:49 +0000 | [diff] [blame] | 33 | PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) : |
Chris Lattner | 7dd4ffc | 2009-08-02 04:27:24 +0000 | [diff] [blame] | 34 | PPCTargetAsmInfo<TargetAsmInfo>(TM) { |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 35 | CommentString = "#"; |
| 36 | GlobalPrefix = ""; |
Rafael Espindola | 1a93184 | 2008-12-19 10:55:56 +0000 | [diff] [blame] | 37 | PrivateGlobalPrefix = ".L"; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 38 | UsedDirective = "\t# .no_dead_strip\t"; |
| 39 | WeakRefDirective = "\t.weak\t"; |
Nick Lewycky | 3246a9c | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 40 | |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 41 | // Debug Information |
| 42 | AbsoluteDebugSectionOffsets = true; |
| 43 | SupportsDebugInformation = true; |
Nick Lewycky | 3246a9c | 2007-07-25 03:48:45 +0000 | [diff] [blame] | 44 | DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits"; |
| 45 | DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits"; |
| 46 | DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits"; |
| 47 | DwarfFrameSection = "\t.section\t.debug_frame,\"\",@progbits"; |
| 48 | DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits"; |
| 49 | DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits"; |
| 50 | DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits"; |
| 51 | DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits"; |
| 52 | DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits"; |
| 53 | DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits"; |
Chris Lattner | ecbf73b | 2009-06-18 23:31:37 +0000 | [diff] [blame] | 54 | DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits"; |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 55 | |
Nicolas Geoffray | 6186476 | 2007-12-21 12:19:44 +0000 | [diff] [blame] | 56 | PCSymbol = "."; |
| 57 | |
| 58 | // Set up DWARF directives |
| 59 | HasLEB128 = true; // Target asm supports leb128 directives (little-endian) |
| 60 | |
| 61 | // Exceptions handling |
| 62 | if (!TM.getSubtargetImpl()->isPPC64()) |
| 63 | SupportsExceptionHandling = true; |
| 64 | AbsoluteEHSectionOffsets = false; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 65 | } |
Anton Korobeynikov | 0aeac60 | 2008-02-27 23:49:15 +0000 | [diff] [blame] | 66 | |
Anton Korobeynikov | 45d1b62 | 2008-10-05 08:53:29 +0000 | [diff] [blame] | 67 | |
| 68 | // Instantiate default implementation. |
| 69 | TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>); |