Add 8-bit regclass and pattern for sext_inreg
[llvm/msp430.git] / lib / Target / PowerPC / PPCTargetAsmInfo.h
blobedf40c9346cf792d306f1860b2fd3f6ffe99b63e
1 //=====-- PPCTargetAsmInfo.h - PPC 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 declaration of the DarwinTargetAsmInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef PPCTARGETASMINFO_H
15 #define PPCTARGETASMINFO_H
17 #include "PPCTargetMachine.h"
18 #include "llvm/Target/TargetAsmInfo.h"
19 #include "llvm/Target/DarwinTargetAsmInfo.h"
20 #include "llvm/Target/ELFTargetAsmInfo.h"
21 #include "llvm/Support/Compiler.h"
23 namespace llvm {
25 template <class BaseTAI>
26 struct PPCTargetAsmInfo : public BaseTAI {
27 explicit PPCTargetAsmInfo(const PPCTargetMachine &TM):
28 BaseTAI(TM) {
29 const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
30 bool isPPC64 = Subtarget->isPPC64();
32 BaseTAI::ZeroDirective = "\t.space\t";
33 BaseTAI::SetDirective = "\t.set";
34 BaseTAI::Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
35 BaseTAI::AlignmentIsInBytes = false;
36 BaseTAI::LCOMMDirective = "\t.lcomm\t";
37 BaseTAI::InlineAsmStart = "# InlineAsm Start";
38 BaseTAI::InlineAsmEnd = "# InlineAsm End";
39 BaseTAI::AssemblerDialect = Subtarget->getAsmFlavor();
43 typedef PPCTargetAsmInfo<TargetAsmInfo> PPCGenericTargetAsmInfo;
45 EXTERN_TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);
47 struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo<DarwinTargetAsmInfo> {
48 explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
49 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
50 bool Global) const;
51 virtual const char *getEHGlobalPrefix() const;
54 struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> {
55 explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
56 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
57 bool Global) const;
60 } // namespace llvm
62 #endif