10b57cec5SDimitry Andric //===-- PowerPCTargetInfo.cpp - PowerPC Target Implementation -------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric
90b57cec5SDimitry Andric #include "TargetInfo/PowerPCTargetInfo.h"
10*349cc55cSDimitry Andric #include "llvm/MC/TargetRegistry.h"
110b57cec5SDimitry Andric using namespace llvm;
120b57cec5SDimitry Andric
getThePPC32Target()130b57cec5SDimitry Andric Target &llvm::getThePPC32Target() {
140b57cec5SDimitry Andric static Target ThePPC32Target;
150b57cec5SDimitry Andric return ThePPC32Target;
160b57cec5SDimitry Andric }
getThePPC32LETarget()17e8d8bef9SDimitry Andric Target &llvm::getThePPC32LETarget() {
18e8d8bef9SDimitry Andric static Target ThePPC32LETarget;
19e8d8bef9SDimitry Andric return ThePPC32LETarget;
20e8d8bef9SDimitry Andric }
getThePPC64Target()210b57cec5SDimitry Andric Target &llvm::getThePPC64Target() {
220b57cec5SDimitry Andric static Target ThePPC64Target;
230b57cec5SDimitry Andric return ThePPC64Target;
240b57cec5SDimitry Andric }
getThePPC64LETarget()250b57cec5SDimitry Andric Target &llvm::getThePPC64LETarget() {
260b57cec5SDimitry Andric static Target ThePPC64LETarget;
270b57cec5SDimitry Andric return ThePPC64LETarget;
280b57cec5SDimitry Andric }
290b57cec5SDimitry Andric
LLVMInitializePowerPCTargetInfo()30480093f4SDimitry Andric extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetInfo() {
31e8d8bef9SDimitry Andric RegisterTarget<Triple::ppc, /*HasJIT=*/true> W(getThePPC32Target(), "ppc32",
320b57cec5SDimitry Andric "PowerPC 32", "PPC");
330b57cec5SDimitry Andric
34e8d8bef9SDimitry Andric RegisterTarget<Triple::ppcle, /*HasJIT=*/true> X(
35e8d8bef9SDimitry Andric getThePPC32LETarget(), "ppc32le", "PowerPC 32 LE", "PPC");
36e8d8bef9SDimitry Andric
370b57cec5SDimitry Andric RegisterTarget<Triple::ppc64, /*HasJIT=*/true> Y(getThePPC64Target(), "ppc64",
380b57cec5SDimitry Andric "PowerPC 64", "PPC");
390b57cec5SDimitry Andric
400b57cec5SDimitry Andric RegisterTarget<Triple::ppc64le, /*HasJIT=*/true> Z(
410b57cec5SDimitry Andric getThePPC64LETarget(), "ppc64le", "PowerPC 64 LE", "PPC");
420b57cec5SDimitry Andric }
43