1 //===-- PPC.h - Top-level interface for PowerPC Target ----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 // This file contains the entry points for global functions defined in the LLVM
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TARGET_POWERPC_H
16 #define LLVM_TARGET_POWERPC_H
21 // GCC #defines PPC on Linux but we use it as our namespace name
25 class PPCTargetMachine;
26 class FunctionPassManager;
28 class MachineCodeEmitter;
31 /// Predicate - These are "(BO << 5) | BI" for various predicates.
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
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;
55 // Defines symbolic names for PowerPC registers. This defines a mapping from
56 // register name to register number.
58 #include "PPCGenRegisterNames.inc"
60 // Defines symbolic names for the PowerPC instructions.
62 #include "PPCGenInstrNames.inc"