Received: from eggs.gnu.org ([2001:4830:134:3::10]:55389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFmFK-0006rQ-GG for qemu-devel@nongnu.org; Mon, 26 Jan 2015 11:10:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFmFH-00083q-BN for qemu-devel@nongnu.org; Mon, 26 Jan 2015 11:10:38 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:25137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFmFH-00083f-4b for qemu-devel@nongnu.org; Mon, 26 Jan 2015 11:10:35 -0500 From: Leon Alrae Date: Mon, 26 Jan 2015 16:10:26 +0000 Message-ID: <1422288626-6595-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] target-mips: fix CP0.BadVAddr by stopping translation on Address error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net BadVAddr is supposed to capture the most recent address that caused the exception. Currently this is not happening as translation is not stopped and BadVAddr is updated with subsequent addresses. Signed-off-by: Leon Alrae --- target-mips/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index f33c10c..635192c 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -18438,6 +18438,7 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx) if (ctx->pc & 0x3) { env->CP0_BadVAddr = ctx->pc; generate_exception_err(ctx, EXCP_AdEL, EXCP_INST_NOTAVAIL); + ctx->bstate = BS_STOP; return; } -- 2.1.0