blob: 38a7420d972deb81a503ffdd7e659e7d089833ca [file] [log] [blame]
Evan Chengbc153d42011-07-14 20:59:42 +00001//===-- 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
Rafael Espindolafb8ac2d2012-12-20 05:13:09 +000017// GCC #defines PPC on Linux but we use it as our namespace name
18#undef PPC
19
Rafael Espindola38a400d2011-12-22 01:57:09 +000020#include "llvm/Support/DataTypes.h"
21
Evan Chengbc153d42011-07-14 20:59:42 +000022namespace llvm {
Evan Cheng5928e692011-07-25 23:24:55 +000023class MCAsmBackend;
Evan Cheng61d4a202011-07-25 19:53:23 +000024class MCCodeEmitter;
25class MCContext;
26class MCInstrInfo;
Rafael Espindola38a400d2011-12-22 01:57:09 +000027class MCObjectWriter;
Jim Grosbachc3b04272012-05-15 17:35:52 +000028class MCRegisterInfo;
Evan Chengbc153d42011-07-14 20:59:42 +000029class MCSubtargetInfo;
30class Target;
31class StringRef;
Rafael Espindola38a400d2011-12-22 01:57:09 +000032class raw_ostream;
Evan Chengbc153d42011-07-14 20:59:42 +000033
34extern Target ThePPC32Target;
35extern Target ThePPC64Target;
36
Evan Cheng61d4a202011-07-25 19:53:23 +000037MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII,
Jim Grosbachc3b04272012-05-15 17:35:52 +000038 const MCRegisterInfo &MRI,
Evan Cheng61d4a202011-07-25 19:53:23 +000039 const MCSubtargetInfo &STI,
40 MCContext &Ctx);
41
Roman Divacky5dd4ccb2012-09-18 16:08:49 +000042MCAsmBackend *createPPCAsmBackend(const Target &T, StringRef TT, StringRef CPU);
Rafael Espindola38a400d2011-12-22 01:57:09 +000043
44/// createPPCELFObjectWriter - Construct an PPC ELF object writer.
45MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS,
46 bool Is64Bit,
47 uint8_t OSABI);
Evan Chengbc153d42011-07-14 20:59:42 +000048} // End llvm namespace
49
Sylvestre Ledru37ef20d2013-03-17 12:40:42 +000050// 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
Evan Chengbc153d42011-07-14 20:59:42 +000054// 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