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: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception masking to a separate func
Date: Mon, 4 Aug 2014 11:57:20 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Aug 01, 2014 at 02:51:44PM +0100, Peter Maydell wrote:
> 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.)

I've removed the break, thanks.


> 
> > +    }
> > +}
> 
> thanks
> -- PMM



reply via email to

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