Evan Cheng | c60f9b7 | 2011-07-14 20:59:42 +0000 | [diff] [blame^] | 1 | //===-- PPCMCTargetDesc.cpp - 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 | #include "PPCMCTargetDesc.h" |
| 15 | #include "llvm/MC/MCInstrInfo.h" |
| 16 | #include "llvm/MC/MCRegisterInfo.h" |
| 17 | #include "llvm/MC/MCSubtargetInfo.h" |
| 18 | #include "llvm/Target/TargetRegistry.h" |
| 19 | |
| 20 | #define GET_INSTRINFO_MC_DESC |
| 21 | #include "PPCGenInstrInfo.inc" |
| 22 | |
| 23 | #define GET_SUBTARGETINFO_MC_DESC |
| 24 | #include "PPCGenSubtargetInfo.inc" |
| 25 | |
| 26 | #define GET_REGINFO_MC_DESC |
| 27 | #include "PPCGenRegisterInfo.inc" |
| 28 | |
| 29 | using namespace llvm; |
| 30 | |
| 31 | MCInstrInfo *createPPCMCInstrInfo() { |
| 32 | MCInstrInfo *X = new MCInstrInfo(); |
| 33 | InitPPCMCInstrInfo(X); |
| 34 | return X; |
| 35 | } |
| 36 | |
| 37 | extern "C" void LLVMInitializePowerPCMCInstrInfo() { |
| 38 | TargetRegistry::RegisterMCInstrInfo(ThePPC32Target, createPPCMCInstrInfo); |
| 39 | TargetRegistry::RegisterMCInstrInfo(ThePPC64Target, createPPCMCInstrInfo); |
| 40 | } |
| 41 | |
| 42 | |
| 43 | MCSubtargetInfo *createPPCMCSubtargetInfo(StringRef TT, StringRef CPU, |
| 44 | StringRef FS) { |
| 45 | MCSubtargetInfo *X = new MCSubtargetInfo(); |
| 46 | InitPPCMCSubtargetInfo(X, TT, CPU, FS); |
| 47 | return X; |
| 48 | } |
| 49 | |
| 50 | extern "C" void LLVMInitializePowerPCMCSubtargetInfo() { |
| 51 | TargetRegistry::RegisterMCSubtargetInfo(ThePPC32Target, |
| 52 | createPPCMCSubtargetInfo); |
| 53 | TargetRegistry::RegisterMCSubtargetInfo(ThePPC64Target, |
| 54 | createPPCMCSubtargetInfo); |
| 55 | } |