qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4 18/71] sh4: convert to cpu_halted


From: Alex Bennée
Subject: Re: [Qemu-devel] [RFC v4 18/71] sh4: convert to cpu_halted
Date: Wed, 31 Oct 2018 13:54:14 +0000
User-agent: mu4e 1.1.0; emacs 26.1.50

Emilio G. Cota <address@hidden> writes:

> Cc: Aurelien Jarno <address@hidden>
> Reviewed-by: Richard Henderson <address@hidden>
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
>  target/sh4/op_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
> index 4f825bae5a..57cc363ccc 100644
> --- a/target/sh4/op_helper.c
> +++ b/target/sh4/op_helper.c
> @@ -105,7 +105,7 @@ void helper_sleep(CPUSH4State *env)
>  {
>      CPUState *cs = CPU(sh_env_get_cpu(env));
>
> -    cs->halted = 1;
> +    cpu_halted_set(cs, 1);

Looks good:

Reviewed-by: Alex Bennée <address@hidden>

>      env->in_sleep = 1;

I wonder if you could drop env->in_sleep from CPUSH4State?
The test in superh_cpu_do_interrupt:

        if (do_irq && !env->in_sleep) {
            return; /* masked */
        }
    }
    env->in_sleep = 0;

maybe be simplified is we cpu_set_halted(cs, 0) when servicing a
delivered irq?

>      raise_exception(env, EXCP_HLT, 0);
>  }


--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]