[PATCH] D114581: [RISCV] Fix a crash in decoding LMUL in VTYPE

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 26 20:58:43 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp:418
+// of such corner cases.
+static bool isIllegalInstruction(unsigned InstCode) {
+  if ((InstCode & 0x7f) == 0x57 && (InstCode & 0x7000) == 0x7000 &&
----------------
I don't think this is the right way to do this. I think the right way is to change the DecoderMethod for VTypeIOp to a new function instead of `decodeUImmOperand<11>`. The new decoder function can return MCDisassembler::Fail;


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

https://reviews.llvm.org/D114581



More information about the llvm-commits mailing list