public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] finitel: Use correct GCC builtin
@ 2016-03-26 19:34 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2016-03-26 19:34 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=373f81d17c2ab1ab9a7b37c26c1ed067174a42e5
commit 373f81d17c2ab1ab9a7b37c26c1ed067174a42e5
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Sat Mar 26 20:29:20 2016 +0100
finitel: Use correct GCC builtin
__builtin_isinf_sign doesn't reflect the correct return value for NaN
to emulate finite function. Use __builtin_isfinite instead whichg is available
since GCC 4.4 just as __builtin_isinf_sign.
* libm/common/sl_finite.c (finitel): Use __builtin_isfinite.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
newlib/libm/common/sl_finite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib/libm/common/sl_finite.c b/newlib/libm/common/sl_finite.c
index 0c27b4f..9ec6290 100644
--- a/newlib/libm/common/sl_finite.c
+++ b/newlib/libm/common/sl_finite.c
@@ -19,7 +19,7 @@ finitel (long double x)
Some architectures for example have an 80-bit long double whereas
others use 128-bits. We use macros and comiler builtin functions
to avoid specific knowledge of the long double format. */
- return __builtin_isinf_sign (x) == 0;
+ return __builtin_isfinite (x);
#endif
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-26 19:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-26 19:34 [newlib-cygwin] finitel: Use correct GCC builtin Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).