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