From patchwork Fri Jun 17 19:46:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9184797 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 16BF3608A2 for ; Fri, 17 Jun 2016 19:47:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E249B25819 for ; Fri, 17 Jun 2016 19:47:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D71E126992; Fri, 17 Jun 2016 19:47:36 +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_SIGNED, 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 4F7C825819 for ; Fri, 17 Jun 2016 19:47:36 +0000 (UTC) Received: from localhost ([::1]:60019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDzjr-0006aC-4y for patchwork-qemu-devel@patchwork.kernel.org; Fri, 17 Jun 2016 15:47:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDzjT-0006YN-Kk for qemu-devel@nongnu.org; Fri, 17 Jun 2016 15:47:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDzjO-0004LF-OI for qemu-devel@nongnu.org; Fri, 17 Jun 2016 15:47:11 -0400 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDzjO-0004L6-Ju for qemu-devel@nongnu.org; Fri, 17 Jun 2016 15:47:06 -0400 Received: by mail-qk0-x242.google.com with SMTP id a186so13343050qkf.0 for ; Fri, 17 Jun 2016 12:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1LZwsEvh8moMp1S9hN9QhV/cnBcGEdbAip41MewJPKo=; b=RcUP8ZCOlWbDVj6iy6Zt2fU5jrXv6fCOUe1fGMOEvfeuFv57+82qo/Y7W1gGRMePIi D+bDNvroqmnUCQfhKieQy+xNyvBN0g87AvB9lCy2a0jmEY/hlKAMUDM9xt7NxYx3OAjR CjrrK1AhcmsBnR5rYkqPvX+j0/ylf7Mcx8SA7jUTGhzDXflGDsF5kBOheX8u+1CwTqN1 kIclP9QS9OTtQ5+HnNjLcXW7pn/kf0VhRAD+BkSfbxaTHumKt9eapiweoAuw2AMSNrn7 rmXkKglrKWPYewf9D5dngPiAYlIo2Y0bpbRPbtmXhwSGzTDqREtVOYHVCTTYMG7rg5EA 8KqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=1LZwsEvh8moMp1S9hN9QhV/cnBcGEdbAip41MewJPKo=; b=Ll0Un7clZ0B4wlcKrJNEz4tbOqoelMRvyy5ER0XrviaSqrEX26WmDxmMei2gsKFKth FOSEX+2LG0T0hoBGs0Dc0kOxL3/bzGegGHf81Z5RpQdlSLsGANMVQmTAd01z5DTJpRXv EXUEByOzE5P1aWElRDWdwaZzWVHm3Cy9V99jnxny1FOVpSi4QWmZvBmQpN2slwAjNehD 3Sd5fKDf9qLK29FNUuwjgHSeFiG1St6cfTp+sIJKBefr+ujZsr+VoUiYkIVNVgCT1m6S bhsH/dwkE9vwmC3Ih6l4BoMm83pRjUZbFnQqNcgDdHMM/jLaZX8pAijcxe44JuGNhoA5 TtiQ== X-Gm-Message-State: ALyK8tIcNT6ORYx2Mg8RLzeGQHGEptZo9KCvT8sfXd02BWTyAYjtTdevt+4ATrDYv/HeDA== X-Received: by 10.55.98.199 with SMTP id w190mr4442512qkb.75.1466192825954; Fri, 17 Jun 2016 12:47:05 -0700 (PDT) Received: from anchor.com (71-37-54-227.tukw.qwest.net. [71.37.54.227]) by smtp.gmail.com with ESMTPSA id d64sm13616321qkg.35.2016.06.17.12.47.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 12:47:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 17 Jun 2016 12:46:33 -0700 Message-Id: <1466192793-2559-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 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:400d:c09::242 Subject: [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror 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: , Cc: pbonzini@redhat.com 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: .../target-alpha/translate.c: In function ‘in_superpage’: .../target-alpha/translate.c:454:52: error: self-comparison always evaluates to true [-Werror=tautological-compare] && addr >> TARGET_VIRT_ADDR_SPACE_BITS == addr >> 63); Reported-by: Pranith Kumar Signed-off-by: Richard Henderson --- target-alpha/translate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index f9b2426..051b4b7 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -448,10 +448,13 @@ static ExitStatus gen_store_conditional(DisasContext *ctx, int ra, int rb, static bool in_superpage(DisasContext *ctx, int64_t addr) { +#ifndef CONFIG_USER_ONLY 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 + && ((addr >> 41) & 3) == 2); +#else + return false; +#endif } static bool use_goto_tb(DisasContext *ctx, uint64_t dest)