[mips] Removal of microMIPS64R6
All files and parts of files related to microMIPS4R6 are removed.
When target is microMIPS4R6, errors are printed.
This is LLVM part of patch.
Differential Revision: https://reviews.llvm.org/D35625
llvm-svn: 320350
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index 4db5e3c..345b081 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -512,6 +512,9 @@
IsLittleEndian = false;
else
IsLittleEndian = true;
+
+ if (getSTI().getCPU() == "mips64r6" && inMicroMipsMode())
+ report_fatal_error("microMIPS64R6 is not supported", false);
}
/// True if all of $fcc0 - $fcc7 exist for the current ISA.
@@ -1987,9 +1990,7 @@
case Mips::DDIV:
case Mips::DDIVU:
case Mips::DIVU_MMR6:
- case Mips::DDIVU_MM64R6:
case Mips::DIV_MMR6:
- case Mips::DDIV_MM64R6:
if (Inst.getOperand(SecondOp).getReg() == Mips::ZERO ||
Inst.getOperand(SecondOp).getReg() == Mips::ZERO_64) {
if (Inst.getOperand(FirstOp).getReg() == Mips::ZERO ||
@@ -5114,8 +5115,6 @@
return Match_Success;
case Mips::DATI:
case Mips::DAHI:
- case Mips::DATI_MM64R6:
- case Mips::DAHI_MM64R6:
if (static_cast<MipsOperand &>(*Operands[1])
.isValidForTie(static_cast<MipsOperand &>(*Operands[2])))
return Match_Success;
@@ -5128,7 +5127,6 @@
// As described by the MIPSR6 spec, daui must not use the zero operand for
// its source operand.
case Mips::DAUI:
- case Mips::DAUI_MM64R6:
if (Inst.getOperand(1).getReg() == Mips::ZERO ||
Inst.getOperand(1).getReg() == Mips::ZERO_64)
return Match_RequiresNoZeroRegister;
@@ -5201,8 +5199,7 @@
if (Inst.getOperand(0).getReg() == Inst.getOperand(1).getReg())
return Match_RequiresDifferentOperands;
return Match_Success;
- case Mips::DINS:
- case Mips::DINS_MM64R6: {
+ case Mips::DINS: {
assert(Inst.getOperand(2).isImm() && Inst.getOperand(3).isImm() &&
"Operands must be immediates for dins!");
const signed Pos = Inst.getOperand(2).getImm();
@@ -5212,9 +5209,7 @@
return Match_Success;
}
case Mips::DINSM:
- case Mips::DINSM_MM64R6:
- case Mips::DINSU:
- case Mips::DINSU_MM64R6: {
+ case Mips::DINSU: {
assert(Inst.getOperand(2).isImm() && Inst.getOperand(3).isImm() &&
"Operands must be immediates for dinsm/dinsu!");
const signed Pos = Inst.getOperand(2).getImm();
@@ -5223,8 +5218,7 @@
return Match_RequiresPosSizeRange33_64;
return Match_Success;
}
- case Mips::DEXT:
- case Mips::DEXT_MM64R6: {
+ case Mips::DEXT: {
assert(Inst.getOperand(2).isImm() && Inst.getOperand(3).isImm() &&
"Operands must be immediates for DEXTM!");
const signed Pos = Inst.getOperand(2).getImm();
@@ -5234,9 +5228,7 @@
return Match_Success;
}
case Mips::DEXTM:
- case Mips::DEXTU:
- case Mips::DEXTM_MM64R6:
- case Mips::DEXTU_MM64R6: {
+ case Mips::DEXTU: {
assert(Inst.getOperand(2).isImm() && Inst.getOperand(3).isImm() &&
"Operands must be immediates for dextm/dextu!");
const signed Pos = Inst.getOperand(2).getImm();
@@ -6794,6 +6786,9 @@
if (ArchFeatureName.empty())
return reportParseError("unsupported architecture");
+ if (ArchFeatureName == "mips64r6" && inMicroMipsMode())
+ return reportParseError("mips64r6 does not support microMIPS");
+
selectArch(ArchFeatureName);
getTargetStreamer().emitDirectiveSetArch(Arch);
return false;
@@ -7125,6 +7120,10 @@
Parser.eatToEndOfStatement();
return false;
} else if (Tok.getString() == "micromips") {
+ if (hasMips64r6()) {
+ Error(Tok.getLoc(), ".set micromips directive is not supported with MIPS64R6");
+ return false;
+ }
return parseSetFeature(Mips::FeatureMicroMips);
} else if (Tok.getString() == "mips0") {
return parseSetMips0Directive();
@@ -7157,6 +7156,10 @@
} else if (Tok.getString() == "mips64r5") {
return parseSetFeature(Mips::FeatureMips64r5);
} else if (Tok.getString() == "mips64r6") {
+ if (inMicroMipsMode()) {
+ Error(Tok.getLoc(), "MIPS64R6 is not supported with microMIPS");
+ return false;
+ }
return parseSetFeature(Mips::FeatureMips64r6);
} else if (Tok.getString() == "dsp") {
return parseSetFeature(Mips::FeatureDSP);