From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE7Z7-0004uU-L5 for qemu-devel@nongnu.org; Sun, 03 Aug 2014 22:00:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XE7Yy-0006IB-Dv for qemu-devel@nongnu.org; Sun, 03 Aug 2014 21:59:57 -0400 Received: from mail-qa0-x236.google.com ([2607:f8b0:400d:c00::236]:43222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XE7Yy-0006Hz-9y for qemu-devel@nongnu.org; Sun, 03 Aug 2014 21:59:48 -0400 Received: by mail-qa0-f54.google.com with SMTP id k15so6308788qaq.13 for ; Sun, 03 Aug 2014 18:59:47 -0700 (PDT) Date: Mon, 4 Aug 2014 11:57:20 +1000 From: "Edgar E. Iglesias" Message-ID: <20140804015720.GT13735@toto> References: <1402994746-8328-1-git-send-email-edgar.iglesias@gmail.com> <1402994746-8328-11-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 10/16] target-arm: Break out exception masking to a separate func List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Rob Herring , Peter Crosthwaite , Fabian Aggeler , QEMU Developers , Alexander Graf , Blue Swirl , John Williams , Greg Bellows , Paolo Bonzini , Alex =?iso-8859-1?Q?Benn=E9e?= , Christoffer Dall , Richard Henderson On Fri, Aug 01, 2014 at 02:51:44PM +0100, Peter Maydell wrote: > On 17 June 2014 09:45, Edgar E. Iglesias 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