1//===-- MipsTargetInfo.cpp - Mips 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/MipsTargetInfo.h"
10#include "llvm/MC/TargetRegistry.h"
11#include "llvm/Support/Compiler.h"
12using namespace llvm;
13
14Target &llvm::getTheMipsTarget() {
15 static Target TheMipsTarget;
16 return TheMipsTarget;
17}
18Target &llvm::getTheMipselTarget() {
19 static Target TheMipselTarget;
20 return TheMipselTarget;
21}
22Target &llvm::getTheMips64Target() {
23 static Target TheMips64Target;
24 return TheMips64Target;
25}
26Target &llvm::getTheMips64elTarget() {
27 static Target TheMips64elTarget;
28 return TheMips64elTarget;
29}
30Target &llvm::getTheNanoMipsTarget() {
31 static Target TheNanoMipsTarget;
32 return TheNanoMipsTarget;
33}
34
35extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
36LLVMInitializeMipsTargetInfo() {
37 RegisterTarget<Triple::mips,
38 /*HasJIT=*/true>
39 X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips");
40
41 RegisterTarget<Triple::mipsel,
42 /*HasJIT=*/true>
43 Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips");
44
45 RegisterTarget<Triple::mips64,
46 /*HasJIT=*/true>
47 A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips");
48
49 RegisterTarget<Triple::mips64el,
50 /*HasJIT=*/true>
51 B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)",
52 "Mips");
53 RegisterTarget<Triple::nanomips,
54 /*HasJIT=*/false>
55 C(getTheNanoMipsTarget(), "nanomips", "nanoMIPS (32-bit little endian)",
56 "Mips");
57}
58