blob: 8dbf544961eecee6cc3395c8f0a3ee939ec82a1b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//=====-- ARMTargetAsmInfo.h - ARM asm properties -------------*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +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 Korobeynikov3829e8a2008-09-25 21:00:33 +000017#include "ARMTargetMachine.h"
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018#include "llvm/Target/TargetAsmInfo.h"
Anton Korobeynikov3cc6efa2008-08-07 09:54:23 +000019#include "llvm/Target/ELFTargetAsmInfo.h"
20#include "llvm/Target/DarwinTargetAsmInfo.h"
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000021#include "llvm/Support/Compiler.h"
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022
23namespace llvm {
24
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000025 extern const char *const arm_asm_table[];
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000027 template <class BaseTAI>
28 struct ARMTargetAsmInfo : public BaseTAI {
Anton Korobeynikov65d16ea2009-06-26 21:28:53 +000029 explicit ARMTargetAsmInfo(const ARMBaseTargetMachine &TM) : BaseTAI(TM) {
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000030 BaseTAI::AsmTransCBE = arm_asm_table;
31
32 BaseTAI::AlignmentIsInBytes = false;
33 BaseTAI::Data64bitsDirective = 0;
34 BaseTAI::CommentString = "@";
35 BaseTAI::ConstantPoolSection = "\t.text\n";
36 BaseTAI::COMMDirectiveTakesAlignment = false;
37 BaseTAI::InlineAsmStart = "@ InlineAsm Start";
38 BaseTAI::InlineAsmEnd = "@ InlineAsm End";
39 BaseTAI::LCOMMDirective = "\t.lcomm\t";
40 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +000041
42 const ARMSubtarget *Subtarget;
43
44 virtual unsigned getInlineAsmLength(const char *Str) const;
45 unsigned countArguments(const char *p) const;
46 unsigned countString(const char *p) const;
47 };
48
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000049 EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>);
50
51 struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> {
Anton Korobeynikov65d16ea2009-06-26 21:28:53 +000052 explicit ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM);
Anton Korobeynikov3cc6efa2008-08-07 09:54:23 +000053 };
54
Anton Korobeynikov3829e8a2008-09-25 21:00:33 +000055 struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
Anton Korobeynikov65d16ea2009-06-26 21:28:53 +000056 explicit ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM);
Anton Korobeynikov3cc6efa2008-08-07 09:54:23 +000057 };
Dan Gohmanf17a25c2007-07-18 16:29:46 +000058
59} // namespace llvm
60
61#endif