]> granicus.if.org Git - llvm/commitdiff
[mips] handle UImm16_AltRelaxed match type
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Tue, 12 Sep 2017 21:43:33 +0000 (21:43 +0000)
committerPetar Jovanovic <petar.jovanovic@imgtec.com>
Tue, 12 Sep 2017 21:43:33 +0000 (21:43 +0000)
Currently, UImm16_AltRelaxed match type is not handled in
MatchAndEmitInstruction() function, which may result in
llvm_unreachable() behavior.
This patch adds necessary case for this match type.

Patch by Aleksandar Beserminji.

Differential Revision: https://reviews.llvm.org/D37682

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313077 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/AsmParser/MipsAsmParser.cpp

index 8716def6bd9b3a22e82c9e33ea537fcb6ad2fc96..9fcf917a8530540db90ee893b2bb37188af73ae7 100644 (file)
@@ -5122,6 +5122,7 @@ bool MipsAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
                  "expected 11-bit signed immediate");
   case Match_UImm16:
   case Match_UImm16_Relaxed:
+  case Match_UImm16_AltRelaxed:
     return Error(RefineErrorLoc(IDLoc, Operands, ErrorInfo),
                  "expected 16-bit unsigned immediate");
   case Match_SImm16: