Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 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 | |
Rafael Espindola | fb8ac2d | 2012-12-20 05:13:09 +0000 | [diff] [blame] | 17 | // GCC #defines PPC on Linux but we use it as our namespace name |
| 18 | #undef PPC |
| 19 | |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 20 | #include "llvm/Support/DataTypes.h" |
| 21 | |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 22 | namespace llvm { |
Evan Cheng | 5928e69 | 2011-07-25 23:24:55 +0000 | [diff] [blame] | 23 | class MCAsmBackend; |
Evan Cheng | 61d4a20 | 2011-07-25 19:53:23 +0000 | [diff] [blame] | 24 | class MCCodeEmitter; |
| 25 | class MCContext; |
| 26 | class MCInstrInfo; |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 27 | class MCObjectWriter; |
Jim Grosbach | c3b0427 | 2012-05-15 17:35:52 +0000 | [diff] [blame] | 28 | class MCRegisterInfo; |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 29 | class MCSubtargetInfo; |
| 30 | class Target; |
| 31 | class StringRef; |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 32 | class raw_ostream; |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 33 | |
| 34 | extern Target ThePPC32Target; |
| 35 | extern Target ThePPC64Target; |
Bill Schmidt | 0a9170d | 2013-07-26 01:35:43 +0000 | [diff] [blame] | 36 | extern Target ThePPC64LETarget; |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 37 | |
Evan Cheng | 61d4a20 | 2011-07-25 19:53:23 +0000 | [diff] [blame] | 38 | MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII, |
Jim Grosbach | c3b0427 | 2012-05-15 17:35:52 +0000 | [diff] [blame] | 39 | const MCRegisterInfo &MRI, |
Evan Cheng | 61d4a20 | 2011-07-25 19:53:23 +0000 | [diff] [blame] | 40 | const MCSubtargetInfo &STI, |
| 41 | MCContext &Ctx); |
| 42 | |
Bill Wendling | 58e2d3d | 2013-09-09 02:37:14 +0000 | [diff] [blame] | 43 | MCAsmBackend *createPPCAsmBackend(const Target &T, const MCRegisterInfo &MRI, |
| 44 | StringRef TT, StringRef CPU); |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 45 | |
| 46 | /// createPPCELFObjectWriter - Construct an PPC ELF object writer. |
| 47 | MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, |
| 48 | bool Is64Bit, |
Ulrich Weigand | cae3a17 | 2014-03-24 18:16:09 +0000 | [diff] [blame] | 49 | bool IsLittleEndian, |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 50 | uint8_t OSABI); |
David Fang | b88cdf6 | 2013-08-08 20:14:40 +0000 | [diff] [blame] | 51 | /// createPPCELFObjectWriter - Construct a PPC Mach-O object writer. |
| 52 | MCObjectWriter *createPPCMachObjectWriter(raw_ostream &OS, bool Is64Bit, |
| 53 | uint32_t CPUType, |
| 54 | uint32_t CPUSubtype); |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 55 | } // End llvm namespace |
| 56 | |
Sylvestre Ledru | 37ef20d | 2013-03-17 12:40:42 +0000 | [diff] [blame] | 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 | |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 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 |