Patchwork [010/147] target-s390: Fix BCR

login
register
mail settings
Submitter Richard Henderson
Date Sept. 27, 2012, 10:39 p.m.
Message ID <1348785610-23418-11-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/187544/
State New
Headers show

Comments

Richard Henderson - Sept. 27, 2012, 10:39 p.m.
There were are two exit paths for which we forgot to
copy s->cc_op back to the tcg register.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 target-s390x/translate.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index f0fadf2..3caf386 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -1212,6 +1212,7 @@  static void gen_bcr(DisasContext *s, uint32_t mask, TCGv_i64 target,
 
     if (mask == 0xf) {
         /* unconditional */
+        gen_update_cc_op(s);
         tcg_gen_mov_i64(psw_addr, target);
         tcg_gen_exit_tb(0);
     } else if (mask == 0) {
@@ -1223,6 +1224,7 @@  static void gen_bcr(DisasContext *s, uint32_t mask, TCGv_i64 target,
         tcg_gen_mov_i64(new_addr, target);
         skip = gen_new_label();
         gen_jcc(s, mask, skip);
+        gen_update_cc_op(s);
         tcg_gen_mov_i64(psw_addr, new_addr);
         tcg_temp_free_i64(new_addr);
         tcg_gen_exit_tb(0);