Chris Lattner | 1911fd4 | 2006-09-04 04:14:57 +0000 | [diff] [blame] | 1 | //===-- PPC.h - Top-level interface for PowerPC Target ----------*- C++ -*-===// |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 2 | // |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 4ee451d | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Misha Brukman | b5f662f | 2005-04-21 23:30:14 +0000 | [diff] [blame] | 7 | // |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains the entry points for global functions defined in the LLVM |
| 11 | // PowerPC back-end. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Chris Lattner | 1911fd4 | 2006-09-04 04:14:57 +0000 | [diff] [blame] | 15 | #ifndef LLVM_TARGET_POWERPC_H |
| 16 | #define LLVM_TARGET_POWERPC_H |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 17 | |
Chris Lattner | af53a87 | 2006-11-04 05:27:39 +0000 | [diff] [blame] | 18 | // GCC #defines PPC on Linux but we use it as our namespace name |
| 19 | #undef PPC |
| 20 | |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 21 | namespace llvm { |
Chris Lattner | af53a87 | 2006-11-04 05:27:39 +0000 | [diff] [blame] | 22 | class PPCTargetMachine; |
Chris Lattner | af53a87 | 2006-11-04 05:27:39 +0000 | [diff] [blame] | 23 | class FunctionPass; |
David Greene | 7184781 | 2009-07-14 20:18:05 +0000 | [diff] [blame] | 24 | class formatted_raw_ostream; |
Chris Lattner | 8d63ba8 | 2010-11-14 21:09:28 +0000 | [diff] [blame] | 25 | class JITCodeEmitter; |
| 26 | class Target; |
Chris Lattner | a7217c8 | 2010-11-14 21:12:33 +0000 | [diff] [blame] | 27 | class MachineInstr; |
| 28 | class MCInst; |
| 29 | class AsmPrinter; |
Chris Lattner | af53a87 | 2006-11-04 05:27:39 +0000 | [diff] [blame] | 30 | |
Misha Brukman | 999d9cf | 2004-07-27 18:33:06 +0000 | [diff] [blame] | 31 | FunctionPass *createPPCBranchSelectionPass(); |
Evan Cheng | c4c6257 | 2006-03-13 23:20:37 +0000 | [diff] [blame] | 32 | FunctionPass *createPPCISelDag(PPCTargetMachine &TM); |
Bruno Cardoso Lopes | a3f99f9 | 2009-05-30 20:51:52 +0000 | [diff] [blame] | 33 | FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM, |
Bruno Cardoso Lopes | ac57e6e | 2009-07-06 05:09:34 +0000 | [diff] [blame] | 34 | JITCodeEmitter &MCE); |
Daniel Dunbar | 4cb1e13 | 2009-07-18 23:03:22 +0000 | [diff] [blame] | 35 | |
Chris Lattner | a7217c8 | 2010-11-14 21:12:33 +0000 | [diff] [blame] | 36 | void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, |
| 37 | AsmPrinter &AP); |
| 38 | |
Daniel Dunbar | 4cb1e13 | 2009-07-18 23:03:22 +0000 | [diff] [blame] | 39 | extern Target ThePPC32Target; |
| 40 | extern Target ThePPC64Target; |
| 41 | |
Chris Lattner | b908258 | 2010-11-14 23:42:06 +0000 | [diff] [blame] | 42 | namespace PPCII { |
| 43 | |
| 44 | /// Target Operand Flag enum. |
| 45 | enum TOF { |
| 46 | //===------------------------------------------------------------------===// |
| 47 | // PPC Specific MachineOperand flags. |
| 48 | MO_NO_FLAG, |
| 49 | |
| 50 | /// MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the |
| 51 | /// reference is actually to the "FOO$stub" symbol. This is used for calls |
| 52 | /// and jumps to external functions on Tiger and earlier. |
| 53 | MO_DARWIN_STUB |
| 54 | |
| 55 | }; |
| 56 | } // end namespace PPCII |
| 57 | |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 58 | } // end namespace llvm; |
| 59 | |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 60 | // Defines symbolic names for PowerPC registers. This defines a mapping from |
| 61 | // register name to register number. |
| 62 | // |
Chris Lattner | 4c7b43b | 2005-10-14 23:37:35 +0000 | [diff] [blame] | 63 | #include "PPCGenRegisterNames.inc" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 64 | |
| 65 | // Defines symbolic names for the PowerPC instructions. |
| 66 | // |
Chris Lattner | 4c7b43b | 2005-10-14 23:37:35 +0000 | [diff] [blame] | 67 | #include "PPCGenInstrNames.inc" |
Misha Brukman | 5dfe3a9 | 2004-06-21 16:55:25 +0000 | [diff] [blame] | 68 | |
| 69 | #endif |