blob: a8660d724d9b022daf3734c2580c6f954e669db8 [file] [log] [blame]
Scott Michel5c93da42007-12-05 01:24:05 +00001//===-- SPUTargetAsmInfo.cpp - Cell SPU asm properties ----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Scott Michel5c93da42007-12-05 01:24:05 +00007//
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 Michel1e5a4ba2008-11-07 04:36:25 +000017#include "llvm/Support/Compiler.h"
Scott Michelc899a122009-01-26 22:33:37 +000018#include "llvm/Support/Dwarf.h"
Scott Michel1e5a4ba2008-11-07 04:36:25 +000019
Scott Michel5c93da42007-12-05 01:24:05 +000020using namespace llvm;
Scott Michelc899a122009-01-26 22:33:37 +000021using namespace llvm::dwarf;
Scott Michel5c93da42007-12-05 01:24:05 +000022
Scott Michel1e5a4ba2008-11-07 04:36:25 +000023SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
24 SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
Scott Michelf9f42e62008-01-29 02:16:57 +000025 PCSymbol = ".";
Scott Michel5c93da42007-12-05 01:24:05 +000026 CommentString = "#";
27 GlobalPrefix = "";
28 PrivateGlobalPrefix = ".L";
pingbakddfd8692008-11-08 18:59:02 +000029 // This corresponds to what the gcc SPU compiler emits, for consistency.
30 CStringSection = ".rodata.str";
Scott Michel06eabde2008-12-27 04:51:36 +000031
Scott Michelc899a122009-01-26 22:33:37 +000032 // Has leb128, .loc and .file
33 HasLEB128 = true;
34 HasDotLocAndDotFile = true;
35
Scott Michelc899a122009-01-26 22:33:37 +000036 SupportsDebugInformation = true;
37 NeedsSet = true;
Scott Michelc899a122009-01-26 22:33:37 +000038 DwarfAbbrevSection = "\t.section .debug_abbrev,\"\",@progbits";
39 DwarfInfoSection = "\t.section .debug_info,\"\",@progbits";
40 DwarfLineSection = "\t.section .debug_line,\"\",@progbits";
41 DwarfFrameSection = "\t.section .debug_frame,\"\",@progbits";
42 DwarfPubNamesSection = "\t.section .debug_pubnames,\"\",@progbits";
43 DwarfPubTypesSection = "\t.section .debug_pubtypes,\"\",progbits";
44 DwarfStrSection = "\t.section .debug_str,\"MS\",@progbits,1";
45 DwarfLocSection = "\t.section .debug_loc,\"\",@progbits";
46 DwarfARangesSection = "\t.section .debug_aranges,\"\",@progbits";
47 DwarfRangesSection = "\t.section .debug_ranges,\"\",@progbits";
Chris Lattnerecbf73b2009-06-18 23:31:37 +000048 DwarfMacroInfoSection = 0; // macro info not supported.
Scott Michelc899a122009-01-26 22:33:37 +000049
50 // Exception handling is not supported on CellSPU (think about it: you only
51 // have 256K for code+data. Would you support exception handling?)
52 SupportsExceptionHandling = false;
Scott Michel5c93da42007-12-05 01:24:05 +000053}
Scott Michel1e5a4ba2008-11-07 04:36:25 +000054
Scott Michel1e5a4ba2008-11-07 04:36:25 +000055
56// Instantiate default implementation.
57TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>);