blob: 9e6f8568f76aea5dc7d0475cdde572ab5d338698 [file] [log] [blame]
Jim Laskey8e8de8f2006-09-07 22:05:02 +00001//=====-- ARMTargetAsmInfo.h - ARM asm properties -------------*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey8e8de8f2006-09-07 22:05:02 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declaration of the ARMTargetAsmInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef ARMTARGETASMINFO_H
15#define ARMTARGETASMINFO_H
16
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000017#include "ARMTargetMachine.h"
Jim Laskey8e8de8f2006-09-07 22:05:02 +000018#include "llvm/Target/TargetAsmInfo.h"
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000019#include "llvm/Target/ELFTargetAsmInfo.h"
20#include "llvm/Target/DarwinTargetAsmInfo.h"
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000021#include "llvm/Support/Compiler.h"
Jim Laskey8e8de8f2006-09-07 22:05:02 +000022
23namespace llvm {
24
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000025 extern const char *const arm_asm_table[];
Jim Laskey8e8de8f2006-09-07 22:05:02 +000026
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000027 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 }
Dale Johannesen24fb52d2007-04-23 20:04:35 +000042
Dale Johannesen67cf5612007-05-02 01:02:40 +000043 const ARMSubtarget *Subtarget;
Dale Johannesen86501992007-04-29 19:17:45 +000044
45 virtual unsigned getInlineAsmLength(const char *Str) const;
Dale Johannesen67cf5612007-05-02 01:02:40 +000046 unsigned countArguments(const char *p) const;
47 unsigned countString(const char *p) const;
Jim Laskey8e8de8f2006-09-07 22:05:02 +000048 };
49
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000050 typedef ARMTargetAsmInfo<TargetAsmInfo> ARMGenericTargetAsmInfo;
51
52 EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
53
54 struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> {
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000055 explicit ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM);
56 };
57
Anton Korobeynikov32b952a2008-09-25 21:00:33 +000058 struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
Anton Korobeynikov0f3cc652008-08-07 09:54:23 +000059 explicit ARMELFTargetAsmInfo(const ARMTargetMachine &TM);
60 };
Jim Laskey8e8de8f2006-09-07 22:05:02 +000061
62} // namespace llvm
63
64#endif