This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: x86_64 and HOST_WIDE_INT changes fix
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: x86_64 and HOST_WIDE_INT changes fix
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 06 May 2001 16:26:29 -0300
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Organization: GCC Team, Red Hat
- References: <20010506012703.G25723@atrey.karlin.mff.cuni.cz>
On May 5, 2001, Jan Hubicka <jh@suse.cz> wrote:
> ! hi_half[num] = (1 << 31) != 0 ? constm1_rtx : const0_rtx;
Undefined behavior in 1 << 31 with 16-bit ints.
> ! lo_half[num] = GEN_INT (trunc_int_for_mode (CONST_DOUBLE_LOW (op), SImode));
> ! hi_half[num] = GEN_INT (trunc_int_for_mode (CONST_DOUBLE_HIGH (op), SImode));
I believe CONST_DOUBLE_LOW and CONST_DOUBLE_HIGH are already
properly sign-extended. I couldn't find any case in which this was
not true, so the trunc_int_for_mode is probably unnecessary.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me