qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception maskin


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception masking to a separate func
Date: Fri, 1 Aug 2014 14:51:44 +0100

On 17 June 2014 09:45, Edgar E. Iglesias <address@hidden> wrote:
>
> +static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx)
> +{
> +    CPUARMState *env = cs->env_ptr;
> +
> +    switch (excp_idx) {
> +    case EXCP_FIQ:
> +        return !(env->daif & PSTATE_F);
> +    case EXCP_IRQ:
> +        return ((IS_M(env) && env->regs[15] < 0xfffffff0)
> +                            || !(env->daif & PSTATE_I));
> +    default:
> +        g_assert_not_reached();
> +        break;

You don't need a break, we've just asserted that this isn't
reachable. (Conversely if it was possible to get past the
assert we'd be falling out of the function without returning
a value, so break is wrong either way. But "just don't
put in the break" is what we do elsewhere in target-arm.)

> +    }
> +}

thanks
-- PMM



reply via email to

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