1 //=====-- ARMTargetAsmInfo.h - ARM 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 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"
25 extern const char *const arm_asm_table
[];
27 template <class BaseTAI
>
28 struct ARMTargetAsmInfo
: public BaseTAI
{
29 explicit ARMTargetAsmInfo(const ARMTargetMachine
&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
);