From: Igor Kovalenko Date: Tue, 28 Jul 2009 21:32:23 +0000 (+0400) Subject: sparc64 flush pending conditional evaluations before exposing cpu state X-Git-Tag: v0.11.0-rc2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9369a384b10c934daab9de64fbff80b3659d837;p=thirdparty%2Fqemu.git sparc64 flush pending conditional evaluations before exposing cpu state 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 Signed-off-by: Anthony Liguori --- diff --git a/target-sparc/translate.c b/target-sparc/translate.c index a372ecab1b8..d7894f1644f 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(); + } }