[LoongArch] Handle out-fo-range uimm8 operands in LoongArchAsmParser
authorwanglei <wanglei@loongson.cn>
Thu, 18 May 2023 12:41:58 +0000 (20:41 +0800)
committerwanglei <wanglei@loongson.cn>
Fri, 19 May 2023 01:38:49 +0000 (09:38 +0800)
commit3b78065e3026de0d1ea4802cb6a4f35ebc687cdf
tree818afb18f0a3e46cc66eadd20b5b30e91cba15f0
parentb4fbc4bdbf58b9cecc9c66e8b8d97d3cebb5a976
[LoongArch] Handle out-fo-range uimm8 operands in LoongArchAsmParser

With this fix, when encountering an out-of-range uimm8 operand, the code
now triggers an appropriate error message, clearly indicating that the
immediate value must be an integer within the range of 0 to 255.
llvm/lib/Target/LoongArch/AsmParser/LoongArchAsmParser.cpp
llvm/test/MC/LoongArch/Basic/Privilege/invalid.s