libgcc2.c (isnan): Use __builtin_isnan.
* libgcc2.c (isnan): Use __builtin_isnan. (isfinite): Use __builtin_isfinite. (isinf): Use __builtin_isinf. From-SVN: r264823
This commit is contained in:
parent
a41cc59de4
commit
af8096fc2b
|
@ -1,3 +1,9 @@
|
||||||
|
2018-10-03 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
|
* libgcc2.c (isnan): Use __builtin_isnan.
|
||||||
|
(isfinite): Use __builtin_isfinite.
|
||||||
|
(isinf): Use __builtin_isinf.
|
||||||
|
|
||||||
2018-09-26 Uros Bizjak <ubizjak@gmail.com>
|
2018-09-26 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* config/i386/crtprec.c (set_precision): Use fnstcw instead of fstcw.
|
* config/i386/crtprec.c (set_precision): Use fnstcw instead of fstcw.
|
||||||
|
|
|
@ -1939,15 +1939,9 @@ NAME (TYPE x, int m)
|
||||||
#define CONCAT2(A,B) _CONCAT2(A,B)
|
#define CONCAT2(A,B) _CONCAT2(A,B)
|
||||||
#define _CONCAT2(A,B) A##B
|
#define _CONCAT2(A,B) A##B
|
||||||
|
|
||||||
/* All of these would be present in a full C99 implementation of <math.h>
|
#define isnan(x) __builtin_isnan (x)
|
||||||
and <complex.h>. Our problem is that only a few systems have such full
|
#define isfinite(x) __builtin_isfinite (x)
|
||||||
implementations. Further, libgcc_s.so isn't currently linked against
|
#define isinf(x) __builtin_isinf (x)
|
||||||
libm.so, and even for systems that do provide full C99, the extra overhead
|
|
||||||
of all programs using libgcc having to link against libm. So avoid it. */
|
|
||||||
|
|
||||||
#define isnan(x) __builtin_expect ((x) != (x), 0)
|
|
||||||
#define isfinite(x) __builtin_expect (!isnan((x) - (x)), 1)
|
|
||||||
#define isinf(x) __builtin_expect (!isnan(x) & !isfinite(x), 0)
|
|
||||||
|
|
||||||
#define INFINITY CONCAT2(__builtin_huge_val, CEXT) ()
|
#define INFINITY CONCAT2(__builtin_huge_val, CEXT) ()
|
||||||
#define I 1i
|
#define I 1i
|
||||||
|
|
Loading…
Reference in New Issue