Richard Henderson writes:

> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
<snip>
> +void m68k_cpu_exec_enter(CPUState *cs)
> +{
> +    M68kCPU *cpu = M68K_CPU(cs);
> +    CPUM68KState *env = &cpu->env;
> +
> +    env->cc_op = CC_OP_FLAGS;
> +    env->cc_dest = env->sr & 0xf;
> +    env->cc_x = (env->sr >> 4) & 1;
> +}
> +
> +void m68k_cpu_exec_exit(CPUState *cs)
> +{
> +    M68kCPU *cpu = M68K_CPU(cs);
> +    CPUM68KState *env = &cpu->env;
> +
> +    cpu_m68k_flush_flags(env, env->cc_op);
> +    env->cc_op = CC_OP_FLAGS;
> +    env->sr = (env->sr & 0xffe0) | env->cc_dest | (env->cc_x << 4);
> +}

It would have been nice to replace the magic numbers with some define's
but seeing as the changes are mechanical so far best not get too fancy
in this series ;-)

Reviewed-by: Alex Bennée <alex.ben...@linaro.org>

-- 
Alex Bennée

Reply via email to