2012-02-17 16:55:11 +08:00
|
|
|
//===-- MipsSubtarget.cpp - Mips Subtarget Information --------------------===//
|
2007-06-06 15:42:06 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2007-06-06 15:42:06 +08:00
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-06-06 15:42:06 +08:00
|
|
|
//
|
2011-07-02 05:01:15 +08:00
|
|
|
// This file implements the Mips specific subclass of TargetSubtargetInfo.
|
2007-06-06 15:42:06 +08:00
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2007-06-06 15:42:06 +08:00
|
|
|
|
2017-06-06 19:49:48 +08:00
|
|
|
#include "MipsSubtarget.h"
|
2007-06-06 15:42:06 +08:00
|
|
|
#include "Mips.h"
|
2017-06-06 19:49:48 +08:00
|
|
|
#include "MipsMachineFunction.h"
|
2012-03-28 08:24:17 +08:00
|
|
|
#include "MipsRegisterInfo.h"
|
2014-01-07 19:48:04 +08:00
|
|
|
#include "MipsTargetMachine.h"
|
2018-02-23 19:06:40 +08:00
|
|
|
#include "MipsCallLowering.h"
|
|
|
|
#include "MipsLegalizerInfo.h"
|
|
|
|
#include "MipsRegisterBankInfo.h"
|
2013-04-10 03:46:01 +08:00
|
|
|
#include "llvm/IR/Attributes.h"
|
|
|
|
#include "llvm/IR/Function.h"
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
#include "llvm/Support/Debug.h"
|
2011-08-25 02:08:43 +08:00
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
2013-04-10 03:46:01 +08:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
2011-07-02 04:45:01 +08:00
|
|
|
|
2014-04-22 10:03:14 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2014-04-22 10:41:26 +08:00
|
|
|
#define DEBUG_TYPE "mips-subtarget"
|
|
|
|
|
2011-07-02 04:45:01 +08:00
|
|
|
#define GET_SUBTARGETINFO_TARGET_DESC
|
2011-07-08 09:53:10 +08:00
|
|
|
#define GET_SUBTARGETINFO_CTOR
|
2011-07-02 06:36:09 +08:00
|
|
|
#include "MipsGenSubtargetInfo.inc"
|
2011-07-02 04:45:01 +08:00
|
|
|
|
2013-04-10 03:46:01 +08:00
|
|
|
// FIXME: Maybe this should be on by default when Mips16 is specified
|
|
|
|
//
|
2015-02-20 16:42:34 +08:00
|
|
|
static cl::opt<bool>
|
|
|
|
Mixed16_32("mips-mixed-16-32", cl::init(false),
|
|
|
|
cl::desc("Allow for a mixture of Mips16 "
|
|
|
|
"and Mips32 code in a single output file"),
|
|
|
|
cl::Hidden);
|
2013-04-10 03:46:01 +08:00
|
|
|
|
2015-02-20 16:42:34 +08:00
|
|
|
static cl::opt<bool> Mips_Os16("mips-os16", cl::init(false),
|
|
|
|
cl::desc("Compile all functions that don't use "
|
|
|
|
"floating point as Mips 16"),
|
|
|
|
cl::Hidden);
|
2013-04-11 00:58:04 +08:00
|
|
|
|
2015-02-20 16:42:34 +08:00
|
|
|
static cl::opt<bool> Mips16HardFloat("mips16-hard-float", cl::NotHidden,
|
|
|
|
cl::desc("Enable mips16 hard float."),
|
|
|
|
cl::init(false));
|
Checkin in of first of several patches to finish implementation of
mips16/mips32 floating point interoperability.
This patch fixes returns from mips16 functions so that if the function
was in fact called by a mips32 hard float routine, then values
that would have been returned in floating point registers are so returned.
Mips16 mode has no floating point instructions so there is no way to
load values into floating point registers.
This is needed when returning float, double, single complex, double complex
in the Mips ABI.
Helper functions in libc for mips16 are available to do this.
For efficiency purposes, these helper functions have a different calling
convention from normal Mips calls.
Registers v0,v1,a0,a1 are used to pass parameters instead of
a0,a1,a2,a3.
This is because v0,v1,a0,a1 are the natural registers used to return
floating point values in soft float. These values can then be moved
to the appropriate floating point registers with no extra cost.
The only register that is modified is ra in this call.
The helper functions make sure that the return values are in the floating
point registers that they would be in if soft float was not in effect
(which it is for mips16, though the soft float is implemented using a mips32
library that uses hard float).
llvm-svn: 181641
2013-05-11 06:25:39 +08:00
|
|
|
|
2013-10-28 05:57:36 +08:00
|
|
|
static cl::opt<bool>
|
2015-02-20 16:42:34 +08:00
|
|
|
Mips16ConstantIslands("mips16-constant-islands", cl::NotHidden,
|
|
|
|
cl::desc("Enable mips16 constant islands."),
|
|
|
|
cl::init(true));
|
2013-10-28 05:57:36 +08:00
|
|
|
|
2014-11-06 21:20:12 +08:00
|
|
|
static cl::opt<bool>
|
2015-02-20 16:42:34 +08:00
|
|
|
GPOpt("mgpopt", cl::Hidden,
|
|
|
|
cl::desc("Enable gp-relative addressing of mips small data items"));
|
2014-11-06 21:20:12 +08:00
|
|
|
|
2018-01-23 00:43:30 +08:00
|
|
|
bool MipsSubtarget::DspWarningPrinted = false;
|
|
|
|
bool MipsSubtarget::MSAWarningPrinted = false;
|
2018-07-05 03:26:31 +08:00
|
|
|
bool MipsSubtarget::VirtWarningPrinted = false;
|
|
|
|
bool MipsSubtarget::CRCWarningPrinted = false;
|
|
|
|
bool MipsSubtarget::GINVWarningPrinted = false;
|
2018-01-23 00:43:30 +08:00
|
|
|
|
2017-08-12 02:35:19 +08:00
|
|
|
void MipsSubtarget::anchor() {}
|
2011-12-20 10:50:00 +08:00
|
|
|
|
2017-05-23 23:00:26 +08:00
|
|
|
MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS,
|
2017-08-15 05:49:38 +08:00
|
|
|
bool little, const MipsTargetMachine &TM,
|
[Alignment][NFC] Use Align for TargetFrameLowering/Subtarget
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68993
llvm-svn: 375084
2019-10-17 15:49:39 +08:00
|
|
|
MaybeAlign StackAlignOverride)
|
2015-09-16 00:17:27 +08:00
|
|
|
: MipsGenSubtargetInfo(TT, CPU, FS), MipsArchVersion(MipsDefault),
|
|
|
|
IsLittle(little), IsSoftFloat(false), IsSingleFloat(false), IsFPXX(false),
|
2019-01-28 22:59:30 +08:00
|
|
|
NoABICalls(false), Abs2008(false), IsFP64bit(false), UseOddSPReg(true),
|
2015-09-16 00:17:27 +08:00
|
|
|
IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false), HasCnMips(false),
|
2019-11-05 06:12:10 +08:00
|
|
|
HasCnMipsP(false), HasMips3_32(false), HasMips3_32r2(false),
|
|
|
|
HasMips4_32(false), HasMips4_32r2(false), HasMips5_32r2(false),
|
|
|
|
InMips16Mode(false), InMips16HardFloat(Mips16HardFloat),
|
|
|
|
InMicroMipsMode(false), HasDSP(false), HasDSPR2(false), HasDSPR3(false),
|
|
|
|
AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false),
|
|
|
|
UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(false),
|
|
|
|
HasMT(false), HasCRC(false), HasVirt(false), HasGINV(false),
|
|
|
|
UseIndirectJumpsHazard(false), StackAlignOverride(StackAlignOverride),
|
|
|
|
TM(TM), TargetTriple(TT), TSInfo(),
|
|
|
|
InstrInfo(
|
|
|
|
MipsInstrInfo::create(initializeSubtargetDependencies(CPU, FS, TM))),
|
2014-07-19 07:33:47 +08:00
|
|
|
FrameLowering(MipsFrameLowering::create(*this)),
|
2015-01-09 02:18:57 +08:00
|
|
|
TLInfo(MipsTargetLowering::create(TM, *this)) {
|
2013-11-19 20:20:17 +08:00
|
|
|
|
2014-11-11 19:43:55 +08:00
|
|
|
if (MipsArchVersion == MipsDefault)
|
|
|
|
MipsArchVersion = Mips32;
|
|
|
|
|
2014-12-12 23:16:46 +08:00
|
|
|
// Don't even attempt to generate code for MIPS-I and MIPS-V. They have not
|
|
|
|
// been tested and currently exist for the integrated assembler only.
|
2014-05-08 00:25:22 +08:00
|
|
|
if (MipsArchVersion == Mips1)
|
|
|
|
report_fatal_error("Code generation for MIPS-I is not implemented", false);
|
|
|
|
if (MipsArchVersion == Mips5)
|
|
|
|
report_fatal_error("Code generation for MIPS-V is not implemented", false);
|
|
|
|
|
2011-09-21 10:45:29 +08:00
|
|
|
// Check if Architecture and ABI are compatible.
|
2016-06-03 18:38:09 +08:00
|
|
|
assert(((!isGP64bit() && isABI_O32()) ||
|
2014-03-28 00:42:17 +08:00
|
|
|
(isGP64bit() && (isABI_N32() || isABI_N64()))) &&
|
2011-09-21 10:45:29 +08:00
|
|
|
"Invalid Arch & ABI pair.");
|
|
|
|
|
2013-09-27 18:08:31 +08:00
|
|
|
if (hasMSA() && !isFP64bit())
|
|
|
|
report_fatal_error("MSA requires a 64-bit FPU register file (FR=1 mode). "
|
|
|
|
"See -mattr=+fp64.",
|
|
|
|
false);
|
|
|
|
|
2019-07-09 23:48:16 +08:00
|
|
|
if (isFP64bit() && !hasMips64() && hasMips32() && !hasMips32r2())
|
|
|
|
report_fatal_error(
|
|
|
|
"FPU with 64-bit registers is not available on MIPS32 pre revision 2. "
|
|
|
|
"Use -mcpu=mips32r2 or greater.");
|
|
|
|
|
2014-07-10 21:38:23 +08:00
|
|
|
if (!isABI_O32() && !useOddSPReg())
|
2014-07-14 21:08:14 +08:00
|
|
|
report_fatal_error("-mattr=+nooddspreg requires the O32 ABI.", false);
|
2014-07-10 21:38:23 +08:00
|
|
|
|
2014-07-14 17:40:29 +08:00
|
|
|
if (IsFPXX && (isABI_N32() || isABI_N64()))
|
|
|
|
report_fatal_error("FPXX is not permitted for the N32/N64 ABI's.", false);
|
|
|
|
|
2017-12-11 19:21:40 +08:00
|
|
|
if (hasMips64r6() && InMicroMipsMode)
|
|
|
|
report_fatal_error("microMIPS64R6 is not supported", false);
|
|
|
|
|
2018-06-20 00:05:44 +08:00
|
|
|
if (!isABI_O32() && InMicroMipsMode)
|
|
|
|
report_fatal_error("microMIPS64 is not supported.", false);
|
2018-02-21 08:06:53 +08:00
|
|
|
|
|
|
|
if (UseIndirectJumpsHazard) {
|
|
|
|
if (InMicroMipsMode)
|
|
|
|
report_fatal_error(
|
|
|
|
"cannot combine indirect jumps with hazard barriers and microMIPS");
|
|
|
|
if (!hasMips32r2())
|
|
|
|
report_fatal_error(
|
|
|
|
"indirect jumps with hazard barriers requires MIPS32R2 or later");
|
|
|
|
}
|
2019-01-28 22:59:30 +08:00
|
|
|
if (inAbs2008Mode() && hasMips32() && !hasMips32r2()) {
|
|
|
|
report_fatal_error("IEEE 754-2008 abs.fmt is not supported for the given "
|
|
|
|
"architecture.",
|
|
|
|
false);
|
|
|
|
}
|
|
|
|
|
2014-05-09 17:46:21 +08:00
|
|
|
if (hasMips32r6()) {
|
|
|
|
StringRef ISA = hasMips64r6() ? "MIPS64r6" : "MIPS32r6";
|
|
|
|
|
|
|
|
assert(isFP64bit());
|
|
|
|
assert(isNaN2008());
|
2019-01-28 22:59:30 +08:00
|
|
|
assert(inAbs2008Mode());
|
2014-05-09 17:46:21 +08:00
|
|
|
if (hasDSP())
|
|
|
|
report_fatal_error(ISA + " is not compatible with the DSP ASE", false);
|
|
|
|
}
|
|
|
|
|
2016-06-28 22:33:28 +08:00
|
|
|
if (NoABICalls && TM.isPositionIndependent())
|
2014-11-06 21:20:12 +08:00
|
|
|
report_fatal_error("position-independent code requires '-mabicalls'");
|
|
|
|
|
2017-01-27 19:36:52 +08:00
|
|
|
if (isABI_N64() && !TM.isPositionIndependent() && !hasSym32())
|
|
|
|
NoABICalls = true;
|
|
|
|
|
2012-08-22 11:18:13 +08:00
|
|
|
// Set UseSmallSection.
|
2014-11-06 21:20:12 +08:00
|
|
|
UseSmallSection = GPOpt;
|
|
|
|
if (!NoABICalls && GPOpt) {
|
|
|
|
errs() << "warning: cannot use small-data accesses for '-mabicalls'"
|
|
|
|
<< "\n";
|
|
|
|
UseSmallSection = false;
|
|
|
|
}
|
2018-01-23 00:43:30 +08:00
|
|
|
|
|
|
|
if (hasDSPR2() && !DspWarningPrinted) {
|
|
|
|
if (hasMips64() && !hasMips64r2()) {
|
|
|
|
errs() << "warning: the 'dspr2' ASE requires MIPS64 revision 2 or "
|
|
|
|
<< "greater\n";
|
|
|
|
DspWarningPrinted = true;
|
|
|
|
} else if (hasMips32() && !hasMips32r2()) {
|
|
|
|
errs() << "warning: the 'dspr2' ASE requires MIPS32 revision 2 or "
|
|
|
|
<< "greater\n";
|
|
|
|
DspWarningPrinted = true;
|
|
|
|
}
|
|
|
|
} else if (hasDSP() && !DspWarningPrinted) {
|
|
|
|
if (hasMips64() && !hasMips64r2()) {
|
|
|
|
errs() << "warning: the 'dsp' ASE requires MIPS64 revision 2 or "
|
|
|
|
<< "greater\n";
|
|
|
|
DspWarningPrinted = true;
|
|
|
|
} else if (hasMips32() && !hasMips32r2()) {
|
|
|
|
errs() << "warning: the 'dsp' ASE requires MIPS32 revision 2 or "
|
|
|
|
<< "greater\n";
|
|
|
|
DspWarningPrinted = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-05 03:26:31 +08:00
|
|
|
StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32";
|
|
|
|
|
|
|
|
if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) {
|
|
|
|
errs() << "warning: the 'msa' ASE requires " << ArchName
|
|
|
|
<< " revision 5 or greater\n";
|
|
|
|
MSAWarningPrinted = true;
|
|
|
|
}
|
|
|
|
if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) {
|
|
|
|
errs() << "warning: the 'virt' ASE requires " << ArchName
|
|
|
|
<< " revision 5 or greater\n";
|
|
|
|
VirtWarningPrinted = true;
|
|
|
|
}
|
|
|
|
if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) {
|
|
|
|
errs() << "warning: the 'crc' ASE requires " << ArchName
|
|
|
|
<< " revision 6 or greater\n";
|
|
|
|
CRCWarningPrinted = true;
|
|
|
|
}
|
|
|
|
if (!hasMips32r6() && hasGINV() && !GINVWarningPrinted) {
|
|
|
|
errs() << "warning: the 'ginv' ASE requires " << ArchName
|
|
|
|
<< " revision 6 or greater\n";
|
|
|
|
GINVWarningPrinted = true;
|
2018-01-23 00:43:30 +08:00
|
|
|
}
|
2018-02-23 19:06:40 +08:00
|
|
|
|
|
|
|
CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering()));
|
|
|
|
Legalizer.reset(new MipsLegalizerInfo(*this));
|
|
|
|
|
|
|
|
auto *RBI = new MipsRegisterBankInfo(*getRegisterInfo());
|
|
|
|
RegBankInfo.reset(RBI);
|
|
|
|
InstSelector.reset(createMipsInstructionSelector(
|
|
|
|
*static_cast<const MipsTargetMachine *>(&TM), *this, *RBI));
|
2007-06-06 15:42:06 +08:00
|
|
|
}
|
2012-03-28 08:24:17 +08:00
|
|
|
|
2016-06-28 22:33:28 +08:00
|
|
|
bool MipsSubtarget::isPositionIndependent() const {
|
|
|
|
return TM.isPositionIndependent();
|
|
|
|
}
|
|
|
|
|
2014-07-16 06:39:58 +08:00
|
|
|
/// This overrides the PostRAScheduler bit in the SchedModel for any CPU.
|
2015-06-13 11:42:16 +08:00
|
|
|
bool MipsSubtarget::enablePostRAScheduler() const { return true; }
|
2014-07-16 06:39:58 +08:00
|
|
|
|
|
|
|
void MipsSubtarget::getCriticalPathRCs(RegClassVector &CriticalPathRCs) const {
|
2012-03-28 08:24:17 +08:00
|
|
|
CriticalPathRCs.clear();
|
2017-08-12 02:35:19 +08:00
|
|
|
CriticalPathRCs.push_back(isGP64bit() ? &Mips::GPR64RegClass
|
|
|
|
: &Mips::GPR32RegClass);
|
2014-07-16 06:39:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
CodeGenOpt::Level MipsSubtarget::getOptLevelToEnablePostRAScheduler() const {
|
|
|
|
return CodeGenOpt::Aggressive;
|
2012-03-28 08:24:17 +08:00
|
|
|
}
|
2013-04-10 03:46:01 +08:00
|
|
|
|
2014-07-03 08:10:24 +08:00
|
|
|
MipsSubtarget &
|
|
|
|
MipsSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS,
|
2015-01-09 02:18:57 +08:00
|
|
|
const TargetMachine &TM) {
|
2015-09-16 00:17:27 +08:00
|
|
|
std::string CPUName = MIPS_MC::selectMipsCPU(TM.getTargetTriple(), CPU);
|
2015-02-18 08:55:06 +08:00
|
|
|
|
2014-07-02 09:14:43 +08:00
|
|
|
// Parse features string.
|
|
|
|
ParseSubtargetFeatures(CPUName, FS);
|
|
|
|
// Initialize scheduling itinerary for the specified CPU.
|
|
|
|
InstrItins = getInstrItineraryForCPU(CPUName);
|
2014-07-03 08:10:24 +08:00
|
|
|
|
2015-05-07 18:29:52 +08:00
|
|
|
if (InMips16Mode && !IsSoftFloat)
|
2014-07-03 08:10:24 +08:00
|
|
|
InMips16HardFloat = true;
|
|
|
|
|
2017-08-15 05:49:38 +08:00
|
|
|
if (StackAlignOverride)
|
[Alignment][NFC] Use Align for TargetFrameLowering/Subtarget
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68993
llvm-svn: 375084
2019-10-17 15:49:39 +08:00
|
|
|
stackAlignment = *StackAlignOverride;
|
2017-08-15 05:49:38 +08:00
|
|
|
else if (isABI_N32() || isABI_N64())
|
[Alignment][NFC] Use Align for TargetFrameLowering/Subtarget
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68993
llvm-svn: 375084
2019-10-17 15:49:39 +08:00
|
|
|
stackAlignment = Align(16);
|
2017-08-15 05:49:38 +08:00
|
|
|
else {
|
|
|
|
assert(isABI_O32() && "Unknown ABI for stack alignment!");
|
[Alignment][NFC] Use Align for TargetFrameLowering/Subtarget
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68993
llvm-svn: 375084
2019-10-17 15:49:39 +08:00
|
|
|
stackAlignment = Align(8);
|
2017-08-15 05:49:38 +08:00
|
|
|
}
|
|
|
|
|
2014-07-02 09:14:43 +08:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2013-10-28 05:57:36 +08:00
|
|
|
bool MipsSubtarget::useConstantIslands() {
|
2018-05-14 20:53:11 +08:00
|
|
|
LLVM_DEBUG(dbgs() << "use constant islands " << Mips16ConstantIslands
|
|
|
|
<< "\n");
|
2013-10-28 05:57:36 +08:00
|
|
|
return Mips16ConstantIslands;
|
|
|
|
}
|
2014-07-19 06:34:20 +08:00
|
|
|
|
|
|
|
Reloc::Model MipsSubtarget::getRelocationModel() const {
|
2015-01-09 02:18:57 +08:00
|
|
|
return TM.getRelocationModel();
|
2014-07-19 06:34:20 +08:00
|
|
|
}
|
2015-01-27 01:33:46 +08:00
|
|
|
|
|
|
|
bool MipsSubtarget::isABI_N64() const { return getABI().IsN64(); }
|
|
|
|
bool MipsSubtarget::isABI_N32() const { return getABI().IsN32(); }
|
|
|
|
bool MipsSubtarget::isABI_O32() const { return getABI().IsO32(); }
|
|
|
|
const MipsABIInfo &MipsSubtarget::getABI() const { return TM.getABI(); }
|
2018-02-23 19:06:40 +08:00
|
|
|
|
|
|
|
const CallLowering *MipsSubtarget::getCallLowering() const {
|
|
|
|
return CallLoweringInfo.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
const LegalizerInfo *MipsSubtarget::getLegalizerInfo() const {
|
|
|
|
return Legalizer.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
const RegisterBankInfo *MipsSubtarget::getRegBankInfo() const {
|
|
|
|
return RegBankInfo.get();
|
|
|
|
}
|
|
|
|
|
2019-08-13 14:26:59 +08:00
|
|
|
InstructionSelector *MipsSubtarget::getInstructionSelector() const {
|
2018-02-23 19:06:40 +08:00
|
|
|
return InstSelector.get();
|
|
|
|
}
|