]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
Merge ^/head r338298 through r338391.
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / PowerPC / TargetInfo / PowerPCTargetInfo.cpp
1 //===-- PowerPCTargetInfo.cpp - PowerPC 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 "PPC.h"
11 #include "llvm/IR/Module.h"
12 #include "llvm/Support/TargetRegistry.h"
13 using namespace llvm;
14
15 Target &llvm::getThePPC32Target() {
16   static Target ThePPC32Target;
17   return ThePPC32Target;
18 }
19 Target &llvm::getThePPC64Target() {
20   static Target ThePPC64Target;
21   return ThePPC64Target;
22 }
23 Target &llvm::getThePPC64LETarget() {
24   static Target ThePPC64LETarget;
25   return ThePPC64LETarget;
26 }
27
28 extern "C" void LLVMInitializePowerPCTargetInfo() {
29   RegisterTarget<Triple::ppc, /*HasJIT=*/true> X(getThePPC32Target(), "ppc32",
30                                                  "PowerPC 32", "PPC");
31
32   RegisterTarget<Triple::ppc64, /*HasJIT=*/true> Y(getThePPC64Target(), "ppc64",
33                                                    "PowerPC 64", "PPC");
34
35   RegisterTarget<Triple::ppc64le, /*HasJIT=*/true> Z(
36       getThePPC64LETarget(), "ppc64le", "PowerPC 64 LE", "PPC");
37 }