Fix encoding of single-precision VFP registers.
[oota-llvm.git] / lib / Target / ARM / ARMTargetAsmInfo.h
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.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef ARMTARGETASMINFO_H
15 #define ARMTARGETASMINFO_H
16
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"
22
23 namespace llvm {
24
25   extern const char *const arm_asm_table[];
26
27   template <class BaseTAI>
28   struct ARMTargetAsmInfo : public BaseTAI {
29     explicit ARMTargetAsmInfo(const ARMTargetMachine &TM):
30       BaseTAI(TM) {
31       BaseTAI::AsmTransCBE = arm_asm_table;
32
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";
41     }
42
43     const ARMSubtarget *Subtarget;
44
45     virtual unsigned getInlineAsmLength(const char *Str) const;
46     unsigned countArguments(const char *p) const;
47     unsigned countString(const char *p) const;
48   };
49
50   typedef ARMTargetAsmInfo<TargetAsmInfo> ARMGenericTargetAsmInfo;
51
52   EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
53
54   struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> {
55     explicit ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM);
56   };
57
58   struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
59     explicit ARMELFTargetAsmInfo(const ARMTargetMachine &TM);
60   };
61
62 } // namespace llvm
63
64 #endif