]> sourceware.org Git - glibc.git/commitdiff
math: Use builtin for ldbl-96 copysign
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 7 Apr 2022 17:39:59 +0000 (14:39 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 7 Apr 2022 17:54:14 +0000 (14:54 -0300)
All architectures that uses it (x86, ia64, m68k) implement the
builtin.

Checked on x86_64-linux-gnu and ia64-linux-gnu.

sysdeps/ieee754/ldbl-96/s_copysignl.c

index 5a30fcc6d031f84ca1dd3c70611359ca823979cd..ad7539113fbf72a260521265efd94fdf2a85fc58 100644 (file)
@@ -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)
This page took 0.046848 seconds and 5 git commands to generate.