qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 14ed7ad] sparc64 flush pending conditional evalua


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 14ed7ad] sparc64 flush pending conditional evaluations beforeexposing cpu state
Date: Mon, 10 Aug 2009 21:48:01 -0000

From: Igor Kovalenko <address@hidden>

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: address@hidden

--
Kind regards,
Igor V. Kovalenko

diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index a372eca..d7894f1 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -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();
+    }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]