LLVM API Documentation

SPUTargetAsmInfo.h

Go to the documentation of this file.
00001 //===-- SPUTargetAsmInfo.h - Cell SPU asm properties -----------*- C++ -*--===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains the declaration of the SPUTargetAsmInfo class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef SPUTARGETASMINFO_H
00015 #define SPUTARGETASMINFO_H
00016 
00017 #include "llvm/Target/TargetAsmInfo.h"
00018 #include "llvm/Target/ELFTargetAsmInfo.h"
00019 #include "SPUTargetMachine.h"
00020 #include "SPUSubtarget.h"
00021 
00022 namespace llvm {
00023 
00024   // Forward declaration.
00025   class SPUTargetMachine;
00026   
00027   template <class BaseTAI>
00028   struct SPUTargetAsmInfo : public BaseTAI {
00029     explicit SPUTargetAsmInfo(const SPUTargetMachine &TM):
00030       BaseTAI(TM) {
00031       /* (unused today)
00032        * const SPUSubtarget *Subtarget = &TM.getSubtarget<SPUSubtarget>(); */
00033 
00034       BaseTAI::ZeroDirective = "\t.space\t";
00035       BaseTAI::SetDirective = "\t.set";
00036       BaseTAI::Data64bitsDirective = "\t.quad\t";
00037       BaseTAI::AlignmentIsInBytes = false;
00038       BaseTAI::LCOMMDirective = "\t.lcomm\t";
00039       BaseTAI::InlineAsmStart = "# InlineAsm Start";
00040       BaseTAI::InlineAsmEnd = "# InlineAsm End";
00041     }
00042   };
00043   
00044   struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<ELFTargetAsmInfo> {
00045     explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
00046     virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
00047                                            bool Global) const;
00048   };
00049 } // namespace llvm
00050 
00051 #endif /* SPUTARGETASMINFO_H */