This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cross-compiled floating point constants broken
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: cross-compiled floating point constants broken
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Thu, 4 Feb 1999 07:49:21 -0500 (EST)
- cc: egcs-bugs at cygnus dot com
- Reply-To: moshier at mediaone dot net
> I grepped through all of the files looking for REAL_VALUE_TO_TARGET_*
> calls that fail without sign-extension.
If you are saying, for example, that this code from m68k.c fails
because of the GEN_INT, then I believe that is not so.
REAL_VALUE_TYPE r;
long l[3];
REAL_VALUE_FROM_CONST_DOUBLE (r, operands[1]);
REAL_VALUE_TO_TARGET_LONG_DOUBLE (r, l);
operands[1] = GEN_INT (l[0]);
middlehalf[1] = GEN_INT (l[1]);
latehalf[1] = GEN_INT (l[2]);
This is the very test case that I posted to show a failure when you
_do_ sign extend: namely, a long double on m68k. The results of this
program fragment are used only for printing in hex, so they must _not_
be sign extended.
So I think maybe the situation is not really so bad as your list
suggests. Cross compilers to all the popular computer targets seem to
have been working ok for years. On the other hand, the newer
computers might never have been checked for correct cross-compiled
float values. I could believe that m32 has a bug but would caution
against fixing other things that ain't broke.