Skip to content

Commit 9427f0a

Browse files
authored
Merge pull request #1991 from apparentlymart/b-riscv-invalidinsn-pcadj
riscv: Invalid 32-bit instruction should not decrement pc
2 parents 96bf47d + ac1b374 commit 9427f0a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

qemu/target/riscv/translate.c

-1
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,6 @@ static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode)
769769
translator_lduw(tcg_ctx, env, ctx->base.pc_next + 2));
770770
ctx->pc_succ_insn = ctx->base.pc_next + 4;
771771
if (!decode_insn32(ctx, opcode32)) {
772-
ctx->pc_succ_insn = ctx->base.pc_next - 4;
773772
gen_exception_illegal(ctx);
774773
}
775774
}

0 commit comments

Comments
 (0)