[PATCH] MIPS: NaN encoding fixes and IEEE 754-2008 updates
Sebastian Huber
sebastian.huber@embedded-brains.de
Wed Mar 19 06:58:00 GMT 2014
On 2014-03-19 01:06, Maciej W. Rozycki wrote:
> Index: newlib-fsf-trunk-quilt/newlib/libm/common/s_nan.c
> ===================================================================
> --- newlib-fsf-trunk-quilt.orig/newlib/libm/common/s_nan.c 2014-03-10 18:58:42.000000000 +0000
> +++ newlib-fsf-trunk-quilt/newlib/libm/common/s_nan.c 2014-03-10 21:26:11.748926514 +0000
> @@ -41,7 +41,13 @@ QUICKREF
> {
> double x;
>
> +#if defined(__GNUC__) && \
> + ( (__GNUC__ >= 4) || \
> + ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
> + x = __builtin_nan("");
> +#else
> INSERT_WORDS(x,0x7ff80000,0);
> +#endif
> return x;
> }
>
Maybe it makes sense to use the __GNUC_PREREQ__(ma, mi) macro here defined in
<sys/features.h>.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the Newlib
mailing list