Do not generate 32-bit call on win64 when imm does not fit
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetAsmInfo.h
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.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef PPCTARGETASMINFO_H
15 #define PPCTARGETASMINFO_H
16
17 #include "PPCTargetMachine.h"
18 #include "llvm/Target/TargetAsmInfo.h"
19 #include "llvm/Target/DarwinTargetAsmInfo.h"
20 #include "llvm/Support/Compiler.h"
21
22 namespace llvm {
23
24   template <class BaseTAI>
25   struct PPCTargetAsmInfo : public BaseTAI {
26     explicit PPCTargetAsmInfo(const PPCTargetMachine &TM) {
27       const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
28       bool isPPC64 = Subtarget->isPPC64();
29
30       BaseTAI::ZeroDirective = "\t.space\t";
31       BaseTAI::SetDirective = "\t.set";
32       BaseTAI::Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
33       BaseTAI::AlignmentIsInBytes = false;
34       BaseTAI::LCOMMDirective = "\t.lcomm\t";
35       BaseTAI::InlineAsmStart = "# InlineAsm Start";
36       BaseTAI::InlineAsmEnd = "# InlineAsm End";
37       BaseTAI::AssemblerDialect = Subtarget->getAsmFlavor();
38     }
39   };
40
41   typedef PPCTargetAsmInfo<TargetAsmInfo> PPCGenericTargetAsmInfo;
42
43   EXTERN_TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);
44
45   struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo<DarwinTargetAsmInfo> {
46     explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
47   };
48
49   struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<TargetAsmInfo> {
50     explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
51   };
52
53 } // namespace llvm
54
55 #endif