From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LtHuo-0004Y5-DY for qemu-devel@nongnu.org; Mon, 13 Apr 2009 04:53:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LtHun-0004Xr-Es for qemu-devel@nongnu.org; Mon, 13 Apr 2009 04:53:18 -0400 Received: from [199.232.76.173] (port=44510 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtHun-0004Xm-3B for qemu-devel@nongnu.org; Mon, 13 Apr 2009 04:53:17 -0400 Received: from savannah.gnu.org ([199.232.41.3]:55591 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LtHum-0008BC-Ng for qemu-devel@nongnu.org; Mon, 13 Apr 2009 04:53:16 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LtHuj-0002zG-3Y for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:53:13 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LtHui-0002zC-LM for qemu-devel@nongnu.org; Mon, 13 Apr 2009 08:53:12 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 13 Apr 2009 08:53:12 +0000 Subject: [Qemu-devel] [7096] target-mips: fix commits 7040 and 7042 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7096 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7096 Author: aurel32 Date: 2009-04-13 08:53:12 +0000 (Mon, 13 Apr 2009) Log Message: ----------- target-mips: fix commits 7040 and 7042 CPU state should also be saved for helpers that in fine call cpu_unlink_tb(). Reported by Stefan Weil. Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-mips/translate.c Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2009-04-12 08:32:45 UTC (rev 7095) +++ trunk/target-mips/translate.c 2009-04-13 08:53:12 UTC (rev 7096) @@ -3697,6 +3697,7 @@ case 12: switch (sel) { case 0: + save_cpu_state(ctx, 1); gen_helper_mtc0_status(t0); /* BS_STOP isn't good enough here, hflags may have changed. */ gen_save_pc(ctx->pc + 4); @@ -3731,6 +3732,7 @@ case 13: switch (sel) { case 0: + save_cpu_state(ctx, 1); gen_helper_mtc0_cause(t0); rn = "Cause"; break; @@ -4861,6 +4863,7 @@ case 12: switch (sel) { case 0: + save_cpu_state(ctx, 1); gen_helper_mtc0_status(t0); /* BS_STOP isn't good enough here, hflags may have changed. */ gen_save_pc(ctx->pc + 4); @@ -4895,14 +4898,13 @@ case 13: switch (sel) { case 0: + save_cpu_state(ctx, 1); gen_helper_mtc0_cause(t0); rn = "Cause"; break; default: goto die; } - /* Stop translation as we may have switched the execution mode */ - ctx->bstate = BS_STOP; break; case 14: switch (sel) { @@ -7972,6 +7974,7 @@ break; case OPC_DI: check_insn(env, ctx, ISA_MIPS32R2); + save_cpu_state(ctx, 1); gen_helper_di(t0); gen_store_gpr(t0, rt); /* Stop translation as we may have switched the execution mode */ @@ -7979,6 +7982,7 @@ break; case OPC_EI: check_insn(env, ctx, ISA_MIPS32R2); + save_cpu_state(ctx, 1); gen_helper_ei(t0); gen_store_gpr(t0, rt); /* Stop translation as we may have switched the execution mode */