summaryrefslogtreecommitdiff
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-06-16 13:25:35 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-06-16 13:25:35 +0000
commitdfcd461d620acb306ee34f4d78c4644fafa861db (patch)
tree7f22b5b7ac160105bc05972b9a7280151ba55d17 /lib/Target/Mips
parent77ae274ae7fb3ca1fe26147a64efd323e59fbd8c (diff)
downloadllvm-dfcd461d620acb306ee34f4d78c4644fafa861db.tar.gz
llvm-dfcd461d620acb306ee34f4d78c4644fafa861db.tar.bz2
llvm-dfcd461d620acb306ee34f4d78c4644fafa861db.tar.xz
[mips][mips64r6] ssnop is deprecated on MIPS32r6/MIPS64r6
Summary: Depends on D4120 Reviewers: jkolek, zoran.jovanovic, vmedic Reviewed By: zoran.jovanovic, vmedic Differential Revision: http://reviews.llvm.org/D4121 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/AsmParser/MipsAsmParser.cpp14
-rw-r--r--lib/Target/Mips/Mips32r6InstrInfo.td1
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index b3018c9602..3133a51b3f 100644
--- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -176,6 +176,12 @@ class MipsAsmParser : public MCTargetAsmParser {
bool hasMips4() const { return STI.getFeatureBits() & Mips::FeatureMips4; }
bool hasMips32() const { return STI.getFeatureBits() & Mips::FeatureMips32; }
+ bool hasMips32r6() const {
+ return STI.getFeatureBits() & Mips::FeatureMips32r6;
+ }
+ bool hasMips64r6() const {
+ return STI.getFeatureBits() & Mips::FeatureMips64r6;
+ }
bool parseRegister(unsigned &RegNum);
@@ -905,6 +911,14 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
}
}
+ // SSNOP is deprecated on MIPS32r6/MIPS64r6
+ // We still accept it but it is a normal nop.
+ if (hasMips32r6() && Inst.getOpcode() == Mips::SSNOP) {
+ std::string ISA = hasMips64r6() ? "MIPS64r6" : "MIPS32r6";
+ Warning(IDLoc, "ssnop is deprecated for " + ISA + " and is equivalent to a "
+ "nop instruction");
+ }
+
if (MCID.hasDelaySlot() && Options.isReorder()) {
// If this instruction has a delay slot and .set reorder is active,
// emit a NOP after it.
diff --git a/lib/Target/Mips/Mips32r6InstrInfo.td b/lib/Target/Mips/Mips32r6InstrInfo.td
index cc0a595f1c..47dafcd296 100644
--- a/lib/Target/Mips/Mips32r6InstrInfo.td
+++ b/lib/Target/Mips/Mips32r6InstrInfo.td
@@ -14,7 +14,6 @@
include "Mips32r6InstrFormats.td"
// Notes about removals/changes from MIPS32r6:
-// Unclear: ssnop
// Reencoded: jr -> jalr
// Reencoded: jr.hb -> jalr.hb
// Reencoded: sdbbp