Commit 14ed7adc1b14597741ac6f9bb64ca23ac26b3f2a

Authored by Igor Kovalenko
Committed by Blue Swirl
1 parent bfdb3629

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
Showing 1 changed file with 5 additions and 0 deletions
target-sparc/translate.c
... ... @@ -4908,4 +4908,9 @@ void gen_pc_load(CPUState *env, TranslationBlock *tb,
4908 4908 } else {
4909 4909 env->npc = npc;
4910 4910 }
  4911 +
  4912 + /* flush pending conditional evaluations before exposing cpu state */
  4913 + if (CC_OP != CC_OP_FLAGS) {
  4914 + helper_compute_psr();
  4915 + }
4911 4916 }
... ...