From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id A96813858D28; Thu, 7 Apr 2022 18:15:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A96813858D28 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] math: Use builtin for ldbl-96 copysign X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: a085346267a368d8e802acd86ed9a9b7aee9b83d X-Git-Newrev: 0a4ae090e069e469c5acd49cee8258065480a11a Message-Id: <20220407181505.A96813858D28@sourceware.org> Date: Thu, 7 Apr 2022 18:15:05 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2022 18:15:05 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a4ae090e069e469c5acd49cee8258065480a11a commit 0a4ae090e069e469c5acd49cee8258065480a11a Author: Adhemerval Zanella Date: Thu Apr 7 14:39:59 2022 -0300 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. Diff: --- 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 -#include #include -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)