1 //===-- SPUTargetAsmInfo.cpp - Cell SPU asm properties ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declarations of the SPUTargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "SPUTargetAsmInfo.h"
15 #include "SPUTargetMachine.h"
16 #include "llvm/Function.h"
17 #include "llvm/Support/Compiler.h"
21 SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
22 SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
26 PrivateGlobalPrefix = ".L";
27 // This corresponds to what the gcc SPU compiler emits, for consistency.
28 CStringSection = ".rodata.str";
30 // BSS section needs to be emitted as ".section"
31 BSSSection = "\t.section\t.bss";
32 BSSSection_ = getUnnamedSection("\t.section\t.bss",
33 SectionFlags::Writeable | SectionFlags::BSS,
38 /// PreferredEHDataFormat - This hook allows the target to select data
39 /// format used for encoding pointers in exception handling data. Reason is
40 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
41 /// if the symbol can be relocated.
43 SPULinuxTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
45 // We really need to write something here.
46 return TargetAsmInfo::PreferredEHDataFormat(Reason, Global);
49 // Instantiate default implementation.
50 TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>);