From: Uros Bizjak Date: Wed, 3 Oct 2018 20:29:10 +0000 (+0200) Subject: libgcc2.c (isnan): Use __builtin_isnan. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af8096fc2b6ee76426b021a2657291dfc62ca933;p=gcc.git libgcc2.c (isnan): Use __builtin_isnan. * libgcc2.c (isnan): Use __builtin_isnan. (isfinite): Use __builtin_isfinite. (isinf): Use __builtin_isinf. From-SVN: r264823 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index e08168cc44e..d4abb3b11ca 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-03 Uros Bizjak + + * libgcc2.c (isnan): Use __builtin_isnan. + (isfinite): Use __builtin_isfinite. + (isinf): Use __builtin_isinf. + 2018-09-26 Uros Bizjak * config/i386/crtprec.c (set_precision): Use fnstcw instead of fstcw. @@ -105,7 +111,7 @@ unordered store to release lock. (__sync_lock_release_8): Likewise. (SYNC_LOCK_RELEASE_2): Remove define. - + 2018-08-02 Nicolas Pitre PR libgcc/86512 @@ -416,7 +422,7 @@ * config/pa/fptr.c (_dl_read_access_allowed): New. (__canonicalize_funcptr_for_compare): Use it. - + 2018-02-28 Jakub Jelinek PR debug/83917 @@ -513,21 +519,21 @@ * config/rl78/t-rl78: Added smindi3.S to LIB2ADD. 2018-01-22 Sebastian Perta - + * config/rl78/smaxdi3.S: New assembly file. * config/rl78/t-rl78: Added smaxdi3.S to LIB2ADD. 2018-01-22 Sebastian Perta - + * config/rl78/umaxdi3.S: New assembly file. * config/rl78/t-rl78: Added umaxdi3.S to LIB2ADD. - + 2018-01-21 John David Anglin PR lto/83452 * config/pa/stublib.c (L_gnu_lto_v1): New stub definition. * config/pa/t-stublib (gnu_lto_v1-stub.o): Add make fragment. - + 2018-01-13 Richard Sandiford * config/aarch64/value-unwind.h (aarch64_vg): New function. diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c index f418f3a354d..8ac2025f7af 100644 --- a/libgcc/libgcc2.c +++ b/libgcc/libgcc2.c @@ -1939,15 +1939,9 @@ NAME (TYPE x, int m) #define CONCAT2(A,B) _CONCAT2(A,B) #define _CONCAT2(A,B) A##B -/* All of these would be present in a full C99 implementation of - and . Our problem is that only a few systems have such full - implementations. Further, libgcc_s.so isn't currently linked against - 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 isnan(x) __builtin_isnan (x) +#define isfinite(x) __builtin_isfinite (x) +#define isinf(x) __builtin_isinf (x) #define INFINITY CONCAT2(__builtin_huge_val, CEXT) () #define I 1i