[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2] target-mips: fix CP0.BadVAddr by stopping transl

From: Leon Alrae
Subject: [Qemu-devel] [PATCH v2] target-mips: fix CP0.BadVAddr by stopping translation on Address Error
Date: Mon, 16 Mar 2015 16:54:42 +0000

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

Signed-off-by: Leon Alrae <address@hidden>
* description update - make it clear that it is about instr. fetch (Maciej)
 target-mips/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index 9059bfd..0e2443a 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -18438,6 +18438,7 @@ static void decode_opc(CPUMIPSState *env, DisasContext 
     if (ctx->pc & 0x3) {
         env->CP0_BadVAddr = ctx->pc;
         generate_exception_err(ctx, EXCP_AdEL, EXCP_INST_NOTAVAIL);
+        ctx->bstate = BS_STOP;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]