PowerPCTargetInfo.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #include "TargetInfo/PowerPCTargetInfo.h"
  9. #include "llvm/MC/TargetRegistry.h"
  10. using namespace llvm;
  11. Target &llvm::getThePPC32Target() {
  12. static Target ThePPC32Target;
  13. return ThePPC32Target;
  14. }
  15. Target &llvm::getThePPC32LETarget() {
  16. static Target ThePPC32LETarget;
  17. return ThePPC32LETarget;
  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. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializePowerPCTargetInfo() {
  28. RegisterTarget<Triple::ppc, /*HasJIT=*/true> W(getThePPC32Target(), "ppc32",
  29. "PowerPC 32", "PPC");
  30. RegisterTarget<Triple::ppcle, /*HasJIT=*/true> X(
  31. getThePPC32LETarget(), "ppc32le", "PowerPC 32 LE", "PPC");
  32. RegisterTarget<Triple::ppc64, /*HasJIT=*/true> Y(getThePPC64Target(), "ppc64",
  33. "PowerPC 64", "PPC");
  34. RegisterTarget<Triple::ppc64le, /*HasJIT=*/true> Z(
  35. getThePPC64LETarget(), "ppc64le", "PowerPC 64 LE", "PPC");
  36. }