2011-06-24 01:44:41 +00:00
|
|
|
//===-- X86TargetDesc.cpp - X86 Target Descriptions -------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file provides X86 specific target descriptions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "X86TargetDesc.h"
|
2011-06-28 20:07:07 +00:00
|
|
|
#include "llvm/MC/MCInstrInfo.h"
|
2011-06-24 01:44:41 +00:00
|
|
|
#include "llvm/MC/MCRegisterInfo.h"
|
2011-07-01 22:25:04 +00:00
|
|
|
#include "llvm/MC/MCSubtargetInfo.h"
|
2011-06-24 20:42:09 +00:00
|
|
|
#include "llvm/Target/TargetRegistry.h"
|
2011-06-27 18:32:37 +00:00
|
|
|
|
|
|
|
#define GET_REGINFO_MC_DESC
|
|
|
|
#include "X86GenRegisterInfo.inc"
|
2011-06-28 20:07:07 +00:00
|
|
|
|
|
|
|
#define GET_INSTRINFO_MC_DESC
|
|
|
|
#include "X86GenInstrInfo.inc"
|
|
|
|
|
2011-07-01 22:25:04 +00:00
|
|
|
#define GET_SUBTARGETINFO_MC_DESC
|
|
|
|
#include "X86GenSubtarget.inc"
|
|
|
|
|
2011-06-24 01:44:41 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2011-06-28 20:29:03 +00:00
|
|
|
MCInstrInfo *createX86MCInstrInfo() {
|
|
|
|
MCInstrInfo *X = new MCInstrInfo();
|
|
|
|
InitX86MCInstrInfo(X);
|
|
|
|
return X;
|
|
|
|
}
|
|
|
|
|
2011-06-24 01:44:41 +00:00
|
|
|
MCRegisterInfo *createX86MCRegisterInfo() {
|
|
|
|
MCRegisterInfo *X = new MCRegisterInfo();
|
|
|
|
InitX86MCRegisterInfo(X);
|
|
|
|
return X;
|
|
|
|
}
|
2011-06-24 20:42:09 +00:00
|
|
|
|
2011-07-01 22:25:04 +00:00
|
|
|
MCSubtargetInfo *createX86MCSubtargetInfo() {
|
|
|
|
MCSubtargetInfo *X = new MCSubtargetInfo();
|
|
|
|
InitX86MCSubtargetInfo(X);
|
|
|
|
return X;
|
|
|
|
}
|
|
|
|
|
2011-06-24 20:42:09 +00:00
|
|
|
// Force static initialization.
|
2011-07-01 22:25:04 +00:00
|
|
|
extern "C" void LLVMInitializeX86MCInstrInfo() {
|
|
|
|
RegisterMCInstrInfo<MCInstrInfo> X(TheX86_32Target);
|
|
|
|
RegisterMCInstrInfo<MCInstrInfo> Y(TheX86_64Target);
|
|
|
|
|
|
|
|
TargetRegistry::RegisterMCInstrInfo(TheX86_32Target, createX86MCInstrInfo);
|
|
|
|
TargetRegistry::RegisterMCInstrInfo(TheX86_64Target, createX86MCInstrInfo);
|
|
|
|
}
|
|
|
|
|
2011-06-24 20:42:09 +00:00
|
|
|
extern "C" void LLVMInitializeX86MCRegInfo() {
|
|
|
|
RegisterMCRegInfo<MCRegisterInfo> X(TheX86_32Target);
|
|
|
|
RegisterMCRegInfo<MCRegisterInfo> Y(TheX86_64Target);
|
|
|
|
|
|
|
|
TargetRegistry::RegisterMCRegInfo(TheX86_32Target, createX86MCRegisterInfo);
|
|
|
|
TargetRegistry::RegisterMCRegInfo(TheX86_64Target, createX86MCRegisterInfo);
|
|
|
|
}
|
2011-07-01 22:25:04 +00:00
|
|
|
|
|
|
|
extern "C" void LLVMInitializeX86MCSubtargetInfo() {
|
|
|
|
RegisterMCSubtargetInfo<MCSubtargetInfo> X(TheX86_32Target);
|
|
|
|
RegisterMCSubtargetInfo<MCSubtargetInfo> Y(TheX86_64Target);
|
|
|
|
|
|
|
|
TargetRegistry::RegisterMCSubtargetInfo(TheX86_32Target,
|
|
|
|
createX86MCSubtargetInfo);
|
|
|
|
TargetRegistry::RegisterMCSubtargetInfo(TheX86_64Target,
|
|
|
|
createX86MCSubtargetInfo);
|
|
|
|
}
|