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; |
| 36 | |
Evan Cheng | 61d4a20 | 2011-07-25 19:53:23 +0000 | [diff] [blame] | 37 | MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII, |
Jim Grosbach | c3b0427 | 2012-05-15 17:35:52 +0000 | [diff] [blame] | 38 | const MCRegisterInfo &MRI, |
Evan Cheng | 61d4a20 | 2011-07-25 19:53:23 +0000 | [diff] [blame] | 39 | const MCSubtargetInfo &STI, |
| 40 | MCContext &Ctx); |
| 41 | |
Roman Divacky | 5dd4ccb | 2012-09-18 16:08:49 +0000 | [diff] [blame] | 42 | MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU); |
Rafael Espindola | 38a400d | 2011-12-22 01:57:09 +0000 | [diff] [blame] | 43 | |
| 44 | /// createPPCELFObjectWriter - Construct an PPC ELF object writer. |
| 45 | MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS, |
| 46 | bool Is64Bit, |
| 47 | uint8_t OSABI); |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 48 | } // End llvm namespace |
| 49 | |
Sylvestre Ledru | 37ef20d | 2013-03-17 12:40:42 +0000 | [diff] [blame^] | 50 | // Generated files will use "namespace PPC". To avoid symbol clash, |
| 51 | // undefine PPC here. PPC may be predefined on some hosts. |
| 52 | #undef PPC |
| 53 | |
Evan Cheng | bc153d4 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 54 | // Defines symbolic names for PowerPC registers. This defines a mapping from |
| 55 | // register name to register number. |
| 56 | // |
| 57 | #define GET_REGINFO_ENUM |
| 58 | #include "PPCGenRegisterInfo.inc" |
| 59 | |
| 60 | // Defines symbolic names for the PowerPC instructions. |
| 61 | // |
| 62 | #define GET_INSTRINFO_ENUM |
| 63 | #include "PPCGenInstrInfo.inc" |
| 64 | |
| 65 | #define GET_SUBTARGETINFO_ENUM |
| 66 | #include "PPCGenSubtargetInfo.inc" |
| 67 | |
| 68 | #endif |