]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / lib / Target / PowerPC / MCTargetDesc / PPCMCTargetDesc.h
1 //===-- PPCMCTargetDesc.h - PowerPC Target Descriptions ---------*- 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 provides PowerPC specific target descriptions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef PPCMCTARGETDESC_H
15 #define PPCMCTARGETDESC_H
16
17 // GCC #defines PPC on Linux but we use it as our namespace name
18 #undef PPC
19
20 #include "llvm/Support/DataTypes.h"
21
22 namespace llvm {
23 class MCAsmBackend;
24 class MCCodeEmitter;
25 class MCContext;
26 class MCInstrInfo;
27 class MCObjectWriter;
28 class MCRegisterInfo;
29 class MCSubtargetInfo;
30 class Target;
31 class StringRef;
32 class raw_ostream;
33
34 extern Target ThePPC32Target;
35 extern Target ThePPC64Target;
36 extern Target ThePPC64LETarget;
37   
38 MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII,
39                                       const MCRegisterInfo &MRI,
40                                       const MCSubtargetInfo &STI,
41                                       MCContext &Ctx);
42
43 MCAsmBackend *createPPCAsmBackend(const Target &T, const MCRegisterInfo &MRI,
44                                   StringRef TT, StringRef CPU);
45
46 /// createPPCELFObjectWriter - Construct an PPC ELF object writer.
47 MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS,
48                                          bool Is64Bit,
49                                          uint8_t OSABI);
50 /// createPPCELFObjectWriter - Construct a PPC Mach-O object writer.
51 MCObjectWriter *createPPCMachObjectWriter(raw_ostream &OS, bool Is64Bit,
52                                           uint32_t CPUType,
53                                           uint32_t CPUSubtype);
54 } // End llvm namespace
55
56 // Generated files will use "namespace PPC". To avoid symbol clash,
57 // undefine PPC here. PPC may be predefined on some hosts.
58 #undef PPC
59
60 // Defines symbolic names for PowerPC registers.  This defines a mapping from
61 // register name to register number.
62 //
63 #define GET_REGINFO_ENUM
64 #include "PPCGenRegisterInfo.inc"
65
66 // Defines symbolic names for the PowerPC instructions.
67 //
68 #define GET_INSTRINFO_ENUM
69 #include "PPCGenInstrInfo.inc"
70
71 #define GET_SUBTARGETINFO_ENUM
72 #include "PPCGenSubtargetInfo.inc"
73
74 #endif