1 //===-- AArch64TargetInfo.cpp - AArch64 Target Implementation -----------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "llvm/ADT/Triple.h"
10 #include "llvm/Support/TargetRegistry.h"
13 Target
&getTheAArch64leTarget() {
14 static Target TheAArch64leTarget
;
15 return TheAArch64leTarget
;
17 Target
&getTheAArch64beTarget() {
18 static Target TheAArch64beTarget
;
19 return TheAArch64beTarget
;
21 Target
&getTheARM64Target() {
22 static Target TheARM64Target
;
23 return TheARM64Target
;
27 extern "C" void LLVMInitializeAArch64TargetInfo() {
28 // Now register the "arm64" name for use with "-march". We don't want it to
29 // take possession of the Triple::aarch64 tag though.
30 TargetRegistry::RegisterTarget(getTheARM64Target(), "arm64",
31 "ARM64 (little endian)", "AArch64",
32 [](Triple::ArchType
) { return false; }, true);
34 RegisterTarget
<Triple::aarch64
, /*HasJIT=*/true> Z(
35 getTheAArch64leTarget(), "aarch64", "AArch64 (little endian)", "AArch64");
36 RegisterTarget
<Triple::aarch64_be
, /*HasJIT=*/true> W(
37 getTheAArch64beTarget(), "aarch64_be", "AArch64 (big endian)", "AArch64");