• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- SparcTargetInfo.cpp - Sparc 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 "Sparc.h"
11 #include "llvm/IR/Module.h"
12 #include "llvm/Support/TargetRegistry.h"
13 using namespace llvm;
14 
getTheSparcTarget()15 Target &llvm::getTheSparcTarget() {
16   static Target TheSparcTarget;
17   return TheSparcTarget;
18 }
getTheSparcV9Target()19 Target &llvm::getTheSparcV9Target() {
20   static Target TheSparcV9Target;
21   return TheSparcV9Target;
22 }
getTheSparcelTarget()23 Target &llvm::getTheSparcelTarget() {
24   static Target TheSparcelTarget;
25   return TheSparcelTarget;
26 }
27 
LLVMInitializeSparcTargetInfo()28 extern "C" void LLVMInitializeSparcTargetInfo() {
29   RegisterTarget<Triple::sparc, /*HasJIT=*/true> X(getTheSparcTarget(), "sparc",
30                                                    "Sparc", "Sparc");
31   RegisterTarget<Triple::sparcv9, /*HasJIT=*/true> Y(
32       getTheSparcV9Target(), "sparcv9", "Sparc V9", "Sparc");
33   RegisterTarget<Triple::sparcel, /*HasJIT=*/true> Z(
34       getTheSparcelTarget(), "sparcel", "Sparc LE", "Sparc");
35 }
36