Le 12/08/2015 07:12, Richard Henderson a écrit :
> On 08/09/2015 01:13 PM, Laurent Vivier wrote:
>> @@ -798,9 +796,9 @@ void HELPER(mac_set_flags)(CPUM68KState *env,
>
>> @@ -1706,16 +1745,18 @@ DISAS_INSN(branch)
>> /* bsr */
>> gen_push(s, tcg_const_i32(s->pc));
>> }
>> - gen_flush_cc_op(s);
>> if (op > 1) {
>> /* Bcc */
>> l1 = gen_new_label();
>> gen_jmpcc(s, ((insn >> 8) & 0xf) ^ 1, l1);
>> + update_cc_op(s);
>> gen_jmp_tb(s, 1, base + offset);
>> gen_set_label(l1);
>> + update_cc_op(s);
>> gen_jmp_tb(s, 0, s->pc);
>
> Ideally you'd do this only once, before the jmpcc.
This breaks something.
I think we can't do update_cc_op() before gen_jmpcc() because
gen_jmpcc() calls gen_flush_flags().
Laurent