This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mips SNaN/QNaN is swapped
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: cgd at broadcom dot com, gcc-patches at gcc dot gnu dot org
- Date: 25 Mar 2003 20:08:14 -0300
- Subject: Re: mips SNaN/QNaN is swapped
- Organization: GCC Team, Red Hat
- References: <200303251044.h2PAinF07423@pc960.cambridge.arm.com>
On Mar 25, 2003, Richard Earnshaw <rearnsha at arm dot com> wrote:
> Indeed. IEEE 754 simply says that there will be at least on SNaN and at
> least one QNaN, but it doesn't say anything else (most helpful, not).
MIPS seems to require a specific value to be used for QNaN as a result
of constant folding or run-time arithmetic, even though it will
recognize the full range of values that have the MSB of the mantissa
set or unset as SNaN or QNaN. The way I thought to address this
problem was to add to every FP format a char*, that, if non-NULL,
would be used as the default argument for __builtin_nan/snan(). Or
would we be better off with a pair of strings, one for qnan, one for
snan? This is not needed for MIPS, but it might be for some other
processor. Thoughts?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer