LLVM API Documentation
00001 //=====-- ARMTargetAsmInfo.h - ARM asm properties -------------*- C++ -*--====// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the declaration of the ARMTargetAsmInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef ARMTARGETASMINFO_H 00015 #define ARMTARGETASMINFO_H 00016 00017 #include "ARMTargetMachine.h" 00018 #include "llvm/Target/TargetAsmInfo.h" 00019 #include "llvm/Target/ELFTargetAsmInfo.h" 00020 #include "llvm/Target/DarwinTargetAsmInfo.h" 00021 #include "llvm/Support/Compiler.h" 00022 00023 namespace llvm { 00024 00025 extern const char *const arm_asm_table[]; 00026 00027 template <class BaseTAI> 00028 struct ARMTargetAsmInfo : public BaseTAI { 00029 explicit ARMTargetAsmInfo(const ARMTargetMachine &TM): 00030 BaseTAI(TM) { 00031 BaseTAI::AsmTransCBE = arm_asm_table; 00032 00033 BaseTAI::AlignmentIsInBytes = false; 00034 BaseTAI::Data64bitsDirective = 0; 00035 BaseTAI::CommentString = "@"; 00036 BaseTAI::ConstantPoolSection = "\t.text\n"; 00037 BaseTAI::COMMDirectiveTakesAlignment = false; 00038 BaseTAI::InlineAsmStart = "@ InlineAsm Start"; 00039 BaseTAI::InlineAsmEnd = "@ InlineAsm End"; 00040 BaseTAI::LCOMMDirective = "\t.lcomm\t"; 00041 } 00042 00043 const ARMSubtarget *Subtarget; 00044 00045 virtual unsigned getInlineAsmLength(const char *Str) const; 00046 unsigned countArguments(const char *p) const; 00047 unsigned countString(const char *p) const; 00048 }; 00049 00050 typedef ARMTargetAsmInfo<TargetAsmInfo> ARMGenericTargetAsmInfo; 00051 00052 EXTERN_TEMPLATE_INSTANTIATION(class ARMTargetAsmInfo<TargetAsmInfo>); 00053 00054 struct ARMDarwinTargetAsmInfo : public ARMTargetAsmInfo<DarwinTargetAsmInfo> { 00055 explicit ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM); 00056 }; 00057 00058 struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> { 00059 explicit ARMELFTargetAsmInfo(const ARMTargetMachine &TM); 00060 }; 00061 00062 } // namespace llvm 00063 00064 #endif