From: Adhemerval Zanella Date: Tue, 13 Jan 2026 14:19:28 +0000 (-0300) Subject: Revert "x86: Do not use __builtin_isinf_sign for _Float64x/long double" X-Git-Tag: glibc-2.43~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e822788e509ac7ccd89ee4cdd40131c4eedd5fd;p=thirdparty%2Fglibc.git Revert "x86: Do not use __builtin_isinf_sign for _Float64x/long double" This reverts commit 999cd617cb7e40a2fa719e91fe1028c853ae14d5. It breaks libstdc++ and other languages bootstrap. Reviewed-by: Carlos O'Donell --- diff --git a/bits/fp-builtin-denormal.h b/bits/fp-builtin-denormal.h index 0f24de149a..457ab0c97a 100644 --- a/bits/fp-builtin-denormal.h +++ b/bits/fp-builtin-denormal.h @@ -26,7 +26,3 @@ Intel double extended-precision (long double). By default assume 1 to enable the usage of compiler builtin on math.h. */ #define __FP_BUILTIN_FPCLASSIFY_DENORMAL 1 - -/* __FP_BUILTIN_ISINF_SIGN_DENORMAL is defined to 1 if compiler supports - handling pseudo-dernormal numbers with isinf_sign builtin. */ -#define __FP_BUILTIN_ISINF_SIGN_DENORMAL 1 diff --git a/math/math.h b/math/math.h index 1066113ca6..77dfcdc36b 100644 --- a/math/math.h +++ b/math/math.h @@ -1249,10 +1249,7 @@ enum ? __isinff128 (x) : __builtin_isinf_sign (x)) # elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (3,7) -# define isinf(x) __MATH_TG_BUILTIN_CLASSIFY ((x), \ - __builtin_isinf_sign, (x), \ - isinf, (x), \ - __FP_BUILTIN_ISINF_SIGN_DENORMAL) +# define isinf(x) __builtin_isinf_sign (x) # else # define isinf(x) __MATH_TG ((x), __isinf, (x)) # endif diff --git a/sysdeps/x86/bits/fp-builtin-denormal.h b/sysdeps/x86/bits/fp-builtin-denormal.h index 30ed7c899a..33549c876a 100644 --- a/sysdeps/x86/bits/fp-builtin-denormal.h +++ b/sysdeps/x86/bits/fp-builtin-denormal.h @@ -23,7 +23,3 @@ /* Neither GCC (bug 123161) nor clang (issue 172533) handles pseudo-normal numbers correctly with fpclassify builtin. */ #define __FP_BUILTIN_FPCLASSIFY_DENORMAL 0 - -/* Neither GCC (bug 123173) nor clang (issue 172651) handles pseudo-normal - numbers correctly with isinf_sign builtin. */ -#define __FP_BUILTIN_ISINF_SIGN_DENORMAL 0 diff --git a/sysdeps/x86/fpu/test-builtin-denormal.c b/sysdeps/x86/fpu/test-builtin-denormal.c index 8856ebce80..6584ec339f 100644 --- a/sysdeps/x86/fpu/test-builtin-denormal.c +++ b/sysdeps/x86/fpu/test-builtin-denormal.c @@ -45,10 +45,6 @@ do_test (void) TEST_COMPARE (feclearexcept (FE_INVALID), 0); TEST_COMPARE (fpclassify (inputs[i].value), FP_NAN); TEST_COMPARE (fetestexcept (FE_INVALID), 0); - - TEST_COMPARE (feclearexcept (FE_INVALID), 0); - TEST_COMPARE (isinf (inputs[i].value), 0); - TEST_COMPARE (fetestexcept (FE_INVALID), 0); } return 0;