From 987401c4d4461030e18983ff9fc1fee330d1965e Mon Sep 17 00:00:00 2001 From: James Hogan Date: Sun, 4 Mar 2018 01:25:18 -0500 Subject: [PATCH] target-mips: Don't stop on [d]mtc0 DESAVE/KScratch Writing to the MIPS DESAVE register (and now the KScratch registers) will stop translation, supposedly due to risk of execution mode switches. However these registers are basically RW scratch registers with no side effects so there is no risk of them triggering execution mode changes. Drop the bstate = BS_STOP for these registers for both mtc0 and dmtc0. Backports commit cb539fd241900f51de7d21244f7a55422ad0d40a from qemu --- qemu/target/mips/translate.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qemu/target/mips/translate.c b/qemu/target/mips/translate.c index 9cb5c10f..fda7e818 100644 --- a/qemu/target/mips/translate.c +++ b/qemu/target/mips/translate.c @@ -6472,8 +6472,6 @@ static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; default: goto cp0_unimplemented; @@ -7798,8 +7796,6 @@ static void gen_dmtc0(DisasContext *ctx, TCGv arg, int reg, int sel) default: goto cp0_unimplemented; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; default: goto cp0_unimplemented;