Merge pull request #1991 from apparentlymart/b-riscv-invalidinsn-pcadj
riscv: Invalid 32-bit instruction should not decrement pc
This commit is contained in:
commit
9427f0a553
@ -769,7 +769,6 @@ static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode)
|
|||||||
translator_lduw(tcg_ctx, env, ctx->base.pc_next + 2));
|
translator_lduw(tcg_ctx, env, ctx->base.pc_next + 2));
|
||||||
ctx->pc_succ_insn = ctx->base.pc_next + 4;
|
ctx->pc_succ_insn = ctx->base.pc_next + 4;
|
||||||
if (!decode_insn32(ctx, opcode32)) {
|
if (!decode_insn32(ctx, opcode32)) {
|
||||||
ctx->pc_succ_insn = ctx->base.pc_next - 4;
|
|
||||||
gen_exception_illegal(ctx);
|
gen_exception_illegal(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user