blob: 474395b93637370e0708ed25e36616884fc1a1b3 [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;
Bill Schmidt0a9170d2013-07-26 01:35:43 +000036extern Target ThePPC64LETarget;
Evan Chengbc153d42011-07-14 20:59:42 +000037
Evan Cheng61d4a202011-07-25 19:53:23 +000038MCCodeEmitter *createPPCMCCodeEmitter(const MCInstrInfo &MCII,
Jim Grosbachc3b04272012-05-15 17:35:52 +000039 const MCRegisterInfo &MRI,
Evan Cheng61d4a202011-07-25 19:53:23 +000040 const MCSubtargetInfo &STI,
41 MCContext &Ctx);
42
Bill Wendling58e2d3d2013-09-09 02:37:14 +000043MCAsmBackend *createPPCAsmBackend(const Target &T, const MCRegisterInfo &MRI,
44 StringRef TT, StringRef CPU);
Rafael Espindola38a400d2011-12-22 01:57:09 +000045
46/// createPPCELFObjectWriter - Construct an PPC ELF object writer.
47MCObjectWriter *createPPCELFObjectWriter(raw_ostream &OS,
48 bool Is64Bit,
Ulrich Weigandcae3a172014-03-24 18:16:09 +000049 bool IsLittleEndian,
Rafael Espindola38a400d2011-12-22 01:57:09 +000050 uint8_t OSABI);
David Fangb88cdf62013-08-08 20:14:40 +000051/// createPPCELFObjectWriter - Construct a PPC Mach-O object writer.
52MCObjectWriter *createPPCMachObjectWriter(raw_ostream &OS, bool Is64Bit,
53 uint32_t CPUType,
54 uint32_t CPUSubtype);
Evan Chengbc153d42011-07-14 20:59:42 +000055} // End llvm namespace
56
Sylvestre Ledru37ef20d2013-03-17 12:40:42 +000057// Generated files will use "namespace PPC". To avoid symbol clash,
58// undefine PPC here. PPC may be predefined on some hosts.
59#undef PPC
60
Evan Chengbc153d42011-07-14 20:59:42 +000061// Defines symbolic names for PowerPC registers. This defines a mapping from
62// register name to register number.
63//
64#define GET_REGINFO_ENUM
65#include "PPCGenRegisterInfo.inc"
66
67// Defines symbolic names for the PowerPC instructions.
68//
69#define GET_INSTRINFO_ENUM
70#include "PPCGenInstrInfo.inc"
71
72#define GET_SUBTARGETINFO_ENUM
73#include "PPCGenSubtargetInfo.inc"
74
75#endif