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>
 > 
 > >  #if HOST_BITS_PER_WIDE_INT >= 64
 > > -  operands[2] = force_reg (DImode, GEN_INT (0x8000000000000000));
 > > +  operands[2] = force_reg (DImode, GEN_INT (INTTYPE_MINIMUM (HOST_WIDE_INT)));
 > 
 > This would only be ok if HOST_BITS_PER_WIDE_INT == 64, not >= 64.
 > Using (HOST_WIDE_INT)1 << 63 would be ok.
 > r~


Done, ok to install?

(Q: what are some examples of >64-bit supported hosts these days?)

		Thanks,
		--Kaveh


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

	* alpha.md: Use (HOST_WIDE_INT)1<<63 in lieu of 0x8000000000000000.
	
diff -rup orig/egcc-CVS20011206/gcc/config/alpha/alpha.md egcc-CVS20011206/gcc/config/alpha/alpha.md
--- orig/egcc-CVS20011206/gcc/config/alpha/alpha.md	Thu Nov 29 07:30:39 2001
+++ egcc-CVS20011206/gcc/config/alpha/alpha.md	Fri Dec  7 15:17:28 2001
@@ -2296,7 +2296,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
   "TARGET_HAS_XFLOATING_LIBS"
 {
 #if HOST_BITS_PER_WIDE_INT >= 64
-  operands[2] = force_reg (DImode, GEN_INT (0x8000000000000000));
+  operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63));
 #else
   operands[2] = force_reg (DImode, immed_double_const (0, 0x80000000, DImode));
 #endif
@@ -2333,7 +2333,7 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
   "TARGET_HAS_XFLOATING_LIBS"
 {
 #if HOST_BITS_PER_WIDE_INT >= 64
-  operands[2] = force_reg (DImode, GEN_INT (0x8000000000000000));
+  operands[2] = force_reg (DImode, GEN_INT ((HOST_WIDE_INT) 1 << 63));
 #else
   operands[2] = force_reg (DImode, immed_double_const (0, 0x80000000, DImode));
 #endif


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