From 294cc5229a8d942e1ccd10788db270f5b0b6e8e1 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Mon, 14 Sep 2015 15:57:24 +0000 Subject: [PATCH] [mips] Unified the MipsMemSimm9GPRAsmOperand and MipsMemSimm9AsmOperand operands, NFC. Summary: These operands had the same purpose, however the MipsMemSimm9GPRAsmOperand operand was only for micromips32r6 and the MipsMemSimm9AsmOperand did not have a ParserMatchClass. Patch by Scott Egerton Reviewers: vkalintiris, dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12730 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247573 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 3 --- lib/Target/Mips/MicroMips32r6InstrInfo.td | 22 +-------------------- lib/Target/Mips/MipsInstrInfo.td | 9 +++++++++ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index a4b91939d0a..c0d23127849 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -944,9 +944,6 @@ public: return isMem() && dyn_cast(getMemOff()); } template bool isMemWithSimmOffset() const { - return isMem() && isConstantMemOff() && isInt(getConstantMemOff()); - } - template bool isMemWithSimmOffsetGPR() const { return isMem() && isConstantMemOff() && isInt(getConstantMemOff()) && getMemBase()->isGPRAsmReg(); } diff --git a/lib/Target/Mips/MicroMips32r6InstrInfo.td b/lib/Target/Mips/MicroMips32r6InstrInfo.td index dfe8e767b2b..001578cb67a 100644 --- a/lib/Target/Mips/MicroMips32r6InstrInfo.td +++ b/lib/Target/Mips/MicroMips32r6InstrInfo.td @@ -185,26 +185,6 @@ class CVT_S_D_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.d", 0, 0b1101101>; class CVT_S_W_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.w", 1, 0b1101101>; class CVT_S_L_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.l", 2, 0b1101101>; -//===----------------------------------------------------------------------===// -// -// Operand Definitions -// -//===----------------------------------------------------------------------===// - -def MipsMemSimm9GPRAsmOperand : AsmOperandClass { - let Name = "MemOffsetSimm9GPR"; - let SuperClasses = [MipsMemAsmOperand]; - let RenderMethod = "addMemOperands"; - let ParserMethod = "parseMemOperand"; - let PredicateMethod = "isMemWithSimmOffsetGPR<9>"; -} - -def mem_simm9gpr : mem_generic { - let MIOperandInfo = (ops ptr_rc, simm9); - let EncoderMethod = "getMemEncoding"; - let ParserMatchClass = MipsMemSimm9GPRAsmOperand; -} - //===----------------------------------------------------------------------===// // // Instruction Descriptions @@ -407,7 +387,7 @@ class SWE_MMR6_DESC_BASE; -class SWE_MMR6_DESC : SWE_MMR6_DESC_BASE<"swe", GPR32Opnd, mem_simm9gpr>; +class SWE_MMR6_DESC : SWE_MMR6_DESC_BASE<"swe", GPR32Opnd, mem_simm9>; /// Floating Point Instructions class FARITH_MMR6_DESC_BASE