From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user
Date: Fri, 17 Jun 2016 12:46:33 -0700 [thread overview]
Message-ID: <1466192793-2559-1-git-send-email-rth@twiddle.net> (raw)
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 <bobby.prani@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
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)
--
2.5.5
next reply other threads:[~2016-06-17 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 19:46 Richard Henderson [this message]
2016-06-27 18:32 ` [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user Paolo Bonzini
2016-06-28 8:03 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466192793-2559-1-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).