diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
| commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
| tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/Target/AArch64/TargetInfo | |
| parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) | |
Notes
Diffstat (limited to 'lib/Target/AArch64/TargetInfo')
| -rw-r--r-- | lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp | 33 | ||||
| -rw-r--r-- | lib/Target/AArch64/TargetInfo/AArch64TargetInfo.h | 24 |
2 files changed, 46 insertions, 11 deletions
diff --git a/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp b/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp index 8fb161574c5b6..7f02da6a95167 100644 --- a/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp +++ b/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp @@ -1,39 +1,50 @@ //===-- AArch64TargetInfo.cpp - AArch64 Target Implementation -----------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include "llvm/ADT/Triple.h" +#include "TargetInfo/AArch64TargetInfo.h" #include "llvm/Support/TargetRegistry.h" + using namespace llvm; -namespace llvm { -Target &getTheAArch64leTarget() { +Target &llvm::getTheAArch64leTarget() { static Target TheAArch64leTarget; return TheAArch64leTarget; } -Target &getTheAArch64beTarget() { +Target &llvm::getTheAArch64beTarget() { static Target TheAArch64beTarget; return TheAArch64beTarget; } -Target &getTheARM64Target() { +Target &llvm::getTheAArch64_32Target() { + static Target TheAArch64leTarget; + return TheAArch64leTarget; +} +Target &llvm::getTheARM64Target() { static Target TheARM64Target; return TheARM64Target; } -} // namespace llvm +Target &llvm::getTheARM64_32Target() { + static Target TheARM64_32Target; + return TheARM64_32Target; +} extern "C" void LLVMInitializeAArch64TargetInfo() { // Now register the "arm64" name for use with "-march". We don't want it to - // take possession of the Triple::aarch64 tag though. + // take possession of the Triple::aarch64 tags though. TargetRegistry::RegisterTarget(getTheARM64Target(), "arm64", "ARM64 (little endian)", "AArch64", [](Triple::ArchType) { return false; }, true); + TargetRegistry::RegisterTarget(getTheARM64_32Target(), "arm64_32", + "ARM64 (little endian ILP32)", "AArch64", + [](Triple::ArchType) { return false; }, true); RegisterTarget<Triple::aarch64, /*HasJIT=*/true> Z( getTheAArch64leTarget(), "aarch64", "AArch64 (little endian)", "AArch64"); RegisterTarget<Triple::aarch64_be, /*HasJIT=*/true> W( getTheAArch64beTarget(), "aarch64_be", "AArch64 (big endian)", "AArch64"); + RegisterTarget<Triple::aarch64_32, /*HasJIT=*/true> X( + getTheAArch64_32Target(), "aarch64_32", "AArch64 (little endian ILP32)", "AArch64"); } diff --git a/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.h b/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.h new file mode 100644 index 0000000000000..b3728a11bb5da --- /dev/null +++ b/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.h @@ -0,0 +1,24 @@ +//===-- AArch64TargetInfo.h - AArch64 Target Implementation -----*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_AARCH64_TARGETINFO_AARCH64TARGETINFO_H +#define LLVM_LIB_TARGET_AARCH64_TARGETINFO_AARCH64TARGETINFO_H + +namespace llvm { + +class Target; + +Target &getTheAArch64leTarget(); +Target &getTheAArch64beTarget(); +Target &getTheAArch64_32Target(); +Target &getTheARM64Target(); +Target &getTheARM64_32Target(); + +} // namespace llvm + +#endif // LLVM_LIB_TARGET_AARCH64_TARGETINFO_AARCH64TARGETINFO_H |
