]> git.proxmox.com Git - qemu.git/commitdiff
sparc64 flush pending conditional evaluations before exposing cpu state
authorIgor Kovalenko <igor.v.kovalenko@gmail.com>
Tue, 28 Jul 2009 21:32:23 +0000 (01:32 +0400)
committerBlue Swirl <blauwirbel@gmail.com>
Fri, 31 Jul 2009 06:48:47 +0000 (06:48 +0000)
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

target-sparc/translate.c

index a372ecab1b8f7e95664577f567d24f6a792a2ef6..d7894f1644f0cfb899e525ddcb6db6dd5a36d956 100644 (file)
@@ -4908,4 +4908,9 @@ void gen_pc_load(CPUState *env, TranslationBlock *tb,
     } else {
         env->npc = npc;
     }
+
+    /* flush pending conditional evaluations before exposing cpu state */
+    if (CC_OP != CC_OP_FLAGS) {
+        helper_compute_psr();
+    }
 }