qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is adde


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v10 01/10] target-avr: AVR cores support is added.
Date: Tue, 12 Jul 2016 10:19:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 07/06/2016 03:33 PM, Michael Rolnik wrote:
> +static bool avr_cpu_has_work(CPUState *cs)
> +{
> +    AVRCPU *cpu = AVR_CPU(cs);
> +    CPUAVRState *env = &cpu->env;
> +
> +    return      (cs->interrupt_request
> +                &   (CPU_INTERRUPT_HARD
> +                    | CPU_INTERRUPT_RESET))
> +            &&  cpu_interrupts_enabled(env);
> +}
> +static void avr_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb)
> +{
> +    AVRCPU      *cpu = AVR_CPU(cs);
> +    CPUAVRState *env = &cpu->env;
> +
> +    env->pc_w = tb->pc / 2;   /*  internally PC points to words   */
> +}

For the 4th time: missing spaces between functions.  Lots of them.  Please fix
them all, without me having to repeat myself a 5th time.

> +    bool            fullacc;/*  CPU/MEM if true MEM only otherwise  */

...

> +static inline void cpu_get_tb_cpu_state(CPUAVRState *env, target_ulong *pc,
> +                                target_ulong *cs_base, uint32_t *pflags)
> +{
> +    *pc = env->pc_w * 2;
> +    *cs_base = 0;
> +    *pflags = 0;
> +}

The fullacc bit needs to be reflected in *pflags here.  The way you are
accessing env->fullacc from translate*.c is invalid.


r~




reply via email to

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