5d737f692b9b221e5355ac0d2780b5375b0ea60c
[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 was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source 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 #include <iosfwd>
19
20
21 // GCC #defines PPC on Linux but we use it as our namespace name
22 #undef PPC
23
24 namespace llvm {
25   class PPCTargetMachine;
26   class FunctionPassManager;
27   class FunctionPass;
28   class MachineCodeEmitter;
29   
30   namespace PPC {
31     /// Predicate - These are "(BI << 5) | BO"  for various predicates.
32     enum Predicate {
33       PRED_ALWAYS = (0 << 5) | 20,
34       PRED_LT     = (0 << 5) | 12,
35       PRED_LE     = (1 << 5) |  4,
36       PRED_EQ     = (2 << 5) | 12,
37       PRED_GE     = (0 << 5) |  4,
38       PRED_GT     = (1 << 5) | 12,
39       PRED_NE     = (2 << 5) |  4,
40       PRED_UN     = (3 << 5) | 12,
41       PRED_NU     = (3 << 5) |  4
42     };
43   }
44   
45 FunctionPass *createPPCBranchSelectionPass();
46 FunctionPass *createPPCISelDag(PPCTargetMachine &TM);
47 FunctionPass *createPPCAsmPrinterPass(std::ostream &OS,
48                                       PPCTargetMachine &TM);
49 FunctionPass *createPPCCodeEmitterPass(PPCTargetMachine &TM,
50                                        MachineCodeEmitter &MCE);
51 void addPPCMachOObjectWriterPass(FunctionPassManager &FPM, std::ostream &o, 
52                                  PPCTargetMachine &tm);
53 } // end namespace llvm;
54
55 // Defines symbolic names for PowerPC registers.  This defines a mapping from
56 // register name to register number.
57 //
58 #include "PPCGenRegisterNames.inc"
59
60 // Defines symbolic names for the PowerPC instructions.
61 //
62 #include "PPCGenInstrNames.inc"
63
64 #endif