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 NOT!
- To: David Whitten <whitten at netcom dot com>
- Subject: Re: cross-compiled floating point constants broken NOT!
- From: Jeffrey A Law <law at hurl dot cygnus dot com>
- Date: Wed, 03 Feb 1999 11:54:44 -0700
- cc: egcs-bugs at egcs dot cygnus dot com, moshier at mediaone dot net
- Reply-To: law at cygnus dot com
In message <199902031732.JAA11769@netcom4.netcom.com>you write:
> I'm not sure if it makes sense to sign extend a float.
> To my knowledge sign extension is a copy operation of the sign
> of a smaller integer into the upper bytes when it is copied into a
> register or memory storage that is wider than it is.
You don't want to sign extend the float value, but the internal representation
of a float is a series of integer bits.
Consider a 64bit host. Instead of creating a CONST_DOUBLE for a 32bit floating
point value, it might create a CONST_INT. Once that's happened, there's no
way to tell that the bit pattern really refers to a floating point value. So
you don't know how to handle the sign bit copies because you don't know what
the value really represents.
Basically we have an ambigious representation in a couple ways. I hope that
we'll start to fix it someday, but it is a lot of work.
jeff