This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to eliminate alpha.c warnings


 > From: Richard Henderson <rth@redhat.com>
 > 
 > On Sun, Dec 02, 2001 at 07:21:45PM -0500, Kaveh R. Ghazi wrote:
 > > (I figure the LLs for 64-bit constants are okay since they are guarded
 > > by HOST_BITS_PER_WIDE_INT != 32.)
 > 
 > No, they aren't.  The DEC C compiler doesn't (didn't?) support
 > long long.
 > r~

How about defining a macro to this expr?

((((HOST_WIDEST_INT) 0xffffffff) << 32) | 0xffffffff)

Acceptable or too ugly?


In any case, what about the bit on function_arg?


2001-12-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* alpha.c (function_arg): Cast value to HOST_WIDE_INT before shifting.

diff -rup orig/egcc-CVS20011201/gcc/config/alpha/alpha.c egcc-CVS20011201/gcc/config/alpha/alpha.c
--- orig/egcc-CVS20011201/gcc/config/alpha/alpha.c	Sun Nov 18 12:45:04 2001
+++ egcc-CVS20011201/gcc/config/alpha/alpha.c	Sun Dec  2 15:02:11 2001
@@ -5385,7 +5385,8 @@ function_arg (cum, mode, type, named)
 #if HOST_BITS_PER_WIDE_INT == 32
 	  hi = (cum.num_args << 20) | cum.num_arg_words;
 #else
-	  lo = lo | (cum.num_args << 52) | (cum.num_arg_words << 32);
+	  lo = lo | ((HOST_WIDE_INT) cum.num_args << 52)
+	    | ((HOST_WIDE_INT) cum.num_arg_words << 32);
 	  hi = 0;
 #endif
 	  ciw = immed_double_const (lo, hi, DImode);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]