Merge branch 'master' into msp430
[llvm/msp430.git] / lib / Target / ARM / ARMTargetAsmInfo.h
blob9e6f8568f76aea5dc7d0475cdde572ab5d338698
1 //=====-- ARMTargetAsmInfo.h - ARM 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 ARMTargetAsmInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef ARMTARGETASMINFO_H
15 #define ARMTARGETASMINFO_H
17 #include "ARMTargetMachine.h"
18 #include "llvm/Target/TargetAsmInfo.h"
19 #include "llvm/Target/ELFTargetAsmInfo.h"
20 #include "llvm/Target/DarwinTargetAsmInfo.h"
21 #include "llvm/Support/Compiler.h"
23 namespace llvm {
25 extern const char *const arm_asm_table[];
27 template <class BaseTAI>
28 struct ARMTargetAsmInfo : public BaseTAI {
29 explicit ARMTargetAsmInfo(const ARMTargetMachine &TM):
30 BaseTAI(TM) {
31 BaseTAI::AsmTransCBE = arm_asm_table;
33 BaseTAI::AlignmentIsInBytes = false;
34 BaseTAI::Data64bitsDirective = 0;
35 BaseTAI::CommentString = "@";
36 BaseTAI::ConstantPoolSection = "\t.text\n";
37 BaseTAI::COMMDirectiveTakesAlignment = false;
38 BaseTAI::InlineAsmStart = "@ InlineAsm Start";
39 BaseTAI::InlineAsmEnd = "@ InlineAsm End";
40 BaseTAI::LCOMMDirective = "\t.lcomm\t";
43 const ARMSubtarget *Subtarget;
45 virtual unsigned getInlineAsmLength(const char *Str) const;
46 unsigned countArguments(const char *p) const;
47 unsigned countString(const char *p) const;
50 typedef ARMTargetAsmInfo<TargetAsmInfo> ARMGenericTargetAsmInfo;
52 EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
54 struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> {
55 explicit ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM);
58 struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
59 explicit ARMELFTargetAsmInfo(const ARMTargetMachine &TM);
62 } // namespace llvm
64 #endif