2012-02-17 16:55:11 +08:00
|
|
|
//===-- MipsTargetInfo.cpp - Mips Target Implementation -------------------===//
|
2009-07-15 14:35:19 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2009-07-15 14:35:19 +08:00
|
|
|
|
2009-07-19 07:03:22 +08:00
|
|
|
#include "Mips.h"
|
2013-01-02 19:36:10 +08:00
|
|
|
#include "llvm/IR/Module.h"
|
2011-08-25 02:08:43 +08:00
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
2009-07-15 14:35:19 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2016-10-10 07:00:34 +08:00
|
|
|
Target &llvm::getTheMipsTarget() {
|
|
|
|
static Target TheMipsTarget;
|
|
|
|
return TheMipsTarget;
|
|
|
|
}
|
|
|
|
Target &llvm::getTheMipselTarget() {
|
|
|
|
static Target TheMipselTarget;
|
|
|
|
return TheMipselTarget;
|
|
|
|
}
|
|
|
|
Target &llvm::getTheMips64Target() {
|
|
|
|
static Target TheMips64Target;
|
|
|
|
return TheMips64Target;
|
|
|
|
}
|
|
|
|
Target &llvm::getTheMips64elTarget() {
|
|
|
|
static Target TheMips64elTarget;
|
|
|
|
return TheMips64elTarget;
|
|
|
|
}
|
2009-07-15 14:35:19 +08:00
|
|
|
|
2011-03-05 01:51:39 +08:00
|
|
|
extern "C" void LLVMInitializeMipsTargetInfo() {
|
2011-07-22 00:28:51 +08:00
|
|
|
RegisterTarget<Triple::mips,
|
2016-10-10 07:00:34 +08:00
|
|
|
/*HasJIT=*/true>
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
X(getTheMipsTarget(), "mips", "Mips", "Mips");
|
2009-07-15 14:35:19 +08:00
|
|
|
|
2011-07-22 00:28:51 +08:00
|
|
|
RegisterTarget<Triple::mipsel,
|
2016-10-10 07:00:34 +08:00
|
|
|
/*HasJIT=*/true>
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
Y(getTheMipselTarget(), "mipsel", "Mipsel", "Mips");
|
2011-09-21 11:00:58 +08:00
|
|
|
|
|
|
|
RegisterTarget<Triple::mips64,
|
2016-10-10 07:00:34 +08:00
|
|
|
/*HasJIT=*/true>
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
A(getTheMips64Target(), "mips64", "Mips64 [experimental]", "Mips");
|
2011-09-21 11:00:58 +08:00
|
|
|
|
|
|
|
RegisterTarget<Triple::mips64el,
|
2016-10-10 07:00:34 +08:00
|
|
|
/*HasJIT=*/true>
|
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
2017-11-16 07:55:44 +08:00
|
|
|
B(getTheMips64elTarget(), "mips64el", "Mips64el [experimental]", "Mips");
|
2009-07-15 14:35:19 +08:00
|
|
|
}
|