From: Petar Jovanovic Date: Tue, 12 Sep 2017 21:43:33 +0000 (+0000) Subject: [mips] handle UImm16_AltRelaxed match type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfd98b8dcc694fbbcada03014246d424a2c99d3d;p=llvm [mips] handle UImm16_AltRelaxed match type 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 --- diff --git a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 8716def6bd9..9fcf917a853 100644 --- a/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -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: