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}
30
31extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
32LLVMInitializeMipsTargetInfo() {
33 RegisterTarget<Triple::mips,
34 /*HasJIT=*/true>
35 X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips");
36
37 RegisterTarget<Triple::mipsel,
38 /*HasJIT=*/true>
39 Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips");
40
41 RegisterTarget<Triple::mips64,
42 /*HasJIT=*/true>
43 A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips");
44
45 RegisterTarget<Triple::mips64el,
46 /*HasJIT=*/true>
47 B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)",
48 "Mips");
49}
50