1 //===-- AlphaMCTargetDesc.cpp - Alpha Target Descriptions -------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file provides Alpha specific target descriptions.
12 //===----------------------------------------------------------------------===//
14 #include "AlphaMCTargetDesc.h"
15 #include "AlphaMCAsmInfo.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"
21 #define GET_INSTRINFO_MC_DESC
22 #include "AlphaGenInstrInfo.inc"
24 #define GET_SUBTARGETINFO_MC_DESC
25 #include "AlphaGenSubtargetInfo.inc"
27 #define GET_REGINFO_MC_DESC
28 #include "AlphaGenRegisterInfo.inc"
33 static MCInstrInfo *createAlphaMCInstrInfo() {
34 MCInstrInfo *X = new MCInstrInfo();
35 InitAlphaMCInstrInfo(X);
39 extern "C" void LLVMInitializeAlphaMCInstrInfo() {
40 TargetRegistry::RegisterMCInstrInfo(TheAlphaTarget, createAlphaMCInstrInfo);
43 static MCRegisterInfo *createAlphaMCRegisterInfo(StringRef TT) {
44 MCRegisterInfo *X = new MCRegisterInfo();
45 InitAlphaMCRegisterInfo(X, Alpha::R26);
49 extern "C" void LLVMInitializeAlphaMCRegisterInfo() {
50 TargetRegistry::RegisterMCRegInfo(TheAlphaTarget, createAlphaMCRegisterInfo);
53 static MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU,
55 MCSubtargetInfo *X = new MCSubtargetInfo();
56 InitAlphaMCSubtargetInfo(X, TT, CPU, FS);
60 extern "C" void LLVMInitializeAlphaMCSubtargetInfo() {
61 TargetRegistry::RegisterMCSubtargetInfo(TheAlphaTarget,
62 createAlphaMCSubtargetInfo);
65 extern "C" void LLVMInitializeAlphaMCAsmInfo() {
66 RegisterMCAsmInfo<AlphaMCAsmInfo> X(TheAlphaTarget);
69 MCCodeGenInfo *createAlphaMCCodeGenInfo(StringRef TT, Reloc::Model RM,
70 CodeModel::Model CM) {
71 MCCodeGenInfo *X = new MCCodeGenInfo();
72 X->InitMCCodeGenInfo(Reloc::PIC_, CM);
76 extern "C" void LLVMInitializeAlphaMCCodeGenInfo() {
77 TargetRegistry::RegisterMCCodeGenInfo(TheAlphaTarget,
78 createAlphaMCCodeGenInfo);