Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2014-03-22 01:27:29 +0400
committerJeff Johnston <jjohnstn@redhat.com>2014-03-22 01:27:29 +0400
commitb7f5fb36f13aa27b1cd6198af58d11dc674d1b2c (patch)
tree0f366e5734d87ba880a6e0700e88f30c11d2f6fb /newlib/libm/common/s_nan.c
parente669b401f702dbcae29b46524091b5c1eb2e7abf (diff)
2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
* libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS versions. (ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS. (ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4): Likewise. * libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS versions. (enan): Handle legacy MIPS payloads. * libm/common/s_nan.c (nan): Use __builtin_nan if supported by the compiler. * libm/common/sf_nan.c (nanf): Likewise.
Diffstat (limited to 'newlib/libm/common/s_nan.c')
-rw-r--r--newlib/libm/common/s_nan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libm/common/s_nan.c b/newlib/libm/common/s_nan.c
index 7ff4ef73e..ba0bb0ac1 100644
--- a/newlib/libm/common/s_nan.c
+++ b/newlib/libm/common/s_nan.c
@@ -41,7 +41,11 @@ QUICKREF
{
double x;
+#if __GNUC_PREREQ (3, 3)
+ x = __builtin_nan("");
+#else
INSERT_WORDS(x,0x7ff80000,0);
+#endif
return x;
}