]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / contrib / llvm / lib / Target / SystemZ / MCTargetDesc / SystemZMCTargetDesc.cpp
1 //===-- SystemZMCTargetDesc.cpp - SystemZ 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 SystemZ specific target descriptions.
11 //
12 //===----------------------------------------------------------------------===//
13
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"
20
21 #define GET_INSTRINFO_MC_DESC
22 #include "SystemZGenInstrInfo.inc"
23
24 #define GET_SUBTARGETINFO_MC_DESC
25 #include "SystemZGenSubtargetInfo.inc"
26
27 #define GET_REGINFO_MC_DESC
28 #include "SystemZGenRegisterInfo.inc"
29
30 using namespace llvm;
31
32 static MCInstrInfo *createSystemZMCInstrInfo() {
33   MCInstrInfo *X = new MCInstrInfo();
34   InitSystemZMCInstrInfo(X);
35   return X;
36 }
37
38 extern "C" void LLVMInitializeSystemZMCInstrInfo() {
39   TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget,
40                                       createSystemZMCInstrInfo);
41 }
42
43 static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT,
44                                                      StringRef CPU,
45                                                      StringRef FS) {
46   MCSubtargetInfo *X = new MCSubtargetInfo();
47   InitSystemZMCSubtargetInfo(X, TT, CPU, FS);
48   return X;
49 }
50
51 extern "C" void LLVMInitializeSystemZMCSubtargetInfo() {
52   TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget,
53                                           createSystemZMCSubtargetInfo);
54 }
55
56 extern "C" void LLVMInitializeSystemZMCAsmInfo() {
57   RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget);
58 }