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