[mips][microMIPS] Implement CodeGen support for SLL16 and SRL16 instructions
[oota-llvm.git] / lib / Target / Mips / AsmParser / MipsAsmParser.cpp
index 0a2fce111d141eee6386eb4389e5618fd5e0895b..6e8639c0914f775d5b17a2916c18866a932b733f 100644 (file)
@@ -1161,6 +1161,15 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
             Imm % 4 != 0)
           return Error(IDLoc, "immediate operand value out of range");
         break;
+      case Mips::SLL16_MM:
+      case Mips::SRL16_MM:
+        Opnd = Inst.getOperand(2);
+        if (!Opnd.isImm())
+          return Error(IDLoc, "expected immediate operand kind");
+        Imm = Opnd.getImm();
+        if (Imm < 1 || Imm > 8)
+          return Error(IDLoc, "immediate operand value out of range");
+        break;
     }
   }