Evan Cheng | c60f9b7 | 2011-07-14 20:59:42 +0000 | [diff] [blame^] | 1 | //===-- SPUMCTargetDesc.cpp - Cell SPU 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 Cell SPU specific target descriptions. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "SPUMCTargetDesc.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 "SPUGenInstrInfo.inc" |
| 22 | |
| 23 | #define GET_SUBTARGETINFO_MC_DESC |
| 24 | #include "SPUGenSubtargetInfo.inc" |
| 25 | |
| 26 | #define GET_REGINFO_MC_DESC |
| 27 | #include "SPUGenRegisterInfo.inc" |
| 28 | |
| 29 | using namespace llvm; |
| 30 | |
| 31 | MCInstrInfo *createSPUMCInstrInfo() { |
| 32 | MCInstrInfo *X = new MCInstrInfo(); |
| 33 | InitSPUMCInstrInfo(X); |
| 34 | return X; |
| 35 | } |
| 36 | |
| 37 | extern "C" void LLVMInitializeCellSPUMCInstrInfo() { |
| 38 | TargetRegistry::RegisterMCInstrInfo(TheCellSPUTarget, createSPUMCInstrInfo); |
| 39 | } |
| 40 | |
| 41 | MCSubtargetInfo *createSPUMCSubtargetInfo(StringRef TT, StringRef CPU, |
| 42 | StringRef FS) { |
| 43 | MCSubtargetInfo *X = new MCSubtargetInfo(); |
| 44 | InitSPUMCSubtargetInfo(X, TT, CPU, FS); |
| 45 | return X; |
| 46 | } |
| 47 | |
| 48 | extern "C" void LLVMInitializeCellSPUMCSubtargetInfo() { |
| 49 | TargetRegistry::RegisterMCSubtargetInfo(TheCellSPUTarget, |
| 50 | createSPUMCSubtargetInfo); |
| 51 | } |