- Make BranchProbability constructor public.
[llvm/stm8.git] / lib / Target / PowerPC / PPC.h
blob55852e69da5dfba31f22609b81a3ad49d5e1ae1b
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.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TARGET_POWERPC_H
16 #define LLVM_TARGET_POWERPC_H
18 #include <string>
20 // GCC #defines PPC on Linux but we use it as our namespace name
21 #undef PPC
23 namespace llvm {
24 class PPCTargetMachine;
25 class FunctionPass;
26 class formatted_raw_ostream;
27 class JITCodeEmitter;
28 class Target;
29 class MachineInstr;
30 class AsmPrinter;
31 class MCInst;
32 class MCCodeEmitter;
33 class MCContext;
34 class TargetMachine;
35 class TargetAsmBackend;
37 FunctionPass *createPPCBranchSelectionPass();
38 FunctionPass *createPPCISelDag(PPCTargetMachine &TM);
39 FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM,
40 JITCodeEmitter &MCE);
41 MCCodeEmitter *createPPCMCCodeEmitter(const Target &, TargetMachine &TM,
42 MCContext &Ctx);
43 TargetAsmBackend *createPPCAsmBackend(const Target &, const std::string &);
45 void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
46 AsmPrinter &AP, bool isDarwin);
48 extern Target ThePPC32Target;
49 extern Target ThePPC64Target;
51 namespace PPCII {
53 /// Target Operand Flag enum.
54 enum TOF {
55 //===------------------------------------------------------------------===//
56 // PPC Specific MachineOperand flags.
57 MO_NO_FLAG,
59 /// MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the
60 /// reference is actually to the "FOO$stub" symbol. This is used for calls
61 /// and jumps to external functions on Tiger and earlier.
62 MO_DARWIN_STUB = 1,
64 /// MO_LO16, MO_HA16 - lo16(symbol) and ha16(symbol)
65 MO_LO16 = 4, MO_HA16 = 8,
67 /// MO_PIC_FLAG - If this bit is set, the symbol reference is relative to
68 /// the function's picbase, e.g. lo16(symbol-picbase).
69 MO_PIC_FLAG = 16,
71 /// MO_NLP_FLAG - If this bit is set, the symbol reference is actually to
72 /// the non_lazy_ptr for the global, e.g. lo16(symbol$non_lazy_ptr-picbase).
73 MO_NLP_FLAG = 32,
75 /// MO_NLP_HIDDEN_FLAG - If this bit is set, the symbol reference is to a
76 /// symbol with hidden visibility. This causes a different kind of
77 /// non-lazy-pointer to be generated.
78 MO_NLP_HIDDEN_FLAG = 64
80 } // end namespace PPCII
82 } // end namespace llvm;
84 // Defines symbolic names for PowerPC registers. This defines a mapping from
85 // register name to register number.
87 #define GET_REGINFO_ENUM
88 #include "PPCGenRegisterInfo.inc"
90 // Defines symbolic names for the PowerPC instructions.
92 #define GET_INSTRINFO_ENUM
93 #include "PPCGenInstrInfo.inc"
95 #endif