================ @@ -1655,6 +1667,10 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, return generateImmOutOfRangeError(Operands, ErrorInfo, 1, (1 << 5)); case Match_InvalidUImm5GE6Plus1: return generateImmOutOfRangeError(Operands, ErrorInfo, 6, (1 << 5)); + case Match_InvalidUImm5Slist: + return generateImmOutOfRangeError( + Operands, ErrorInfo, 0, (1 << 5) - 1, + "immediate must be one of: 0, 1, 2, 4, 8, 15, 16, 31 in the range "); ---------------- hchandel wrote:
Changed. Took ErrorLoc from other similar errors in the file. This new error message makes more sense. https://github.com/llvm/llvm-project/pull/132184 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits