[PATCH] D110308: [RISCV] Add invalid match case for uimm2, uimm3 and uimm7

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 09:07:19 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1097
         "immediate must be non-zero in the range");
+  case Match_InvalidUImm7:
+    return generateImmOutOfRangeError(Operands, ErrorInfo, 0, (1 << 7) - 1);
----------------
Can you put this between UImm5 and SImm5 so that similar code is together. I think that's better than keeping UImm5 and SImm5 next to each other.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110308/new/

https://reviews.llvm.org/D110308



More information about the llvm-commits mailing list