XCoreMCTargetDesc.cpp revision 224133
1//===-- XCoreMCTargetDesc.cpp - XCore 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 XCore specific target descriptions. 11// 12//===----------------------------------------------------------------------===// 13 14#include "XCoreMCTargetDesc.h" 15#include "XCoreMCAsmInfo.h" 16#include "llvm/MC/MCInstrInfo.h" 17#include "llvm/MC/MCRegisterInfo.h" 18#include "llvm/MC/MCSubtargetInfo.h" 19#include "llvm/Target/TargetRegistry.h" 20 21#define GET_INSTRINFO_MC_DESC 22#include "XCoreGenInstrInfo.inc" 23 24#define GET_SUBTARGETINFO_MC_DESC 25#include "XCoreGenSubtargetInfo.inc" 26 27#define GET_REGINFO_MC_DESC 28#include "XCoreGenRegisterInfo.inc" 29 30using namespace llvm; 31 32static MCInstrInfo *createXCoreMCInstrInfo() { 33 MCInstrInfo *X = new MCInstrInfo(); 34 InitXCoreMCInstrInfo(X); 35 return X; 36} 37 38extern "C" void LLVMInitializeXCoreMCInstrInfo() { 39 TargetRegistry::RegisterMCInstrInfo(TheXCoreTarget, createXCoreMCInstrInfo); 40} 41 42static MCSubtargetInfo *createXCoreMCSubtargetInfo(StringRef TT, StringRef CPU, 43 StringRef FS) { 44 MCSubtargetInfo *X = new MCSubtargetInfo(); 45 InitXCoreMCSubtargetInfo(X, TT, CPU, FS); 46 return X; 47} 48 49extern "C" void LLVMInitializeXCoreMCSubtargetInfo() { 50 TargetRegistry::RegisterMCSubtargetInfo(TheXCoreTarget, 51 createXCoreMCSubtargetInfo); 52} 53 54extern "C" void LLVMInitializeXCoreMCAsmInfo() { 55 RegisterMCAsmInfo<XCoreMCAsmInfo> X(TheXCoreTarget); 56} 57