CellSPU: Fix prologue/epilogue emission when function contains calls but
[oota-llvm.git] / lib / Target / CellSPU / SPUTargetAsmInfo.cpp
1 //===-- SPUTargetAsmInfo.cpp - Cell SPU asm properties ----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
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"
17 #include "llvm/Support/Compiler.h"
18
19 using namespace llvm;
20
21 SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
22     SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
23   PCSymbol = ".";
24   CommentString = "#";
25   GlobalPrefix = "";
26   PrivateGlobalPrefix = ".L";
27   CStringSection = ".rodata";
28 }
29
30 /// PreferredEHDataFormat - This hook allows the target to select data
31 /// format used for encoding pointers in exception handling data. Reason is
32 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
33 /// if the symbol can be relocated.
34 unsigned
35 SPULinuxTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
36                                              bool Global) const {
37   // We really need to write something here.
38   return TargetAsmInfo::PreferredEHDataFormat(Reason, Global);
39 }
40
41 // Instantiate default implementation.
42 TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>);