diff options
author | Richard Henderson <rth@twiddle.net> | 2016-06-17 12:46:33 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-27 21:03:58 +0100 |
commit | fdc997ef54c5b2c3483969aee5f1d5f2a7587520 (patch) | |
tree | f61e9d04329eb555a3e415ca20e10eafbb1c077b /target-alpha/translate.c | |
parent | 14e60aaece20a1cfc059a69f6491b0899f9257a8 (diff) |
target-alpha: Avoid gcc 6.1 werror for linux-user
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>
Message-id: 1466192793-2559-1-git-send-email-rth@twiddle.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r-- | target-alpha/translate.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 243567b8fc..0ea0e6e146 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -449,10 +449,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) |