From patchwork Thu Jun 16 18:56:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9181495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4497760573 for ; Thu, 16 Jun 2016 18:57:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34AA62837E for ; Thu, 16 Jun 2016 18:57:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29C0E28382; Thu, 16 Jun 2016 18:57:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA06D2837E for ; Thu, 16 Jun 2016 18:57:30 +0000 (UTC) Received: from localhost ([::1]:51656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDcTp-0000Qe-5p for patchwork-qemu-devel@patchwork.kernel.org; Thu, 16 Jun 2016 14:57:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDcTa-0000QZ-C4 for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:57:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDcTX-0005mv-7u for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:57:14 -0400 Received: from mail-yw0-x244.google.com ([2607:f8b0:4002:c05::244]:33358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDcTX-0005mr-3b for qemu-devel@nongnu.org; Thu, 16 Jun 2016 14:57:11 -0400 Received: by mail-yw0-x244.google.com with SMTP id d137so508319ywe.0 for ; Thu, 16 Jun 2016 11:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=+D+mmeOPKyvzVv3xW3LZMaUglkV2ysaV+myf0z59MUA=; b=aKai71tr2qEFcE/7ME5xLZNIRSAPE/ghYkHSjdyArmTY+arP911aVtId9aRDP/4e49 v8r5xSNmBsEO8jr2BBL/wkRyvLgVPsqjVIpvBDknySDDbF9UVddQZSef8rDdQIWaSrTD 9QxTFhsZol2f5HK22Dm8JiGEDa711xWCDIhC2xnzfQHJw3ORnWe0yBdOq+Zro7+ySvB1 zHMy6Jx85Rag52cum5m9WZ/Qqbfq+WJGpgAwp+2ELSOoJIJdPNhRiihKfilNdBJAK6z+ mVUAcyJrisLU/F/iDlfpjYS7PAcXFaL0VGVYZ2QrN6/QKrZoB4thuNhDgqDjT+Jyt0VM wT0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=+D+mmeOPKyvzVv3xW3LZMaUglkV2ysaV+myf0z59MUA=; b=A8MpGI4lNATreNNFIAAIe+nSiPyD/83JFcF0KiiDbJ0cfaYBQOHqBrYbfS7rgcbgmx AGUrjaxZDzNi0m4qhrfg/cg9Lvk1HrRQI5yJMbiCT8zCIt5UKoxcARmR+H+vqg2ducXq pZPWLRgwhu6OLk0r13vUwmw0ovptReZIoWgdYAP/3ql7BMYwTfu5MAKMRgL2PiIoO6rH koj9KF6IpFApgKHBjt87d8ghREy/eTioOpDAKzZIxtJExmApRs9JcRrfvEwMbGroZYbI joQT+YrQ9sI95QgONxCXwOeGBn6S/g2mTlioF/jvM9w/fOxfLCIpNztqNaXpHoAHk4LF cmfg== X-Gm-Message-State: ALyK8tKs6U1crJIRQv8YDGoMkNrqazKoCwR5Q8MsA7GtSdK5SVqKRCtYNw6Sq17ZoaJYmQ== X-Received: by 10.129.120.86 with SMTP id t83mr3760943ywc.78.1466103430265; Thu, 16 Jun 2016 11:57:10 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id p198sm14296363ywg.12.2016.06.16.11.57.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Jun 2016 11:57:09 -0700 (PDT) From: Pranith Kumar To: Richard Henderson , qemu-devel@nongnu.org (open list:All patches CC here) Date: Thu, 16 Jun 2016 14:56:39 -0400 Message-Id: <20160616185639.5312-1-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::244 Subject: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Using gcc 6.1 for alpha-linux-user target we see the following build error: /mnt/devops/code/qemu/target-alpha/translate.c: In function ‘in_superpage’: /mnt/devops/code/qemu/target-alpha/translate.c:454:52: error: self-comparison always evaluates to true [-Werror=tautological-compare] && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63); Fix it by replacing (addr >> 63) by '1' which is what it evaluates to since addr is negative. Signed-off-by: Pranith Kumar --- target-alpha/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index f9b2426..31da6ea 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -451,7 +451,7 @@ static bool in_superpage(DisasContext *ctx, int64_t addr) return ((ctx->tb->flags & TB_FLAGS_USER_MODE) == 0 && addr < 0 && ((addr >> 41) & 3) == 2 - && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63); + && addr >> TARGET_VIRT_ADDR_SPACE_BITS == 1); } static bool use_goto_tb(DisasContext *ctx, uint64_t dest)