From patchwork Thu Jan 17 20:04:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14103 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6D81223E2E for ; Thu, 17 Jan 2013 20:04:24 +0000 (UTC) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by fiordland.canonical.com (Postfix) with ESMTP id 1DF94A19435 for ; Thu, 17 Jan 2013 20:04:24 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id l6so1873571vcl.31 for ; Thu, 17 Jan 2013 12:04:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=SJeMJv4GbTlfKmH+B7feMKkYPueYlUuI0CPggE6UkTM=; b=EeqDRpUDSgGkjbcovJT4+VzGzj9bnWeRcrkZzMhoQiOywhfmd2/vVJxplIG41Wm8Aj 0BsF11dTGeYr21MUKcemqGzV9Pwyx4CF7Vz32km6d+H1M0L+r8ErXQbDRgN0OD5uofVd gBmjAbh2+VvlELAMVC+h94I1RDsPGyyz/OtYMXhWsp9vohtIJT7RoJkEAAX5cp4IN033 8Q4A1rh1hDHJhqBjamLz4odZ3tyO2boqEi70F22RWNh5/hci5oV6HZA2uAzc6QXROX8D 6tKrDWIXVQeX3ydbvTllZojGLVMzXyNca+aLwdczwSLfAOwtuz4I92qXQBE2kW8EYZra YHCg== X-Received: by 10.220.154.199 with SMTP id p7mr6774976vcw.48.1358453063590; Thu, 17 Jan 2013 12:04:23 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp49238veb; Thu, 17 Jan 2013 12:04:22 -0800 (PST) X-Received: by 10.194.21.70 with SMTP id t6mr10461184wje.42.1358453062020; Thu, 17 Jan 2013 12:04:22 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id gc1si1014840wjb.155.2013.01.17.12.04.20 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Jan 2013 12:04:21 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TvvhA-0000hT-8r; Thu, 17 Jan 2013 20:04:16 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , Aurelien Jarno , Andrzej Zaborowski Subject: [PATCH for-1.4] tcg/target-arm: Add missing parens to assertions Date: Thu, 17 Jan 2013 20:04:16 +0000 Message-Id: <1358453056-2668-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmQoBnw1fWHZljzEV14vpuc+lPId7tpVbZV5MDQkF5yASvj1xwKKFOblkZrw+1DquckmwQf Silence a (legitimate) complaint about missing parentheses: tcg/arm/tcg-target.c: In function ‘tcg_out_qemu_ld’: tcg/arm/tcg-target.c:1148:5: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] tcg/arm/tcg-target.c: In function ‘tcg_out_qemu_st’: tcg/arm/tcg-target.c:1357:5: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses] which meant that we would mistakenly always assert if running a QEMU built with debug enabled on ARM. Signed-off-by: Peter Maydell --- Errors inadvertently introduced in commit d17bd1. tcg/arm/tcg-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index c3ac85e..d9c33d8 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1145,7 +1145,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, int opc) TCG_REG_R0, SHIFT_IMM_LSL(CPU_TLB_ENTRY_BITS)); /* We assume that the offset is contained within 20 bits. */ tlb_offset = offsetof(CPUArchState, tlb_table[mem_index][0].addr_read); - assert(tlb_offset & ~0xfffff == 0); + assert((tlb_offset & ~0xfffff) == 0); if (tlb_offset > 0xfff) { tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R0, TCG_REG_R0, 0xa00 | (tlb_offset >> 12)); @@ -1354,7 +1354,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, int opc) TCG_AREG0, TCG_REG_R0, SHIFT_IMM_LSL(CPU_TLB_ENTRY_BITS)); /* We assume that the offset is contained within 20 bits. */ tlb_offset = offsetof(CPUArchState, tlb_table[mem_index][0].addr_write); - assert(tlb_offset & ~0xfffff == 0); + assert((tlb_offset & ~0xfffff) == 0); if (tlb_offset > 0xfff) { tcg_out_dat_imm(s, COND_AL, ARITH_ADD, TCG_REG_R0, TCG_REG_R0, 0xa00 | (tlb_offset >> 12));