LLVM API Documentation
00001 //===-- PPCMCTargetDesc.h - PowerPC 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 PowerPC specific target descriptions. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCMCTARGETDESC_H 00015 #define LLVM_LIB_TARGET_POWERPC_MCTARGETDESC_PPCMCTARGETDESC_H 00016 00017 // GCC #defines PPC on Linux but we use it as our namespace name 00018 #undef PPC 00019 00020 #include "llvm/Support/DataTypes.h" 00021 00022 namespace llvm { 00023 class MCAsmBackend; 00024 class MCCodeEmitter; 00025 class MCContext; 00026 class MCInstrInfo; 00027 class MCObjectWriter; 00028 class MCRegisterInfo; 00029 class MCSubtargetInfo; 00030 class Target; 00031 class StringRef; 00032 class raw_ostream; 00033 00034 extern Target ThePPC32Target; 00035 extern Target ThePPC64Target; 00036 extern Target ThePPC64LETarget; 00037 00038 MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII, 00039 const MCRegisterInfo &MRI, 00040 const MCSubtargetInfo &STI, 00041 MCContext &Ctx); 00042 00043 MCAsmBackend *createPPCAsmBackend(const Target &T, const MCRegisterInfo &MRI, 00044 StringRef TT, StringRef CPU); 00045 00046 /// createPPCELFObjectWriter - Construct an PPC ELF object writer. 00047 MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, 00048 bool Is64Bit, 00049 bool IsLittleEndian, 00050 uint8_t OSABI); 00051 /// createPPCELFObjectWriter - Construct a PPC Mach-O object writer. 00052 MCObjectWriter *createPPCMachObjectWriter(raw_ostream &OS, bool Is64Bit, 00053 uint32_t CPUType, 00054 uint32_t CPUSubtype); 00055 } // End llvm namespace 00056 00057 // Generated files will use "namespace PPC". To avoid symbol clash, 00058 // undefine PPC here. PPC may be predefined on some hosts. 00059 #undef PPC 00060 00061 // Defines symbolic names for PowerPC registers. This defines a mapping from 00062 // register name to register number. 00063 // 00064 #define GET_REGINFO_ENUM 00065 #include "PPCGenRegisterInfo.inc" 00066 00067 // Defines symbolic names for the PowerPC instructions. 00068 // 00069 #define GET_INSTRINFO_ENUM 00070 #include "PPCGenInstrInfo.inc" 00071 00072 #define GET_SUBTARGETINFO_ENUM 00073 #include "PPCGenSubtargetInfo.inc" 00074 00075 #endif