diff --git a/src/isa/riscv64/exec/compute.c b/src/isa/riscv64/exec/compute.c index 6ea6bbc2ea23f4092d1623601d1f8508a5e21ced..85adbb11c0f1a9dc05cc583668c4aaff18292208 100644 --- a/src/isa/riscv64/exec/compute.c +++ b/src/isa/riscv64/exec/compute.c @@ -31,7 +31,8 @@ make_EHelper(sra) { make_EHelper(srl) { // the LSB of funct7 may be "1" due to the shift amount can be >= 32 - if ((decinfo.isa.instr.funct7 & ~0x1) == 32) { + // this rule is disabled when a compressed inst comes in + if ((decinfo.isa.instr.funct7 & ~0x1) == 32 && decinfo.isa.instr.opcode1_0 == 0x3) { exec_sra(pc); return; }