[VENTUS][fix] Modify the disassembly result of a compress instruction error

Modify the disassembly result of a compress instruction error.
This commit is contained in:
qinfan 2024-05-13 15:57:55 +08:00
parent 279251d31d
commit 408ed74df2
1 changed files with 3 additions and 1 deletions

View File

@ -384,7 +384,9 @@ DecodeStatus RISCVDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
DecodeStatus Result;
// It's a 32 bit instruction if bit 0 and 1 are 1.
if ((Bytes[0] & 0x3) == 0x3) {
// FIXME: Ventus does not support 16-bit instructions, but the judgment
// conditions here should be more perfect.
if (1) {
if (Bytes.size() < 4) {
Size = 0;
return MCDisassembler::Fail;