• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- ARMTargetInfo.cpp - ARM Target Implementation ---------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "MCTargetDesc/ARMMCTargetDesc.h"
11 #include "llvm/Support/TargetRegistry.h"
12 using namespace llvm;
13 
getTheARMLETarget()14 Target &llvm::getTheARMLETarget() {
15   static Target TheARMLETarget;
16   return TheARMLETarget;
17 }
getTheARMBETarget()18 Target &llvm::getTheARMBETarget() {
19   static Target TheARMBETarget;
20   return TheARMBETarget;
21 }
getTheThumbLETarget()22 Target &llvm::getTheThumbLETarget() {
23   static Target TheThumbLETarget;
24   return TheThumbLETarget;
25 }
getTheThumbBETarget()26 Target &llvm::getTheThumbBETarget() {
27   static Target TheThumbBETarget;
28   return TheThumbBETarget;
29 }
30 
LLVMInitializeARMTargetInfo()31 extern "C" void LLVMInitializeARMTargetInfo() {
32   RegisterTarget<Triple::arm, /*HasJIT=*/true> X(getTheARMLETarget(), "arm",
33                                                  "ARM", "ARM");
34   RegisterTarget<Triple::armeb, /*HasJIT=*/true> Y(getTheARMBETarget(), "armeb",
35                                                    "ARM (big endian)", "ARM");
36 
37   RegisterTarget<Triple::thumb, /*HasJIT=*/true> A(getTheThumbLETarget(),
38                                                    "thumb", "Thumb", "ARM");
39   RegisterTarget<Triple::thumbeb, /*HasJIT=*/true> B(
40       getTheThumbBETarget(), "thumbeb", "Thumb (big endian)", "ARM");
41 }
42