From patchwork Mon Aug 4 13:53:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 34841 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E6A2221F5F for ; Mon, 4 Aug 2014 13:57:17 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id cm18sf19113950qab.3 for ; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=WfCgTyWvPL9vJKHWeVqTwi1VPADaVEO0ynOYUE8YLMU=; b=k96HDAbSJKGIE1ukux1WoshbzO9T1pv0RD5xt2lv2CDrzTSLfFWpHXxFpLCjwditpb I2LZwcOkXS+usPOJTssQOlcbhupiwKq6kxTFmN1g+sSkLWPFCyilh0SxMbmIYtOt1eQD G/gh0bClQ0SXI+xcJlW5CBXofIJzFLBETk4HWDw5ImahjHWlJqX5URXHhzjXZmN+uhMe hY2voEPb8cb7jwhAbIkQbsiGNj5mrLY7NVf2PJ1kaQcwZJMItFIfk44BkPWwq7Jfg7bs IxCszyQnD3dQnpJq0t0EWeosJPkvnmxi0UbFd6PztHdhdzpoocAQcP0L80hnflhDYLHH +kjg== X-Gm-Message-State: ALoCoQlhlyvEX9qPlctaWpKJPa0nFfKOQ0cMsM3Kxmwimjfw10G/Z38CG6JarunX/c5Pc+GFU/q7 X-Received: by 10.236.142.146 with SMTP id i18mr3479832yhj.42.1407160637765; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.53 with SMTP id 50ls2221165qga.25.gmail; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) X-Received: by 10.52.243.135 with SMTP id wy7mr1343330vdc.82.1407160637658; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id h18si11947930vdt.8.2014.08.04.06.57.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Aug 2014 06:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so11022721vcb.15 for ; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) X-Received: by 10.52.248.146 with SMTP id ym18mr19923449vdc.8.1407160637250; Mon, 04 Aug 2014 06:57:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp306386vcb; Mon, 4 Aug 2014 06:57:16 -0700 (PDT) X-Received: by 10.140.87.75 with SMTP id q69mr35333909qgd.94.1407160636260; Mon, 04 Aug 2014 06:57:16 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j49si28628748qga.126.2014.08.04.06.57.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Aug 2014 06:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:52466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEIlH-0001Mb-Re for patch@linaro.org; Mon, 04 Aug 2014 09:57:15 -0400 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 To: qemu-devel@nongnu.org Date: Mon, 4 Aug 2014 14:53:26 +0100 Message-Id: <1407160408-4467-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> References: <1407160408-4467-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 10/12] target-arm: Fix bit test in sp_el0_access X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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. */