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
22namespace llvm {
23class MCAsmBackend;
24class MCCodeEmitter;
25class MCContext;
26class MCInstrInfo;
27class MCObjectWriter;
28class MCRegisterInfo;
29class MCSubtargetInfo;
30class Target;
31class StringRef;
32class raw_ostream;
33
34extern Target ThePPC32Target;
35extern Target ThePPC64Target;
36
37MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII,
38                                      const MCRegisterInfo &MRI,
39                                      const MCSubtargetInfo &STI,
40                                      MCContext &Ctx);
41
42MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU);
43
44/// createPPCELFObjectWriter - Construct an PPC ELF object writer.
45MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS,
46                                         bool Is64Bit,
47                                         uint8_t OSABI);
48} // End llvm namespace
49
50// Generated files will use "namespace PPC". To avoid symbol clash,
51// undefine PPC here. PPC may be predefined on some hosts.
52#undef PPC
53
54// Defines symbolic names for PowerPC registers.  This defines a mapping from
55// register name to register number.
56//
57#define GET_REGINFO_ENUM
58#include "PPCGenRegisterInfo.inc"
59
60// Defines symbolic names for the PowerPC instructions.
61//
62#define GET_INSTRINFO_ENUM
63#include "PPCGenInstrInfo.inc"
64
65#define GET_SUBTARGETINFO_ENUM
66#include "PPCGenSubtargetInfo.inc"
67
68#endif
69