qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user
@ 2016-06-17 19:46 Richard Henderson
  2016-06-27 18:32 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2016-06-17 19:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user
  2016-06-17 19:46 [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user Richard Henderson
@ 2016-06-27 18:32 ` Paolo Bonzini
  2016-06-28  8:03   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2016-06-27 18:32 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel, Peter Maydell



On 17/06/2016 21:46, Richard Henderson wrote:
> 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)
> 

Peter, can you apply this as a build-breakage fix?  (Fedora 24 is now
out and has this bug).

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user
  2016-06-27 18:32 ` Paolo Bonzini
@ 2016-06-28  8:03   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-06-28  8:03 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Richard Henderson, QEMU Developers

On 27 June 2016 at 19:32, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 17/06/2016 21:46, Richard Henderson wrote:
>> 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)
>>
>
> Peter, can you apply this as a build-breakage fix?  (Fedora 24 is now
> out and has this bug).

Applied to master, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-28  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-17 19:46 [Qemu-devel] [PATCH] target-alpha: Avoid gcc 6.1 werror for linux-user Richard Henderson
2016-06-27 18:32 ` Paolo Bonzini
2016-06-28  8:03   ` Peter Maydell

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).