diff options
author | Igor Kovalenko <igor.v.kovalenko@gmail.com> | 2009-07-29 01:32:23 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-07-31 06:48:47 +0000 |
commit | 14ed7adc1b14597741ac6f9bb64ca23ac26b3f2a (patch) | |
tree | 7cce0e4db45adca595ffa57c75072156d4f8fa5b /target-sparc/translate.c | |
parent | bfdb36293fb947ae4c30e24d00fb883a24ef88e5 (diff) |
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
Diffstat (limited to 'target-sparc/translate.c')
-rw-r--r-- | target-sparc/translate.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c index a372ecab1b..d7894f1644 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(); + } } |