1 //=====-- PPCTargetAsmInfo.h - PPC asm properties -------------*- C++ -*--====//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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/Support/Compiler.h"
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();
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();
41 typedef PPCTargetAsmInfo<TargetAsmInfo> PPCGenericTargetAsmInfo;
43 EXTERN_TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);
45 struct PPCDarwinTargetAsmInfo : public PPCTargetAsmInfo<DarwinTargetAsmInfo> {
46 explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
49 struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<TargetAsmInfo> {
50 explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);