Go through all kinds of trouble to mark 'blr' as having a predicate operand
[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 "(BO << 5) | BI"  for various predicates.
32     enum Predicate {
33       PRED_ALWAYS = (20 << 5) | 0,
34       PRED_LT     = (12 << 5) | 0,
35       PRED_LE     = ( 4 << 5) | 1,
36       PRED_EQ     = (12 << 5) | 2,
37       PRED_GE     = ( 4 << 5) | 0,
38       PRED_GT     = (12 << 5) | 1,
39       PRED_NE     = ( 4 << 5) | 2,
40       PRED_UN     = (12 << 5) | 3,
41       PRED_NU     = ( 4 << 5) | 3
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