blob: d10a56540592fe8d50272c6b3df2762dd3e7e207 [file] [log] [blame]
Chris Lattner4ee451d2007-12-29 20:36:04 +00001//===-- SPUTargetAsmInfo.h - Cell SPU asm properties -----------*- C++ -*--===//
Scott Michel564427e2007-12-05 01:24:05 +00002//
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 declaration of the SPUTargetAsmInfo class.
11//
12//===----------------------------------------------------------------------===//
13
Scott Micheld03eeaf2008-11-07 04:36:25 +000014#ifndef SPUTARGETASMINFO_H
15#define SPUTARGETASMINFO_H
Scott Michel564427e2007-12-05 01:24:05 +000016
17#include "llvm/Target/TargetAsmInfo.h"
Scott Micheld03eeaf2008-11-07 04:36:25 +000018#include "llvm/Target/ELFTargetAsmInfo.h"
19#include "SPUTargetMachine.h"
20#include "SPUSubtarget.h"
Scott Michel564427e2007-12-05 01:24:05 +000021
22namespace llvm {
23
24 // Forward declaration.
25 class SPUTargetMachine;
Scott Micheld03eeaf2008-11-07 04:36:25 +000026
27 template <class BaseTAI>
28 struct SPUTargetAsmInfo : public BaseTAI {
29 explicit SPUTargetAsmInfo(const SPUTargetMachine &TM):
30 BaseTAI(TM) {
31 /* (unused today)
32 * const SPUSubtarget *Subtarget = &TM.getSubtarget<SPUSubtarget>(); */
Scott Michel564427e2007-12-05 01:24:05 +000033
Scott Micheld03eeaf2008-11-07 04:36:25 +000034 BaseTAI::ZeroDirective = "\t.space\t";
35 BaseTAI::SetDirective = "\t.set";
36 BaseTAI::Data64bitsDirective = "\t.quad\t";
37 BaseTAI::AlignmentIsInBytes = false;
38 BaseTAI::LCOMMDirective = "\t.lcomm\t";
39 BaseTAI::InlineAsmStart = "# InlineAsm Start";
40 BaseTAI::InlineAsmEnd = "# InlineAsm End";
41 }
Scott Michel564427e2007-12-05 01:24:05 +000042 };
Scott Micheld03eeaf2008-11-07 04:36:25 +000043
44 struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<ELFTargetAsmInfo> {
45 explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
46 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
47 bool Global) const;
48 };
Scott Michel564427e2007-12-05 01:24:05 +000049} // namespace llvm
50
Scott Micheld03eeaf2008-11-07 04:36:25 +000051#endif /* SPUTARGETASMINFO_H */