PPCMCTargetDesc.h revision 36b56886974eae4f9c5ebc96befd3e7bfe5de338
1//===-- PPCMCTargetDesc.h - PowerPC Target Descriptions ---------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file provides PowerPC specific target descriptions. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef PPCMCTARGETDESC_H 15#define PPCMCTARGETDESC_H 16 17// GCC #defines PPC on Linux but we use it as our namespace name 18#undef PPC 19 20#include "llvm/Support/DataTypes.h" 21 22namespace llvm { 23class MCAsmBackend; 24class MCCodeEmitter; 25class MCContext; 26class MCInstrInfo; 27class MCObjectWriter; 28class MCRegisterInfo; 29class MCSubtargetInfo; 30class Target; 31class StringRef; 32class raw_ostream; 33 34extern Target ThePPC32Target; 35extern Target ThePPC64Target; 36extern Target ThePPC64LETarget; 37 38MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII, 39 const MCRegisterInfo &MRI, 40 const MCSubtargetInfo &STI, 41 MCContext &Ctx); 42 43MCAsmBackend *createPPCAsmBackend(const Target &T, const MCRegisterInfo &MRI, 44 StringRef TT, StringRef CPU); 45 46/// createPPCELFObjectWriter - Construct an PPC ELF object writer. 47MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, 48 bool Is64Bit, 49 bool IsLittleEndian, 50 uint8_t OSABI); 51/// createPPCELFObjectWriter - Construct a PPC Mach-O object writer. 52MCObjectWriter *createPPCMachObjectWriter(raw_ostream &OS, bool Is64Bit, 53 uint32_t CPUType, 54 uint32_t CPUSubtype); 55} // End llvm namespace 56 57// Generated files will use "namespace PPC". To avoid symbol clash, 58// undefine PPC here. PPC may be predefined on some hosts. 59#undef PPC 60 61// Defines symbolic names for PowerPC registers. This defines a mapping from 62// register name to register number. 63// 64#define GET_REGINFO_ENUM 65#include "PPCGenRegisterInfo.inc" 66 67// Defines symbolic names for the PowerPC instructions. 68// 69#define GET_INSTRINFO_ENUM 70#include "PPCGenInstrInfo.inc" 71 72#define GET_SUBTARGETINFO_ENUM 73#include "PPCGenSubtargetInfo.inc" 74 75#endif 76