• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- MipsTargetInfo.cpp - Mips Target Implementation -------------------===//
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 #include "Mips.h"
11 #include "llvm/IR/Module.h"
12 #include "llvm/Support/TargetRegistry.h"
13 using namespace llvm;
14 
getTheMipsTarget()15 Target &llvm::getTheMipsTarget() {
16   static Target TheMipsTarget;
17   return TheMipsTarget;
18 }
getTheMipselTarget()19 Target &llvm::getTheMipselTarget() {
20   static Target TheMipselTarget;
21   return TheMipselTarget;
22 }
getTheMips64Target()23 Target &llvm::getTheMips64Target() {
24   static Target TheMips64Target;
25   return TheMips64Target;
26 }
getTheMips64elTarget()27 Target &llvm::getTheMips64elTarget() {
28   static Target TheMips64elTarget;
29   return TheMips64elTarget;
30 }
31 
LLVMInitializeMipsTargetInfo()32 extern "C" void LLVMInitializeMipsTargetInfo() {
33   RegisterTarget<Triple::mips,
34                  /*HasJIT=*/true>
35       X(getTheMipsTarget(), "mips", "Mips", "Mips");
36 
37   RegisterTarget<Triple::mipsel,
38                  /*HasJIT=*/true>
39       Y(getTheMipselTarget(), "mipsel", "Mipsel", "Mips");
40 
41   RegisterTarget<Triple::mips64,
42                  /*HasJIT=*/true>
43       A(getTheMips64Target(), "mips64", "Mips64 [experimental]", "Mips");
44 
45   RegisterTarget<Triple::mips64el,
46                  /*HasJIT=*/true>
47       B(getTheMips64elTarget(), "mips64el", "Mips64el [experimental]", "Mips");
48 }
49