xref: /freebsd/contrib/llvm-project/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
10b57cec5SDimitry Andric //===-- MipsTargetInfo.cpp - Mips Target Implementation -------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "TargetInfo/MipsTargetInfo.h"
10*349cc55cSDimitry Andric #include "llvm/MC/TargetRegistry.h"
110b57cec5SDimitry Andric using namespace llvm;
120b57cec5SDimitry Andric 
getTheMipsTarget()130b57cec5SDimitry Andric Target &llvm::getTheMipsTarget() {
140b57cec5SDimitry Andric   static Target TheMipsTarget;
150b57cec5SDimitry Andric   return TheMipsTarget;
160b57cec5SDimitry Andric }
getTheMipselTarget()170b57cec5SDimitry Andric Target &llvm::getTheMipselTarget() {
180b57cec5SDimitry Andric   static Target TheMipselTarget;
190b57cec5SDimitry Andric   return TheMipselTarget;
200b57cec5SDimitry Andric }
getTheMips64Target()210b57cec5SDimitry Andric Target &llvm::getTheMips64Target() {
220b57cec5SDimitry Andric   static Target TheMips64Target;
230b57cec5SDimitry Andric   return TheMips64Target;
240b57cec5SDimitry Andric }
getTheMips64elTarget()250b57cec5SDimitry Andric Target &llvm::getTheMips64elTarget() {
260b57cec5SDimitry Andric   static Target TheMips64elTarget;
270b57cec5SDimitry Andric   return TheMips64elTarget;
280b57cec5SDimitry Andric }
290b57cec5SDimitry Andric 
LLVMInitializeMipsTargetInfo()30480093f4SDimitry Andric extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsTargetInfo() {
310b57cec5SDimitry Andric   RegisterTarget<Triple::mips,
320b57cec5SDimitry Andric                  /*HasJIT=*/true>
330b57cec5SDimitry Andric       X(getTheMipsTarget(), "mips", "MIPS (32-bit big endian)", "Mips");
340b57cec5SDimitry Andric 
350b57cec5SDimitry Andric   RegisterTarget<Triple::mipsel,
360b57cec5SDimitry Andric                  /*HasJIT=*/true>
370b57cec5SDimitry Andric       Y(getTheMipselTarget(), "mipsel", "MIPS (32-bit little endian)", "Mips");
380b57cec5SDimitry Andric 
390b57cec5SDimitry Andric   RegisterTarget<Triple::mips64,
400b57cec5SDimitry Andric                  /*HasJIT=*/true>
410b57cec5SDimitry Andric       A(getTheMips64Target(), "mips64", "MIPS (64-bit big endian)", "Mips");
420b57cec5SDimitry Andric 
430b57cec5SDimitry Andric   RegisterTarget<Triple::mips64el,
440b57cec5SDimitry Andric                  /*HasJIT=*/true>
450b57cec5SDimitry Andric       B(getTheMips64elTarget(), "mips64el", "MIPS (64-bit little endian)",
460b57cec5SDimitry Andric         "Mips");
470b57cec5SDimitry Andric }
48