mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 06:25:12 +00:00
target-mips: fix CP0.BadVAddr by stopping translation on Address Error
CP0.BadVAddr is supposed to capture the most recent virtual address that caused the exception. Currently this does not work correctly for unaligned instruction fetch as translation is not stopped and CP0.BadVAddr is updated with subsequent addresses. Backports commit 62c688693bf2f0355fc5bad5dcc59c1cd2a51f1a from qemu
This commit is contained in:
parent
6bd44fb70a
commit
cdc72c7db1
|
@ -18606,6 +18606,7 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx, bool *insn_need_pat
|
|||
if (ctx->pc & 0x3) {
|
||||
env->CP0_BadVAddr = ctx->pc;
|
||||
generate_exception_err(ctx, EXCP_AdEL, EXCP_INST_NOTAVAIL);
|
||||
ctx->bstate = BS_STOP;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue