Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2175297/?format=api
{ "id": 2175297, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2175297/?format=api", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/1.0/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20251217175554.1157780-3-adhemerval.zanella@linaro.org>", "date": "2025-12-17T17:51:48", "name": "[2/8] x86: Do not use __builtin_fpclassify for _Float64x/long double", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "849a83441423d3961df6160f7c9552a89ce0d6ca", "submitter": { "id": 66065, "url": "http://patchwork.ozlabs.org/api/1.0/people/66065/?format=api", "name": "Adhemerval Zanella Netto", "email": "adhemerval.zanella@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20251217175554.1157780-3-adhemerval.zanella@linaro.org/mbox/", "series": [ { "id": 485739, "url": "http://patchwork.ozlabs.org/api/1.0/series/485739/?format=api", "date": "2025-12-17T17:51:48", "name": "Improve test when building with clang", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/485739/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2175297/checks/", "tags": {}, "headers": { "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "libc-alpha@sourceware.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "libc-alpha@sourceware.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=i4Fvri+v;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=i4Fvri+v", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "sourceware.org; spf=pass smtp.mailfrom=linaro.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.210.193" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dWhM73VVsz1y3Z\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 04:56:51 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2DE714BA2E34\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 17 Dec 2025 17:56:48 +0000 (GMT)", "from mail-pf1-f193.google.com (mail-pf1-f193.google.com\n [209.85.210.193])\n by sourceware.org (Postfix) with ESMTPS id 1D76D4BA2E05\n for <libc-alpha@sourceware.org>; Wed, 17 Dec 2025 17:56:05 +0000 (GMT)", "by mail-pf1-f193.google.com with SMTP id\n d2e1a72fcca58-7acd9a03ba9so6897514b3a.1\n for <libc-alpha@sourceware.org>; Wed, 17 Dec 2025 09:56:05 -0800 (PST)", "from ubuntu-vm.. ([179.99.163.49]) by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12061a888a8sm433214c88.9.2025.12.17.09.56.01\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 17 Dec 2025 09:56:03 -0800 (PST)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 2DE714BA2E34", "OpenDKIM Filter v2.11.0 sourceware.org 1D76D4BA2E05" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 1D76D4BA2E05", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 1D76D4BA2E05", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765994165; cv=none;\n b=nKibunMib67zb/JXVpQFWk1YgHQgpdWqkDsXfoQUL5VS8nskIinC9q8/MS2tLDm2SIZiUk1Z8vTY8YiYgCelpfIUpnudBlyNofdV1+28bfgGxksyM81reFO8NmNDYEkEIw9hzh0wkL2+yUQTD+IA3cVKDit9lF+LPOM3bafKViU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1765994165; c=relaxed/simple;\n bh=EZfjjfiQkAD+1kJ9kcGQbAUhwbpX/9XNIk7Ru/WcxZo=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=qOAgzopSVZzP1xMCZOIDR0LWgt+HDbWzT3RP1q2wBQLecOvNyRK9yEHjrh4kdpYpiLLjkictaGD3Y2qZp70DRPjW7w0MviA473JplV1ljX8F7dsPPjZWAzDdG8RhcmrHf3V39kbPBf4i2V6E44zlcFCOMmglw2/eKXZ2igIqZf4=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1765994164; x=1766598964; darn=sourceware.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=+21lfbs2hgbWTQrUyXi9hQZrr6TKqpWR5Lb8EtB892o=;\n b=i4Fvri+vxzS2bzLqrH1SMRJrSMZQ86cF4vgZsb3T2Nvy8CiL9/3GSpVAu2cNYaJ0jb\n s2RxW0NYmRp7dkSlTv8pKNgv8ykGmr/blzRZs7m+IepqPKPmKEylV0vYR7frGqfuQHek\n pF6WfsuE2UociciSAeaW0GvwTBAPrK1Et26YEzVePtbPopp9H8umc6AWOwXC+//glT6/\n herL7hixzZ5Wu667JH3NF3AxYDqgOWoWgskObQZ0F40fKQGQ1OteMvEJQyZDziycDjyd\n DdSWJlghgmqM7oh5ggTYKHMZ/XJp3eom8AuJTSs9qHFh/PtVdyZt7r56QCVyDV5BPFIP\n mmxQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1765994164; x=1766598964;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=+21lfbs2hgbWTQrUyXi9hQZrr6TKqpWR5Lb8EtB892o=;\n b=fZc9AwGBR6byhhQJ2cTSsv1BAaM9JFtWByZ21zlK4vxvCHsu831HkulGtjUCAAQVAi\n 4rVuuj34FVHUXjjdtsXL39IwA3YGxevIjeCiFD+x1lChTGFUMHL9havD5R4rAlWNiJ50\n /oTzGVs3U/wdk/DMGjh86UUVjdxx6CjeASGMFxplkYUxZNbkv/F2o39x98DP/yJR9yRt\n xcYnri3VsyLc136uLdc/HHDqQ56V4F9VDlZbyCXAW3aAl3OPxXgw5xCE4L8h417duava\n yNf1lOHuFloNJEyBZaNfuKIpEQxCPlSdG7zRjhWCwR1qEDYWNcZ9yCr6hgrgnvhvb8ce\n PDYA==", "X-Gm-Message-State": "AOJu0Yw46S96DXPnNgVTZuOFQzyB9C4SxpPHbUVQ2zVO4bYyG0uxt1wJ\n MouD2bI8hhiiugRqoh9ZGLHVc4l5euImEMo1EeG2PgTzIfGjfhmvvjGdn/17hjm8exrmf8RAcYo\n P5UDixSw=", "X-Gm-Gg": "AY/fxX7BZzcGzt3Nvipalx7CiEbDp+benOYWRTC4ovtnFaAdYf56is7NJVLzRuNlo64\n INDtKT9C3m6AkRzkm87Q8JRc8pMfE394sFP5oPb7kAncsps793G75ojSuDdR2ocrdCEVXa4JaY+\n NmHH9G8bqUjbE7lVQ/bizTPfUHyoG7g1fMCARkJN2thqxhI6UXFxVT6ml5o0ONlmAmO93Tu8x5u\n Mt8DvgPYu7HjU0AHJkc6Sv1qN74J2mFst3EREK3Buk9IjIo9EcKFRw/rfGsEWuUTXzjQTL8gpO5\n NbMcjiyAQ8TeHgC2GuoyYFWUgDlTXokz6rftBB1WX6lt14rrmEbyzRTkNu4xqHjPkHW2hZW4EVc\n xEpJawMLyliEYkMyaR/aenvowbIrFaaELKXhfXD5ZhqYDU5Pyft1810br9bfkLfjnrsWdBGlct6\n wTtWlZXPzHmECDPopKpCksNbGc/7GC9QRknw==", "X-Google-Smtp-Source": "\n AGHT+IFUyprAlu0ICyMWD9cvK4GuTSpsNblplbfxHcMfuFCqJkuF6wx53R1UH50qUJiZp2bgFxeu1g==", "X-Received": "by 2002:a05:7022:ed02:b0:11a:f5e0:dc8 with SMTP id\n a92af1059eb24-11f34c4ce6dmr9223625c88.28.1765994163505;\n Wed, 17 Dec 2025 09:56:03 -0800 (PST)", "From": "Adhemerval Zanella <adhemerval.zanella@linaro.org>", "To": "libc-alpha@sourceware.org", "Cc": "\"H . J . Lu\" <hjl.tools@gmail.com>, Collin Funk <collin.funk1@gmail.com>,\n Sam James <sam@gentoo.org>", "Subject": "[PATCH 2/8] x86: Do not use __builtin_fpclassify for _Float64x/long\n double", "Date": "Wed, 17 Dec 2025 14:51:48 -0300", "Message-ID": "<20251217175554.1157780-3-adhemerval.zanella@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20251217175554.1157780-1-adhemerval.zanella@linaro.org>", "References": "<20251217175554.1157780-1-adhemerval.zanella@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libc-alpha@sourceware.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>", "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>", "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>", "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>", "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org" }, "content": "Neither gcc [1] nor clang [2] handles pseudo-normal numbers correctly\nwith the __builtin_fpclassify, so disable its usage for _Float64x and\nlong double types.\n\nThis only affects x86, so add a new header, fp-builtin-denormal.h, that\ndefines whether the architecture requires disabling the optimization\nthrough a new glibc define (__FP_BUILTIN_FPCLASSIFY_DENORMAL).\n\nIt fixes the regression on test-ldouble-fpclassify and\ntest-float64x-fpclassify when built with clang:\n\nFailure: fpclassify (pseudo_zero): Exception \"Invalid operation\" set\nFailure: fpclassify (pseudo_inf): Exception \"Invalid operation\" set\nFailure: fpclassify (pseudo_qnan): Exception \"Invalid operation\" set\nFailure: fpclassify (pseudo_snan): Exception \"Invalid operation\" set\nFailure: fpclassify (pseudo_unnormal): Exception \"Invalid operation\" set\nFailure: fpclassify_downward (pseudo_zero): Exception \"Invalid operation\" set\nFailure: fpclassify_downward (pseudo_inf): Exception \"Invalid operation\" set\nFailure: fpclassify_downward (pseudo_qnan): Exception \"Invalid operation\" set\nFailure: fpclassify_downward (pseudo_snan): Exception \"Invalid operation\" set\nFailure: fpclassify_downward (pseudo_unnormal): Exception \"Invalid operation\" set\nFailure: fpclassify_towardzero (pseudo_zero): Exception \"Invalid operation\" set\nFailure: fpclassify_towardzero (pseudo_inf): Exception \"Invalid operation\" set\nFailure: fpclassify_towardzero (pseudo_qnan): Exception \"Invalid operation\" set\nFailure: fpclassify_towardzero (pseudo_snan): Exception \"Invalid operation\" set\nFailure: fpclassify_towardzero (pseudo_unnormal): Exception \"Invalid operation\" set\nFailure: fpclassify_upward (pseudo_zero): Exception \"Invalid operation\" set\nFailure: fpclassify_upward (pseudo_inf): Exception \"Invalid operation\" set\nFailure: fpclassify_upward (pseudo_qnan): Exception \"Invalid operation\" set\nFailure: fpclassify_upward (pseudo_snan): Exception \"Invalid operation\" set\nFailure: fpclassify_upward (pseudo_unnormal): Exception \"Invalid operation\" set\n\nChecked on x86_64-linux-gnu with gcc-15 and clang-18.\n\n[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123161\n[2] https://github.com/llvm/llvm-project/issues/172533\n---\n bits/fp-builtin-denormal.h | 28 ++++++++\n math/Makefile | 1 +\n math/math.h | 89 +++++++++++++++++++++++++-\n sysdeps/x86/bits/fp-builtin-denormal.h | 25 ++++++++\n 4 files changed, 141 insertions(+), 2 deletions(-)\n create mode 100644 bits/fp-builtin-denormal.h\n create mode 100644 sysdeps/x86/bits/fp-builtin-denormal.h", "diff": "diff --git a/bits/fp-builtin-denormal.h b/bits/fp-builtin-denormal.h\nnew file mode 100644\nindex 0000000000..77b7184975\n--- /dev/null\n+++ b/bits/fp-builtin-denormal.h\n@@ -0,0 +1,28 @@\n+/* Denormal number definitions.\n+ Copyright (C) 2025 Free Software Foundation, Inc.\n+ This file is part of the GNU C Library.\n+\n+ The GNU C Library is free software; you can redistribute it and/or\n+ modify it under the terms of the GNU Lesser General Public\n+ License as published by the Free Software Foundation; either\n+ version 2.1 of the License, or (at your option) any later version.\n+\n+ The GNU C Library is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ Lesser General Public License for more details.\n+\n+ You should have received a copy of the GNU Lesser General Public\n+ License along with the GNU C Library; if not, see\n+ <https://www.gnu.org/licenses/>. */\n+\n+#ifndef _MATH_H\n+# error \"Never use <bits/fp-builtin-denormal.h> directly; include <math.h> instead.\"\n+#endif\n+\n+/* __FP_BUILTIN_FPCLASSIFY_DENORMAL is defined to 1 if compiler supports\n+ handling pseudo-denormal numbers with fpclassify builtin. Pseudo-denormal\n+ is a non-standard denormalized floating-point number only supported by\n+ Intel double extended-precision (long double). By default assume 1 to\n+ enable the usage of compiler builtin on math.h. */\n+#define __FP_BUILTIN_FPCLASSIFY_DENORMAL 1\ndiff --git a/math/Makefile b/math/Makefile\nindex f7a1d9016c..8fe2540ce0 100644\n--- a/math/Makefile\n+++ b/math/Makefile\n@@ -28,6 +28,7 @@ headers := \\\n bits/floatn-common.h \\\n bits/floatn.h \\\n bits/flt-eval-method.h \\\n+ bits/fp-builtin-denormal.h \\\n bits/fp-fast.h \\\n bits/fp-logb.h \\\n bits/iscanonical.h \\\ndiff --git a/math/math.h b/math/math.h\nindex 74b064d96e..cbec2f406a 100644\n--- a/math/math.h\n+++ b/math/math.h\n@@ -1064,6 +1064,86 @@ extern int signgam;\n : FUNC ## l ARGS)\n #endif\n \n+\n+/* Depending on the type of TG_ARG and extra DEFINE to check, either call the\n+ BUILTIN with ARGS_B or an appropriately suffixed version of FUNC with\n+ arguments (including parentheses) ARGS_B. The function call is used for\n+ long double and/or _Float64x is the builtin can not be safely used on all\n+ arguments (defined by DEFINE). */\n+\n+#include <bits/fp-builtin-denormal.h>\n+\n+#ifdef __NO_LONG_DOUBLE_MATH\n+# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t DEFINE) \\\n+ BUILTIN ARGS_B\n+#elif __HAVE_DISTINCT_FLOAT128\n+# if __HAVE_GENERIC_SELECTION\n+# if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT32\n+# define __MATH_TG_BUILTIN_CLASSIFY_F32(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+ _Float32: BUILTIN ARGS_B,\n+# else\n+# define __MATH_TG_BUILTIN_CLASSIFY_F32(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\n+# endif\n+# define __MATH_TG_BUILTIN_CLASSIFY_LDOUBLE(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+ long double: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F,\n+# if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT64X\n+# if __HAVE_FLOAT64X_LONG_DOUBLE\n+# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+ _Float64x: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F,\n+# else\n+# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+ _Float64x: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## f128 ARGS_F,\n+# endif\n+# else\n+# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\n+# endif\n+# define __MATH_TG_BUILTIN_CLASSIFY_F128(BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+ _Float128: BUILTIN ARGS_B\n+# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t DEFINE)\t\t\t\t \\\n+ _Generic ((TG_ARG),\t\t\t\t\t\t \\\n+\t float: BUILTIN ARGS_B,\t\t\t\t\t \\\n+\t __MATH_TG_BUILTIN_CLASSIFY_F32 (BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t\t DEFINE)\t\t\t \\\n+\t default: BUILTIN ARGS_B,\t\t\t\t\t \\\n+\t __MATH_TG_BUILTIN_CLASSIFY_LDOUBLE (BUILTIN, ARGS_B, FUNC, \\\n+\t\t\t\t\t\t ARGS_F, DEFINE)\t \\\n+\t __MATH_TG_BUILTIN_CLASSIFY_F64X (BUILTIN, ARGS_B, FUNC, ARGS_F,\\\n+\t\t\t\t\t\tDEFINE)\t\t\t \\\n+\t __MATH_TG_BUILTIN_CLASSIFY_F128 (BUILTIN, ARGS_B, FUNC, ARGS_F,\\\n+\t\t\t\t\t\tDEFINE))\n+# else\n+# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t DEFINE)\t\t\t\t \\\n+ __builtin_choose_expr\t\t\t\t\t\t \\\n+ (__builtin_types_compatible_p (__typeof (TG_ARG), float),\t\t \\\n+ __builtin ## BUILTIN ARGS_B,\t\t\t\t\t \\\n+ __builtin_choose_expr\t\t\t\t\t\t \\\n+ (__builtin_types_compatible_p (__typeof (TG_ARG), double),\t \\\n+ __builtin ## BUILTIN ARGS_B,\t\t\t\t\t \\\n+ __builtin_choose_expr\t\t\t\t\t\t \\\n+ (__builtin_types_compatible_p (__typeof (TG_ARG), long double),\t \\\n+\tDEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F,\t\t \\\n+\tBUILTIN ARGS_B)))\n+# endif\n+#else\n+# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \\\n+\t\t\t\t DEFINE)\t\t\t\t \\\n+ (sizeof (TG_ARG) == sizeof (float)\t\t\t\t \\\n+ ? BUILTIN ARGS_B\t\t\t\t\t \t\t \\\n+ : sizeof (TG_ARG) == sizeof (double)\t\t\t\t\t \\\n+ ? BUILTIN ARGS_B\t\t\t\t\t \t\t \\\n+ : DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F)\n+#endif\n+\n /* ISO C99 defines some generic macros which work on any data type. */\n #ifdef __USE_ISOC99\n \n@@ -1101,8 +1181,13 @@ enum\n \twith -Os. No further use of this definition of fpclassify is\n \texpected in C++ mode, since libstdc++ provides its own version\n \tof fpclassify in cmath (which undefines fpclassify). */\n-# define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE,\t \\\n- FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)\n+# define fpclassify(x)\t\t\t\t\t\t\t \\\n+ __MATH_TG_BUILTIN_CLASSIFY ((x),\t\t\t\t\t \\\n+\t\t\t __builtin_fpclassify, (FP_NAN, FP_INFINITE, \\\n+\t\t\t\t\t\t FP_NORMAL, FP_SUBNORMAL, \\\n+\t\t\t\t\t\t FP_ZERO, x),\t \\\n+\t\t\t fpclassify, (x),\t\t\t\t \\\n+\t\t\t __FP_BUILTIN_FPCLASSIFY_DENORMAL)\n # else\n # define fpclassify(x) __MATH_TG ((x), __fpclassify, (x))\n # endif\ndiff --git a/sysdeps/x86/bits/fp-builtin-denormal.h b/sysdeps/x86/bits/fp-builtin-denormal.h\nnew file mode 100644\nindex 0000000000..bfb8f54237\n--- /dev/null\n+++ b/sysdeps/x86/bits/fp-builtin-denormal.h\n@@ -0,0 +1,25 @@\n+/* Define __FP_BUILTIN_DENORMAL.\n+ Copyright (C) 2025 Free Software Foundation, Inc.\n+ This file is part of the GNU C Library.\n+\n+ The GNU C Library is free software; you can redistribute it and/or\n+ modify it under the terms of the GNU Lesser General Public\n+ License as published by the Free Software Foundation; either\n+ version 2.1 of the License, or (at your option) any later version.\n+\n+ The GNU C Library is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ Lesser General Public License for more details.\n+\n+ You should have received a copy of the GNU Lesser General Public\n+ License along with the GNU C Library; if not, see\n+ <https://www.gnu.org/licenses/>. */\n+\n+#ifndef _MATH_H\n+# error \"Never use <bits/fp-builtin-denormal.h> directly; include <math.h> instead.\"\n+#endif\n+\n+/* Neither GCC (bug 123161) nor clang (issue 172533) handles pseudo-normal\n+ numbers correctly with fpclassify builtin. */\n+#define __FP_BUILTIN_FPCLASSIFY_DENORMAL 0\n", "prefixes": [ "2/8" ] }