blob: 4a420929d07a00907877867dddf0fe4694ed38c5 [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
50// Defines symbolic names for PowerPC registers. This defines a mapping from
51// register name to register number.
52//
53#define GET_REGINFO_ENUM
54#include "PPCGenRegisterInfo.inc"
55
56// Defines symbolic names for the PowerPC instructions.
57//
58#define GET_INSTRINFO_ENUM
59#include "PPCGenInstrInfo.inc"
60
61#define GET_SUBTARGETINFO_ENUM
62#include "PPCGenSubtargetInfo.inc"
63
64#endif