implement support for the MO_DARWIN_STUB TargetOperand flag,
[oota-llvm.git] / lib / Target / PowerPC / PPC.h
1 //===-- PPC.h - Top-level interface for PowerPC Target ----------*- 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 contains the entry points for global functions defined in the LLVM
11 // PowerPC back-end.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_TARGET_POWERPC_H
16 #define LLVM_TARGET_POWERPC_H
17
18 // GCC #defines PPC on Linux but we use it as our namespace name
19 #undef PPC
20
21 namespace llvm {
22   class PPCTargetMachine;
23   class FunctionPass;
24   class formatted_raw_ostream;
25   class JITCodeEmitter;
26   class Target;
27   class MachineInstr;
28   class MCInst;
29   class AsmPrinter;
30   
31 FunctionPass *createPPCBranchSelectionPass();
32 FunctionPass *createPPCISelDag(PPCTargetMachine &TM);
33 FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM,
34                                           JITCodeEmitter &MCE);
35
36 void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
37                                   AsmPrinter &AP);
38
39 extern Target ThePPC32Target;
40 extern Target ThePPC64Target;
41
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   
58 } // end namespace llvm;
59
60 // Defines symbolic names for PowerPC registers.  This defines a mapping from
61 // register name to register number.
62 //
63 #include "PPCGenRegisterNames.inc"
64
65 // Defines symbolic names for the PowerPC instructions.
66 //
67 #include "PPCGenInstrNames.inc"
68
69 #endif