From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIiA-00054Y-6b for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:54:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEIi7-0007Ot-P1 for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:54:02 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIi7-0006mN-Hh for qemu-devel@nongnu.org; Mon, 04 Aug 2014 09:53:59 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XEIhd-0001BA-AY for qemu-devel@nongnu.org; Mon, 04 Aug 2014 14:53:29 +0100 From: Peter Maydell Date: Mon, 4 Aug 2014 14:53:26 +0100 Message-Id: <1407160408-4467-11-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> References: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 10/12] target-arm: Fix bit test in sp_el0_access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Stefan Weil Static code analyzers complain about a dubious & operation used for a boolean value. The code does not test the PSTATE_SP bit as it should. Cc: Peter Maydell Signed-off-by: Stefan Weil Message-id: 1406359601-25583-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index a7f82f3..d709285 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1853,7 +1853,7 @@ static uint64_t aa64_dczid_read(CPUARMState *env, const ARMCPRegInfo *ri) static CPAccessResult sp_el0_access(CPUARMState *env, const ARMCPRegInfo *ri) { - if (!env->pstate & PSTATE_SP) { + if (!(env->pstate & PSTATE_SP)) { /* Access to SP_EL0 is undefined if it's being used as * the stack pointer. */ -- 1.9.1