xref: /minix3/external/bsd/llvm/dist/llvm/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc //===-- AArch64TargetInfo.cpp - AArch64 Target Implementation -----------------===//
2f4a2713aSLionel Sambuc //
3f4a2713aSLionel Sambuc //                     The LLVM Compiler Infrastructure
4f4a2713aSLionel Sambuc //
5f4a2713aSLionel Sambuc // This file is distributed under the University of Illinois Open Source
6f4a2713aSLionel Sambuc // License. See LICENSE.TXT for details.
7f4a2713aSLionel Sambuc //
8f4a2713aSLionel Sambuc //===----------------------------------------------------------------------===//
9f4a2713aSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc #include "llvm/ADT/Triple.h"
11f4a2713aSLionel Sambuc #include "llvm/Support/TargetRegistry.h"
12f4a2713aSLionel Sambuc using namespace llvm;
13f4a2713aSLionel Sambuc 
14*0a6a1f1dSLionel Sambuc namespace llvm {
15*0a6a1f1dSLionel Sambuc Target TheAArch64leTarget;
16*0a6a1f1dSLionel Sambuc Target TheAArch64beTarget;
17*0a6a1f1dSLionel Sambuc Target TheARM64Target;
18*0a6a1f1dSLionel Sambuc } // end namespace llvm
19f4a2713aSLionel Sambuc 
LLVMInitializeAArch64TargetInfo()20f4a2713aSLionel Sambuc extern "C" void LLVMInitializeAArch64TargetInfo() {
21*0a6a1f1dSLionel Sambuc   // Now register the "arm64" name for use with "-march". We don't want it to
22*0a6a1f1dSLionel Sambuc   // take possession of the Triple::aarch64 tag though.
23*0a6a1f1dSLionel Sambuc   TargetRegistry::RegisterTarget(TheARM64Target, "arm64",
24*0a6a1f1dSLionel Sambuc                                  "ARM64 (little endian)",
25*0a6a1f1dSLionel Sambuc                                  [](Triple::ArchType) { return false; }, true);
26*0a6a1f1dSLionel Sambuc 
27*0a6a1f1dSLionel Sambuc   RegisterTarget<Triple::aarch64, /*HasJIT=*/true> Z(
28*0a6a1f1dSLionel Sambuc       TheAArch64leTarget, "aarch64", "AArch64 (little endian)");
29*0a6a1f1dSLionel Sambuc   RegisterTarget<Triple::aarch64_be, /*HasJIT=*/true> W(
30*0a6a1f1dSLionel Sambuc       TheAArch64beTarget, "aarch64_be", "AArch64 (big endian)");
31*0a6a1f1dSLionel Sambuc 
32f4a2713aSLionel Sambuc }
33