qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [7096] target-mips: fix commits 7040 and 7042
Date: Mon, 13 Apr 2009 08:53:12 +0000	[thread overview]
Message-ID: <E1LtHui-0002zC-LM@cvs.savannah.gnu.org> (raw)

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 <aurelien@aurel32.net>

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 */

                 reply	other threads:[~2009-04-13  8:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LtHui-0002zC-LM@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).