Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 1 | //===-- SPUTargetAsmInfo.cpp - Cell SPU 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. |
Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the declarations of the SPUTargetAsmInfo properties. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "SPUTargetAsmInfo.h" |
| 15 | #include "SPUTargetMachine.h" |
| 16 | #include "llvm/Function.h" |
Scott Michel | d03eeaf | 2008-11-07 04:36:25 +0000 | [diff] [blame] | 17 | #include "llvm/Support/Compiler.h" |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 18 | #include "llvm/Support/Dwarf.h" |
Scott Michel | d03eeaf | 2008-11-07 04:36:25 +0000 | [diff] [blame] | 19 | |
Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 20 | using namespace llvm; |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 21 | using namespace llvm::dwarf; |
Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 22 | |
Scott Michel | d03eeaf | 2008-11-07 04:36:25 +0000 | [diff] [blame] | 23 | SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) : |
Chris Lattner | 8d4a0a3 | 2009-08-02 04:27:24 +0000 | [diff] [blame] | 24 | SPUTargetAsmInfo<TargetAsmInfo>(TM) { |
Scott Michel | 053c1da | 2008-01-29 02:16:57 +0000 | [diff] [blame] | 25 | PCSymbol = "."; |
Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 26 | CommentString = "#"; |
| 27 | GlobalPrefix = ""; |
| 28 | PrivateGlobalPrefix = ".L"; |
Scott Michel | f0569be | 2008-12-27 04:51:36 +0000 | [diff] [blame] | 29 | |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 30 | // Has leb128, .loc and .file |
| 31 | HasLEB128 = true; |
| 32 | HasDotLocAndDotFile = true; |
| 33 | |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 34 | SupportsDebugInformation = true; |
| 35 | NeedsSet = true; |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 36 | DwarfAbbrevSection = "\t.section .debug_abbrev,\"\",@progbits"; |
| 37 | DwarfInfoSection = "\t.section .debug_info,\"\",@progbits"; |
| 38 | DwarfLineSection = "\t.section .debug_line,\"\",@progbits"; |
| 39 | DwarfFrameSection = "\t.section .debug_frame,\"\",@progbits"; |
| 40 | DwarfPubNamesSection = "\t.section .debug_pubnames,\"\",@progbits"; |
| 41 | DwarfPubTypesSection = "\t.section .debug_pubtypes,\"\",progbits"; |
| 42 | DwarfStrSection = "\t.section .debug_str,\"MS\",@progbits,1"; |
| 43 | DwarfLocSection = "\t.section .debug_loc,\"\",@progbits"; |
| 44 | DwarfARangesSection = "\t.section .debug_aranges,\"\",@progbits"; |
| 45 | DwarfRangesSection = "\t.section .debug_ranges,\"\",@progbits"; |
Chris Lattner | b839c3f | 2009-06-18 23:31:37 +0000 | [diff] [blame] | 46 | DwarfMacroInfoSection = 0; // macro info not supported. |
Scott Michel | 9de57a9 | 2009-01-26 22:33:37 +0000 | [diff] [blame] | 47 | |
| 48 | // Exception handling is not supported on CellSPU (think about it: you only |
| 49 | // have 256K for code+data. Would you support exception handling?) |
| 50 | SupportsExceptionHandling = false; |
Scott Michel | 564427e | 2007-12-05 01:24:05 +0000 | [diff] [blame] | 51 | } |
Scott Michel | d03eeaf | 2008-11-07 04:36:25 +0000 | [diff] [blame] | 52 | |
Scott Michel | d03eeaf | 2008-11-07 04:36:25 +0000 | [diff] [blame] | 53 | |
| 54 | // Instantiate default implementation. |
| 55 | TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>); |