ARMTargetInfo.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //===-- ARMTargetInfo.cpp - ARM 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/ARMTargetInfo.h"
  9. #include "llvm/MC/TargetRegistry.h"
  10. using namespace llvm;
  11. Target &llvm::getTheARMLETarget() {
  12. static Target TheARMLETarget;
  13. return TheARMLETarget;
  14. }
  15. Target &llvm::getTheARMBETarget() {
  16. static Target TheARMBETarget;
  17. return TheARMBETarget;
  18. }
  19. Target &llvm::getTheThumbLETarget() {
  20. static Target TheThumbLETarget;
  21. return TheThumbLETarget;
  22. }
  23. Target &llvm::getTheThumbBETarget() {
  24. static Target TheThumbBETarget;
  25. return TheThumbBETarget;
  26. }
  27. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARMTargetInfo() {
  28. RegisterTarget<Triple::arm, /*HasJIT=*/true> X(getTheARMLETarget(), "arm",
  29. "ARM", "ARM");
  30. RegisterTarget<Triple::armeb, /*HasJIT=*/true> Y(getTheARMBETarget(), "armeb",
  31. "ARM (big endian)", "ARM");
  32. RegisterTarget<Triple::thumb, /*HasJIT=*/true> A(getTheThumbLETarget(),
  33. "thumb", "Thumb", "ARM");
  34. RegisterTarget<Triple::thumbeb, /*HasJIT=*/true> B(
  35. getTheThumbBETarget(), "thumbeb", "Thumb (big endian)", "ARM");
  36. }