From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Earnshaw To: Richard Henderson Cc: rearnsha@arm.com Subject: Re: cross from alpha to arm Date: Wed, 15 Oct 1997 20:16:00 -0000 Message-id: <199710152144.WAA23392@sun52.NIS.cambridge> References: <19971015110437.49550@dot.cygnus.com> X-SW-Source: 1997-10/msg00621.html > On Wed, Oct 15, 1997 at 09:15:25AM +0800, Stephen Williams wrote: > > + #if HOST_BITS_PER_WIDE_INT > 32 > > + if (i & 0xffffffff00000000LL) return FALSE; > > + #endif > > Make this instead > > if (i & ~(unsigned HOST_WIDE_INT) 0xffffffff) return FALSE; > > The LL will mess up non-gcc 64-bit hosts, and the conditional > will be optimized away on hosts it doesn't matter for. > > > r~ While this is better, I think you would get better code if you failed numbers that weren't the equivalent of a sign-extended 32 bit number. Indeed some of the code in output_move_double currently assumes this (though this probably needs fixing). Something like: { unsigned HOST_WIDE_INT mask = ~0xFF; HOST_WIDE_INT j = i >> 31; if (j != 0 && j != (HOST_WIDE_INT) -1) return FALSE; /* Fast return for 0 and powers of 2 */ if ((i & (i - 1)) == 0)