Evan Cheng | c60f9b7 | 2011-07-14 20:59:42 +0000 | [diff] [blame] | 1 | //===-- MSP430MCTargetDesc.cpp - MSP430 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 MSP430 specific target descriptions. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "MSP430MCTargetDesc.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 "MSP430GenInstrInfo.inc" |
| 22 | |
| 23 | #define GET_SUBTARGETINFO_MC_DESC |
| 24 | #include "MSP430GenSubtargetInfo.inc" |
| 25 | |
| 26 | #define GET_REGINFO_MC_DESC |
| 27 | #include "MSP430GenRegisterInfo.inc" |
| 28 | |
| 29 | using namespace llvm; |
| 30 | |
| 31 | |
| 32 | MCInstrInfo *createMSP430MCInstrInfo() { |
| 33 | MCInstrInfo *X = new MCInstrInfo(); |
| 34 | InitMSP430MCInstrInfo(X); |
| 35 | return X; |
| 36 | } |
| 37 | |
| 38 | extern "C" void LLVMInitializeMSP430MCInstrInfo() { |
| 39 | TargetRegistry::RegisterMCInstrInfo(TheMSP430Target, createMSP430MCInstrInfo); |
| 40 | } |
| 41 | |
| 42 | |
| 43 | MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU, |
| 44 | StringRef FS) { |
| 45 | MCSubtargetInfo *X = new MCSubtargetInfo(); |
| 46 | InitMSP430MCSubtargetInfo(X, TT, CPU, FS); |
| 47 | return X; |
| 48 | } |
| 49 | |
| 50 | extern "C" void LLVMInitializeMSP430MCSubtargetInfo() { |
| 51 | TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target, |
| 52 | createMSP430MCSubtargetInfo); |
| 53 | } |