blob: 2bc0ffdb7ef610e2943141d0d68ccefee17d952c [file] [log] [blame]
Scott Michel564427e2007-12-05 01:24:05 +00001//===-- SPUTargetAsmInfo.cpp - Cell SPU asm properties ----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-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 Michel564427e2007-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 Micheld03eeaf2008-11-07 04:36:25 +000017#include "llvm/Support/Compiler.h"
18
Scott Michel564427e2007-12-05 01:24:05 +000019using namespace llvm;
20
Scott Micheld03eeaf2008-11-07 04:36:25 +000021SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
22 SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
Scott Michel053c1da2008-01-29 02:16:57 +000023 PCSymbol = ".";
Scott Michel564427e2007-12-05 01:24:05 +000024 CommentString = "#";
25 GlobalPrefix = "";
26 PrivateGlobalPrefix = ".L";
Scott Michel73655bc2008-11-08 18:59:02 +000027 // This corresponds to what the gcc SPU compiler emits, for consistency.
28 CStringSection = ".rodata.str";
Scott Michel564427e2007-12-05 01:24:05 +000029}
Scott Micheld03eeaf2008-11-07 04:36:25 +000030
31/// PreferredEHDataFormat - This hook allows the target to select data
32/// format used for encoding pointers in exception handling data. Reason is
33/// 0 for data, 1 for code labels, 2 for function pointers. Global is true
34/// if the symbol can be relocated.
35unsigned
36SPULinuxTargetAsmInfo::PreferredEHDataFormat(DwarfEncoding::Target Reason,
37 bool Global) const {
38 // We really need to write something here.
39 return TargetAsmInfo::PreferredEHDataFormat(Reason, Global);
40}
41
42// Instantiate default implementation.
43TEMPLATE_INSTANTIATION(class SPUTargetAsmInfo<TargetAsmInfo>);