From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 8052E3858417; Fri, 9 Feb 2024 17:37:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8052E3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707500241; bh=WZHEAnFuSuQHfrA/8Vdb7r26I7Ckad+We9R6wnMWsFg=; h=From:To:Subject:Date:From; b=MHunHLMHQ7aNd2+Lt372z4ZEA07ad1UxbQCjduMbI3NfvsK3nVrbfr7r9sjWq7MFt KeymbTApWaEgXfPdXwjiHoouTigcl03iK2zbwiet6EqMlELv6BgAV0NB1Dou49nqfF a2OIP5SblebZx3Cpc/SsohxBwE4x20e4HheVbK3Q= 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/azanella/clang] math: Do not use __builtin_isnan on clang X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 2d24531a61f3cf868a42b218582ea337b64c598d X-Git-Newrev: 6f1330247e563be0752bb9c653fa6083a1a2334f Message-Id: <20240209173721.8052E3858417@sourceware.org> Date: Fri, 9 Feb 2024 17:37:21 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6f1330247e563be0752bb9c653fa6083a1a2334f commit 6f1330247e563be0752bb9c653fa6083a1a2334f Author: Adhemerval Zanella Date: Fri Apr 1 17:01:22 2022 -0300 math: Do not use __builtin_isnan on clang It does not handle pseudo normal numbers. Diff: --- math/math.h | 3 +-- sysdeps/ieee754/float128/float128_private.h | 2 +- sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/math/math.h b/math/math.h index 97e4df863e..59caf4b7e6 100644 --- a/math/math.h +++ b/math/math.h @@ -1004,8 +1004,7 @@ enum /* Return nonzero value if X is a NaN. We could use `fpclassify' but we already have this functions `__isnan' and it is faster. */ -# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ - || __glibc_clang_prereq (2,8) +# if (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) # define isnan(x) __builtin_isnan (x) # else # define isnan(x) __MATH_TG ((x), __isnan, (x)) diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h index 38a8bdd0fe..672bf3cccf 100644 --- a/sysdeps/ieee754/float128/float128_private.h +++ b/sysdeps/ieee754/float128/float128_private.h @@ -352,7 +352,7 @@ #define frexpl frexpf128 #define getpayloadl getpayloadf128 #define isinfl isinff128_do_not_use -#define isnanl isnanf128_do_not_use +#define isnanl isnanf128 #define ldexpl ldexpf128 #define llrintl llrintf128 #define llroundl llroundf128 diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c index 59f71533ce..b73a4e80d7 100644 --- a/sysdeps/ieee754/float128/s_isnanf128.c +++ b/sysdeps/ieee754/float128/s_isnanf128.c @@ -11,7 +11,11 @@ #include "../ldbl-128/s_isnanl.c" #if !IS_IN (libm) #include +#ifdef SHARED hidden_ver (__isnanf128_impl, __isnanf128) +#else +strong_alias (__isnanf128_impl, __isnanf128) +#endif _weak_alias (__isnanf128_impl, isnanl) versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34); #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34))