qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Kovalenko <igor.v.kovalenko@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] sparc64 flush pending conditional evaluations before exposing cpu state
Date: Wed, 29 Jul 2009 01:32:23 +0400	[thread overview]
Message-ID: <b2fa41d60907281432p42ddf1ado173f2d400016ecc7@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

If translation block is interrupted by e.g. mmu exception
we need to compute conditional flags for inclusion into
saved cpu state. Otherwise after return from trap
conditional instructions would use stale psr/xcc data.

Signed-off-by: igor.v.kovalenko@gmail.com

-- 
Kind regards,
Igor V. Kovalenko

[-- Attachment #2: sparc64-flush-cc-op --]
[-- Type: application/octet-stream, Size: 456 bytes --]

Index: qemu-trunk/target-sparc/translate.c
===================================================================
--- qemu-trunk.orig/target-sparc/translate.c
+++ qemu-trunk/target-sparc/translate.c
@@ -4908,4 +4908,9 @@ void gen_pc_load(CPUState *env, Translat
     } else {
         env->npc = npc;
     }
+
+    /* flush pending conditional evaluations before exposing cpu state */
+    if (CC_OP != CC_OP_FLAGS) {
+        helper_compute_psr();
+    }
 }

                 reply	other threads:[~2009-07-28 21:32 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=b2fa41d60907281432p42ddf1ado173f2d400016ecc7@mail.gmail.com \
    --to=igor.v.kovalenko@gmail.com \
    --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).