1 //===-- SystemZMCTargetDesc.cpp - SystemZ 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 SystemZ specific target descriptions.
12 //===----------------------------------------------------------------------===//
14 #include "SystemZMCTargetDesc.h"
15 #include "SystemZMCAsmInfo.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 "SystemZGenInstrInfo.inc"
24 #define GET_SUBTARGETINFO_MC_DESC
25 #include "SystemZGenSubtargetInfo.inc"
27 #define GET_REGINFO_MC_DESC
28 #include "SystemZGenRegisterInfo.inc"
32 static MCInstrInfo *createSystemZMCInstrInfo() {
33 MCInstrInfo *X = new MCInstrInfo();
34 InitSystemZMCInstrInfo(X);
38 extern "C" void LLVMInitializeSystemZMCInstrInfo() {
39 TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget,
40 createSystemZMCInstrInfo);
43 static MCRegisterInfo *createSystemZMCRegisterInfo(StringRef TT) {
44 MCRegisterInfo *X = new MCRegisterInfo();
45 InitSystemZMCRegisterInfo(X, 0);
49 extern "C" void LLVMInitializeSystemZMCRegisterInfo() {
50 TargetRegistry::RegisterMCRegInfo(TheSystemZTarget,
51 createSystemZMCRegisterInfo);
54 static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT,
57 MCSubtargetInfo *X = new MCSubtargetInfo();
58 InitSystemZMCSubtargetInfo(X, TT, CPU, FS);
62 extern "C" void LLVMInitializeSystemZMCSubtargetInfo() {
63 TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget,
64 createSystemZMCSubtargetInfo);
67 extern "C" void LLVMInitializeSystemZMCAsmInfo() {
68 RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget);
71 MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM) {
72 MCCodeGenInfo *X = new MCCodeGenInfo();
73 if (RM == Reloc::Default)
75 X->InitMCCodeGenInfo(RM);
79 extern "C" void LLVMInitializeSystemZMCCodeGenInfo() {
80 TargetRegistry::RegisterMCCodeGenInfo(TheSystemZTarget,
81 createSystemZMCCodeGenInfo);