about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-07 14:39:59 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-04-07 14:54:14 -0300
commit0a4ae090e069e469c5acd49cee8258065480a11a (patch)
tree473d1eadf2dc08b2e0b3655f16c9be6a2b7c7532
parenta085346267a368d8e802acd86ed9a9b7aee9b83d (diff)
downloadglibc-0a4ae090e069e469c5acd49cee8258065480a11a.tar.gz
glibc-0a4ae090e069e469c5acd49cee8258065480a11a.tar.xz
glibc-0a4ae090e069e469c5acd49cee8258065480a11a.zip
math: Use builtin for ldbl-96 copysign
All architectures that uses it (x86, ia64, m68k) implement the
builtin.

Checked on x86_64-linux-gnu and ia64-linux-gnu.
-rw-r--r--sysdeps/ieee754/ldbl-96/s_copysignl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_copysignl.c b/sysdeps/ieee754/ldbl-96/s_copysignl.c
index 5a30fcc6d0..ad7539113f 100644
--- a/sysdeps/ieee754/ldbl-96/s_copysignl.c
+++ b/sysdeps/ieee754/ldbl-96/s_copysignl.c
@@ -24,15 +24,11 @@ static char rcsid[] = "$NetBSD: $";
 
 #define NO_MATH_REDIRECT
 #include <math.h>
-#include <math_private.h>
 #include <libm-alias-ldouble.h>
 
-long double __copysignl(long double x, long double y)
+long double
+__copysignl (long double x, long double y)
 {
-	uint32_t es1,es2;
-	GET_LDOUBLE_EXP(es1,x);
-	GET_LDOUBLE_EXP(es2,y);
-	SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
-        return x;
+  return __builtin_copysignl (x, y);
 }
 libm_alias_ldouble (__copysign, copysign)