Patchwork constant that doesn't fit in 32bits in alpha.c

login
register
mail settings
Submitter Richard Henderson
Date June 11, 2012, 11:04 p.m.
Message ID <4FD67990.1080904@redhat.com>
Download mbox | patch
Permalink /patch/164277/
State New
Headers show

Comments

Richard Henderson - June 11, 2012, 11:04 p.m.
On 2012-06-10 02:18, Jay K wrote:
> 
> gcc-4.7.0/gcc/config/alpha/alpha.c
> 
> 
>       word1 = expand_and (DImode, word1, GEN_INT (0xffff0fff0000fff0), NULL);
> 
> 
> That "big" constant isn't portable since it doesn't fit in 32bits.
> 
> 
> 1) append LL
> or 2) break it up into an expression, like
>   ((HOST_WIDE_INT)0xffff0fff) << 8) | 0x0fff0
> 
> 
> or such.

Addressed like so.  I couldn't think of any nice way to define this
such that it could be generic, so I left it local to this bit o code.



r~
* lib/target-supports.exp
        (check_effective_target_sync_long_long_runtime): Use
        check_effective_target_lp64 instead of
        check_effective_target_powerpc64 for powerpc targets.

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 568f6b1..c937484 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3796,7 +3796,7 @@  proc check_effective_target_sync_long_long_runtime { } {
 		 && [check_effective_target_lp64]
 		 && [check_effective_target_ultrasparc_hw]) } {
 	return 1
-    } elseif { [check_effective_target_powerpc64] } {
+    } elseif { [istarget powerpc*-*-*] && [check_effective_target_lp64] } {
 	return 1
     } else {
 	return 0