LLVM API Documentation
00001 //===-- ARMMCTargetDesc.h - ARM Target Descriptions -------------*- 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 provides ARM specific target descriptions. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCTARGETDESC_H 00015 #define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMMCTARGETDESC_H 00016 00017 #include "llvm/Support/DataTypes.h" 00018 #include <string> 00019 00020 namespace llvm { 00021 class formatted_raw_ostream; 00022 class MCAsmBackend; 00023 class MCCodeEmitter; 00024 class MCContext; 00025 class MCInstrInfo; 00026 class MCInstPrinter; 00027 class MCObjectWriter; 00028 class MCRegisterInfo; 00029 class MCSubtargetInfo; 00030 class MCStreamer; 00031 class MCRelocationInfo; 00032 class StringRef; 00033 class Target; 00034 class raw_ostream; 00035 00036 extern Target TheARMLETarget, TheThumbLETarget; 00037 extern Target TheARMBETarget, TheThumbBETarget; 00038 00039 namespace ARM_MC { 00040 std::string ParseARMTriple(StringRef TT, StringRef CPU); 00041 00042 /// createARMMCSubtargetInfo - Create a ARM MCSubtargetInfo instance. 00043 /// This is exposed so Asm parser, etc. do not need to go through 00044 /// TargetRegistry. 00045 MCSubtargetInfo *createARMMCSubtargetInfo(StringRef TT, StringRef CPU, 00046 StringRef FS); 00047 } 00048 00049 MCStreamer *createMCAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS, 00050 bool isVerboseAsm, bool useDwarfDirectory, 00051 MCInstPrinter *InstPrint, MCCodeEmitter *CE, 00052 MCAsmBackend *TAB, bool ShowInst); 00053 00054 MCStreamer *createARMNullStreamer(MCContext &Ctx); 00055 00056 MCCodeEmitter *createARMLEMCCodeEmitter(const MCInstrInfo &MCII, 00057 const MCRegisterInfo &MRI, 00058 const MCSubtargetInfo &STI, 00059 MCContext &Ctx); 00060 00061 MCCodeEmitter *createARMBEMCCodeEmitter(const MCInstrInfo &MCII, 00062 const MCRegisterInfo &MRI, 00063 const MCSubtargetInfo &STI, 00064 MCContext &Ctx); 00065 00066 MCAsmBackend *createARMAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00067 StringRef TT, StringRef CPU, 00068 bool IsLittleEndian); 00069 00070 MCAsmBackend *createARMLEAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00071 StringRef TT, StringRef CPU); 00072 00073 MCAsmBackend *createARMBEAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00074 StringRef TT, StringRef CPU); 00075 00076 MCAsmBackend *createThumbLEAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00077 StringRef TT, StringRef CPU); 00078 00079 MCAsmBackend *createThumbBEAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00080 StringRef TT, StringRef CPU); 00081 00082 /// createARMWinCOFFStreamer - Construct a PE/COFF machine code streamer which 00083 /// will generate a PE/COFF object file. 00084 MCStreamer *createARMWinCOFFStreamer(MCContext &Context, MCAsmBackend &MAB, 00085 MCCodeEmitter &Emitter, raw_ostream &OS); 00086 00087 /// createARMELFObjectWriter - Construct an ELF Mach-O object writer. 00088 MCObjectWriter *createARMELFObjectWriter(raw_ostream &OS, 00089 uint8_t OSABI, 00090 bool IsLittleEndian); 00091 00092 /// createARMMachObjectWriter - Construct an ARM Mach-O object writer. 00093 MCObjectWriter *createARMMachObjectWriter(raw_ostream &OS, 00094 bool Is64Bit, 00095 uint32_t CPUType, 00096 uint32_t CPUSubtype); 00097 00098 /// createARMWinCOFFObjectWriter - Construct an ARM PE/COFF object writer. 00099 MCObjectWriter *createARMWinCOFFObjectWriter(raw_ostream &OS, bool Is64Bit); 00100 00101 /// createARMMachORelocationInfo - Construct ARM Mach-O relocation info. 00102 MCRelocationInfo *createARMMachORelocationInfo(MCContext &Ctx); 00103 } // End llvm namespace 00104 00105 // Defines symbolic names for ARM registers. This defines a mapping from 00106 // register name to register number. 00107 // 00108 #define GET_REGINFO_ENUM 00109 #include "ARMGenRegisterInfo.inc" 00110 00111 // Defines symbolic names for the ARM instructions. 00112 // 00113 #define GET_INSTRINFO_ENUM 00114 #include "ARMGenInstrInfo.inc" 00115 00116 #define GET_SUBTARGETINFO_ENUM 00117 #include "ARMGenSubtargetInfo.inc" 00118 00119 #endif