mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target-m68k: fix gen_flush_flags()
gen_flush_flags() is setting unconditionally cc_op_synced to 1 and s->cc_op to CC_OP_FLAGS, whereas env->cc_op can be set to something else by a previous tcg fragment. We fix that by not setting cc_op_synced to 1 (except for gen_helper_flush_flags() that updates env->cc_op) FIX: https://github.com/vivier/qemu-m68k/issues/19 Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-Id: <1484332593-16782-3-git-send-email-laurent@vivier.eu>
This commit is contained in:
parent
fe53c2be8c
commit
695576db2d
1 changed files with 2 additions and 1 deletions
|
@ -595,18 +595,19 @@ static void gen_flush_flags(DisasContext *s)
|
||||||
|
|
||||||
case CC_OP_DYNAMIC:
|
case CC_OP_DYNAMIC:
|
||||||
gen_helper_flush_flags(cpu_env, QREG_CC_OP);
|
gen_helper_flush_flags(cpu_env, QREG_CC_OP);
|
||||||
|
s->cc_op_synced = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
t0 = tcg_const_i32(s->cc_op);
|
t0 = tcg_const_i32(s->cc_op);
|
||||||
gen_helper_flush_flags(cpu_env, t0);
|
gen_helper_flush_flags(cpu_env, t0);
|
||||||
tcg_temp_free(t0);
|
tcg_temp_free(t0);
|
||||||
|
s->cc_op_synced = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note that flush_flags also assigned to env->cc_op. */
|
/* Note that flush_flags also assigned to env->cc_op. */
|
||||||
s->cc_op = CC_OP_FLAGS;
|
s->cc_op = CC_OP_FLAGS;
|
||||||
s->cc_op_synced = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline TCGv gen_extend(TCGv val, int opsize, int sign)
|
static inline TCGv gen_extend(TCGv val, int opsize, int sign)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue