public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED] math: Use builtin for ldbl-96 copysign
@ 2022-04-07 18:13 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-04-07 18:13 UTC (permalink / raw)
  To: libc-alpha

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 | 10 +++-------
 1 file 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)
-- 
2.32.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-07 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 18:13 [COMMITTED] math: Use builtin for ldbl-96 copysign Adhemerval Zanella

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).