1//===-- PowerPCTargetInfo.cpp - PowerPC Target Implementation -------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "TargetInfo/PowerPCTargetInfo.h"
10#include "llvm/MC/TargetRegistry.h"
11using namespace llvm;
12
13Target &llvm::getThePPC32Target() {
14 static Target ThePPC32Target;
15 return ThePPC32Target;
16}
17Target &llvm::getThePPC32LETarget() {
18 static Target ThePPC32LETarget;
19 return ThePPC32LETarget;
20}
21Target &llvm::getThePPC64Target() {
22 static Target ThePPC64Target;
23 return ThePPC64Target;
24}
25Target &llvm::getThePPC64LETarget() {
26 static Target ThePPC64LETarget;
27 return ThePPC64LETarget;
28}
29
30extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetInfo() {
31 RegisterTarget<Triple::ppc, /*HasJIT=*/true> W(getThePPC32Target(), "ppc32",
32 "PowerPC 32", "PPC");
33
34 RegisterTarget<Triple::ppcle, /*HasJIT=*/true> X(
35 getThePPC32LETarget(), "ppc32le", "PowerPC 32 LE", "PPC");
36
37 RegisterTarget<Triple::ppc64, /*HasJIT=*/true> Y(getThePPC64Target(), "ppc64",
38 "PowerPC 64", "PPC");
39
40 RegisterTarget<Triple::ppc64le, /*HasJIT=*/true> Z(
41 getThePPC64LETarget(), "ppc64le", "PowerPC 64 LE", "PPC");
42}
43