From patchwork Fri Dec 19 18:52:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 126905 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 705D84BA2E2F for ; Fri, 19 Dec 2025 18:57:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 705D84BA2E2F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IXe27GJG X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by sourceware.org (Postfix) with ESMTPS id 5A8A74BA2E1D for ; Fri, 19 Dec 2025 18:54:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A8A74BA2E1D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A8A74BA2E1D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.214.194 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170448; cv=none; b=YyoZI9qmq/t0lYUHIpQ/6qG4aj0Bm+VjFUollTLd9UzR4q1GufDVhsZaJ6zR+f7ZkOEbZirzWIZi/Qk5pPoiNPPRwRnrzXbwh3xti2w5QnS84zo9p9lE9B5MaW8VvTTMW5kV9/LPw/hpY88ObAaqLhQXS3LgXLpI3luNfEOv9go= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170448; c=relaxed/simple; bh=40J2vqYpSrZLCPR0NEVj2bOxZFmQa67t5xG+94Awccg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=orsOx767Jpjtsky6oSDvhC2EWRfe1sJDUEptvti3+DEwAlsze2rXuoTf6kCjMAn5l5WTKcKQMJWElXQUoGPlWbAhWev498zwq1t0ngrA9l6JTrPcai852LlxLX6cdR59hKp80Rpa3wT27NGkvOzD1I9StlZr9UxYu+30qdyqKqM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A8A74BA2E1D Received: by mail-pl1-f194.google.com with SMTP id d9443c01a7336-2a0b4320665so31459375ad.1 for ; Fri, 19 Dec 2025 10:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766170447; x=1766775247; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QrIGkXEk5CVxRaZH6Yyc3ZaCQMqm6sCUarAtEz+jrKQ=; b=IXe27GJGVeehgQI3ixCBg9cocKBWCcoEy//Hm2rFyFyn3RlmuwYtez1QPWI/GEk3j/ O6OhNezpEjqkTya3xSJ0ekpU+be8NxyVtYj2Bfo6bNsgSo9Lswji0uQJpYPaYWUaM84s Yc/k4jlc9Hy6c/iogcvAcug0fsyKxVdIFjDrxqHlHR+pvGY9QfH5fOuQK2ZS2BKePEZ2 TospnTbqK6qsYOys7uCwGvM378f2/cP7wUTr5BZbWUdB/kFYGi3/Fo8muxBrWddhsyg1 nMTKEUxpI01C6nPUb/JKEwTVNKZPQm8nhPlOuOExSFtQCQPZItm3m1JDoOTXpHS+LJV/ HByQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766170447; x=1766775247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QrIGkXEk5CVxRaZH6Yyc3ZaCQMqm6sCUarAtEz+jrKQ=; b=UbB64yHYF5f5lf9apJEh3nw7foLza7IY0ZYFtV17hKze0GDDVb17KDCa16U6GLTRqb pTm/RpSM4h2HEplD+bTLzoXQtmX6BfGs74ZhNsNVIvlKBPemCOa3s80ABajGXfEZmAWZ Ejp6gaDgIb/BrtPn13fkM6N70db6E/TRSHG8vMvNV/fF1IkalzWhzbQ9NHqxggyx2pYv mD2FgRd6NvrF5BfgAOrBhBef0TmWLo9TrOfD6qlAF9dRQCcFC4jSUMyrjMKOxtvZ4lij eGsPaKzWqsJJTupBhuA0xbCagjMBzIwFbwJo8zXm8eAWSKarOJ8R6l9qvmuF/NQD5Vnj OVSQ== X-Gm-Message-State: AOJu0YytT+3tuSoK9eN7OTydrTK+W3wSPD/gKaqq06TADQJ7rqw6BNcq zs0iaHDpleFr6sXIJWKdarZBlKmDyOHSly3bhnmhPwhSZwxW+2bTQ/OLWRhf8infvjZUbKPebL0 i0VL+cmaQ1Q== X-Gm-Gg: AY/fxX7G91zTmJsyPi6xDfAiIfRS8PsrFvZOfIbnc7nhNNQEpqPxg+gL8ooPtipJt/r FSjaAs7MYACTNrKLDWJ6jhkLbMtDg43Zbu/kwU2XN1cCF5bou4A6qnsSgRMFcY1Wn19mSpVlR7U yBI2jsbNR0mPWVsHJjvQ1CAGW/vtWpe6y7ZuiYXhiU0NgnW7hkS7zFj/Gjjn3bSbkhjZ8IqNH2e +VJG9PziJxOilnfZvHdJBi90ztTKIJKxu1gxO3yuicVYoMk+sSM2wqmMOzdGBkdfQMEMXDxNDMM PMKcRluxoY3gwTG7P+2FYF0M1yfOFE3mCDtrhwSUB1C9CHPcEfB3c2KQNq/anhFennjntUWPltp M0aSVPTzoRhTMcZXRPaEwZ3eLy+Xgir6jq942nl6FwlhI1vN27ukxasQDVsFqmNREh5Clrr1ZWx ky+Nk/3juNp7dSmJejgouIPYY= X-Google-Smtp-Source: AGHT+IET6K0XO121AssMdJ8LLmcan6Q+M/VKun/KNSQDINpWpABtzF8BkG4eZzLkyZUhibpcgGTUvQ== X-Received: by 2002:a05:7022:638e:b0:11b:87a0:fa9a with SMTP id a92af1059eb24-121722e7cabmr3769075c88.23.1766170446448; Fri, 19 Dec 2025 10:54:06 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9114:a36f:5c87:44a7:b42f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfa2csm9088941c88.3.2025.12.19.10.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:54:06 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Collin Funk , Sam James Subject: [PATCH v2 1/5] x86: Do not use __builtin_fpclassify for _Float64x/long double Date: Fri, 19 Dec 2025 15:52:20 -0300 Message-ID: <20251219185400.1618765-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> References: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Neither gcc [1] nor clang [2] handles pseudo-normal numbers correctly with the __builtin_fpclassify, so disable its usage for _Float64x and long double types. This only affects x86, so add a new header, fp-builtin-denormal.h, that defines whether the architecture requires disabling the optimization through a new glibc define (__FP_BUILTIN_FPCLASSIFY_DENORMAL). It fixes the regression on test-ldouble-fpclassify and test-float64x-fpclassify when built with clang: Failure: fpclassify (pseudo_zero): Exception "Invalid operation" set Failure: fpclassify (pseudo_inf): Exception "Invalid operation" set Failure: fpclassify (pseudo_qnan): Exception "Invalid operation" set Failure: fpclassify (pseudo_snan): Exception "Invalid operation" set Failure: fpclassify (pseudo_unnormal): Exception "Invalid operation" set Failure: fpclassify_downward (pseudo_zero): Exception "Invalid operation" set Failure: fpclassify_downward (pseudo_inf): Exception "Invalid operation" set Failure: fpclassify_downward (pseudo_qnan): Exception "Invalid operation" set Failure: fpclassify_downward (pseudo_snan): Exception "Invalid operation" set Failure: fpclassify_downward (pseudo_unnormal): Exception "Invalid operation" set Failure: fpclassify_towardzero (pseudo_zero): Exception "Invalid operation" set Failure: fpclassify_towardzero (pseudo_inf): Exception "Invalid operation" set Failure: fpclassify_towardzero (pseudo_qnan): Exception "Invalid operation" set Failure: fpclassify_towardzero (pseudo_snan): Exception "Invalid operation" set Failure: fpclassify_towardzero (pseudo_unnormal): Exception "Invalid operation" set Failure: fpclassify_upward (pseudo_zero): Exception "Invalid operation" set Failure: fpclassify_upward (pseudo_inf): Exception "Invalid operation" set Failure: fpclassify_upward (pseudo_qnan): Exception "Invalid operation" set Failure: fpclassify_upward (pseudo_snan): Exception "Invalid operation" set Failure: fpclassify_upward (pseudo_unnormal): Exception "Invalid operation" set Checked on x86_64-linux-gnu with gcc-15 and clang-18. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123161 [2] https://github.com/llvm/llvm-project/issues/172533 Reviewed-by: H.J. Lu --- bits/fp-builtin-denormal.h | 28 ++++++++ math/Makefile | 1 + math/math.h | 89 ++++++++++++++++++++++++- sysdeps/x86/bits/fp-builtin-denormal.h | 25 +++++++ sysdeps/x86/fpu/Makefile | 1 + sysdeps/x86/fpu/test-builtin-denormal.c | 53 +++++++++++++++ 6 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 bits/fp-builtin-denormal.h create mode 100644 sysdeps/x86/bits/fp-builtin-denormal.h create mode 100644 sysdeps/x86/fpu/test-builtin-denormal.c diff --git a/bits/fp-builtin-denormal.h b/bits/fp-builtin-denormal.h new file mode 100644 index 0000000000..77b7184975 --- /dev/null +++ b/bits/fp-builtin-denormal.h @@ -0,0 +1,28 @@ +/* Denormal number definitions. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +/* __FP_BUILTIN_FPCLASSIFY_DENORMAL is defined to 1 if compiler supports + handling pseudo-denormal numbers with fpclassify builtin. Pseudo-denormal + is a non-standard denormalized floating-point number only supported by + 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 diff --git a/math/Makefile b/math/Makefile index f7a1d9016c..8fe2540ce0 100644 --- a/math/Makefile +++ b/math/Makefile @@ -28,6 +28,7 @@ headers := \ bits/floatn-common.h \ bits/floatn.h \ bits/flt-eval-method.h \ + bits/fp-builtin-denormal.h \ bits/fp-fast.h \ bits/fp-logb.h \ bits/iscanonical.h \ diff --git a/math/math.h b/math/math.h index 74b064d96e..cbec2f406a 100644 --- a/math/math.h +++ b/math/math.h @@ -1064,6 +1064,86 @@ extern int signgam; : FUNC ## l ARGS) #endif + +/* Depending on the type of TG_ARG and extra DEFINE to check, either call the + BUILTIN with ARGS_B or an appropriately suffixed version of FUNC with + arguments (including parentheses) ARGS_B. The function call is used for + long double and/or _Float64x is the builtin can not be safely used on all + arguments (defined by DEFINE). */ + +#include + +#ifdef __NO_LONG_DOUBLE_MATH +# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + BUILTIN ARGS_B +#elif __HAVE_DISTINCT_FLOAT128 +# if __HAVE_GENERIC_SELECTION +# if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT32 +# define __MATH_TG_BUILTIN_CLASSIFY_F32(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + _Float32: BUILTIN ARGS_B, +# else +# define __MATH_TG_BUILTIN_CLASSIFY_F32(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) +# endif +# define __MATH_TG_BUILTIN_CLASSIFY_LDOUBLE(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + long double: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F, +# if __HAVE_FLOATN_NOT_TYPEDEF && __HAVE_FLOAT64X +# if __HAVE_FLOAT64X_LONG_DOUBLE +# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + _Float64x: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F, +# else +# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + _Float64x: DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## f128 ARGS_F, +# endif +# else +# define __MATH_TG_BUILTIN_CLASSIFY_F64X(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) +# endif +# define __MATH_TG_BUILTIN_CLASSIFY_F128(BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + _Float128: BUILTIN ARGS_B +# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + _Generic ((TG_ARG), \ + float: BUILTIN ARGS_B, \ + __MATH_TG_BUILTIN_CLASSIFY_F32 (BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + default: BUILTIN ARGS_B, \ + __MATH_TG_BUILTIN_CLASSIFY_LDOUBLE (BUILTIN, ARGS_B, FUNC, \ + ARGS_F, DEFINE) \ + __MATH_TG_BUILTIN_CLASSIFY_F64X (BUILTIN, ARGS_B, FUNC, ARGS_F,\ + DEFINE) \ + __MATH_TG_BUILTIN_CLASSIFY_F128 (BUILTIN, ARGS_B, FUNC, ARGS_F,\ + DEFINE)) +# else +# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + __builtin_choose_expr \ + (__builtin_types_compatible_p (__typeof (TG_ARG), float), \ + __builtin ## BUILTIN ARGS_B, \ + __builtin_choose_expr \ + (__builtin_types_compatible_p (__typeof (TG_ARG), double), \ + __builtin ## BUILTIN ARGS_B, \ + __builtin_choose_expr \ + (__builtin_types_compatible_p (__typeof (TG_ARG), long double), \ + DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F, \ + BUILTIN ARGS_B))) +# endif +#else +# define __MATH_TG_BUILTIN_CLASSIFY(TG_ARG, BUILTIN, ARGS_B, FUNC, ARGS_F, \ + DEFINE) \ + (sizeof (TG_ARG) == sizeof (float) \ + ? BUILTIN ARGS_B \ + : sizeof (TG_ARG) == sizeof (double) \ + ? BUILTIN ARGS_B \ + : DEFINE ? BUILTIN ARGS_B : __ ## FUNC ## l ARGS_F) +#endif + /* ISO C99 defines some generic macros which work on any data type. */ #ifdef __USE_ISOC99 @@ -1101,8 +1181,13 @@ enum with -Os. No further use of this definition of fpclassify is expected in C++ mode, since libstdc++ provides its own version of fpclassify in cmath (which undefines fpclassify). */ -# define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, \ - FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x) +# define fpclassify(x) \ + __MATH_TG_BUILTIN_CLASSIFY ((x), \ + __builtin_fpclassify, (FP_NAN, FP_INFINITE, \ + FP_NORMAL, FP_SUBNORMAL, \ + FP_ZERO, x), \ + fpclassify, (x), \ + __FP_BUILTIN_FPCLASSIFY_DENORMAL) # else # define fpclassify(x) __MATH_TG ((x), __fpclassify, (x)) # endif diff --git a/sysdeps/x86/bits/fp-builtin-denormal.h b/sysdeps/x86/bits/fp-builtin-denormal.h new file mode 100644 index 0000000000..bfb8f54237 --- /dev/null +++ b/sysdeps/x86/bits/fp-builtin-denormal.h @@ -0,0 +1,25 @@ +/* Define __FP_BUILTIN_DENORMAL. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _MATH_H +# error "Never use directly; include instead." +#endif + +/* Neither GCC (bug 123161) nor clang (issue 172533) handles pseudo-normal + numbers correctly with fpclassify builtin. */ +#define __FP_BUILTIN_FPCLASSIFY_DENORMAL 0 diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile index 91b2444f3a..2914be887e 100644 --- a/sysdeps/x86/fpu/Makefile +++ b/sysdeps/x86/fpu/Makefile @@ -9,6 +9,7 @@ tests += \ test-fenv-sse-2 \ test-fenv-x87 \ test-flt-eval-method-sse \ + test-builtin-denormal \ # tests ifeq ($(have-test-cc-cflags-mfpmath-387),yes) tests += test-flt-eval-method-387 diff --git a/sysdeps/x86/fpu/test-builtin-denormal.c b/sysdeps/x86/fpu/test-builtin-denormal.c new file mode 100644 index 0000000000..1fb8aeedf6 --- /dev/null +++ b/sysdeps/x86/fpu/test-builtin-denormal.c @@ -0,0 +1,53 @@ +/* Ccheck if math.h optimizations to call compiler builtin + does not trigger FE_INVALID on x86 denormal numbers. + Copyright (C) 2025 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include +#include + +#define pseudo_inf { .parts = { 0x00000000, 0x00000000, 0x7fff }} +#define pseudo_zero { .parts = { 0x00000000, 0x00000000, 0x0100 }} +#define pseudo_qnan { .parts = { 0x00000001, 0x00000000, 0x7fff }} +#define pseudo_snan { .parts = { 0x00000001, 0x40000000, 0x7fff }} +#define pseudo_unnormal { .parts = { 0x00000001, 0x40000000, 0x0100 }} + +static const ieee_long_double_shape_type inputs[] = { + pseudo_inf, + pseudo_zero, + pseudo_qnan, + pseudo_snan, + pseudo_unnormal +}; + +static int +do_test (void) +{ + for (int i = 0; i < array_length (inputs); i++) + { + TEST_COMPARE (feclearexcept (FE_INVALID), 0); + TEST_COMPARE (fpclassify (inputs[i].value), FP_NAN); + TEST_COMPARE (fetestexcept (FE_INVALID), 0); + } + + return 0; +} + +#include From patchwork Fri Dec 19 18:52:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 126902 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 4C5CA4BA2E1C for ; Fri, 19 Dec 2025 18:54:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C5CA4BA2E1C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=o66sqmPS X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by sourceware.org (Postfix) with ESMTPS id E84C64BA2E26 for ; Fri, 19 Dec 2025 18:54:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E84C64BA2E26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E84C64BA2E26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170450; cv=none; b=sYbAvMDvrshjCMoOpJYDeVwz7XSNhHDdNNh0Jczp2grJ2Wzm8XmckcXWfb3oINLUcvhKwPRkSZUz1PSq28uK1foprtjChg9rVV6UJX8BzyRRhy5rG4duIU4DP4Vgp3sgxkQ/yuxpFnJxzymS9uwG9TBQLEkqju7cNpVTIF/Ke1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170450; c=relaxed/simple; bh=X9lQ0f8dF9uMEiwVFRlhkP3fSbEX2oR6TUzb0E/wims=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QHfQkU5qBT3fcIlSXFnegiR9z7EsQWDnu4pKRz6vDxA/9R+Y+dRWFRcSAK/Mr00tuipYoedLs0eG4gPe/j0RZLuhRLQ8dAjiZ9omcE5qg1rRCol0muW3cx/iC3d8f/2ImtEQpbWGD+667p5jHfbnpWWYkXVf6mWxzb/gvR3dWGQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E84C64BA2E26 Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7b9c17dd591so1900113b3a.3 for ; Fri, 19 Dec 2025 10:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766170448; x=1766775248; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZB6t+LCSmDHDB2wEBDcvFiIOCPM7RajbYAPyeWM/P+U=; b=o66sqmPSk2L+bA2ev0cBEqDXBvB1ZwFfXD8cghI8zbTquyYgk3V+iIkfKCwgRD/xpy 3HXmtq7RAXrnORX4B/m50pOZCu5cxzLEAfzi51qBKGxE8+3LcXASeb7FOwJN8WrIUBz2 iE6MiW8pxi+v5+CPtXnSMAIzLaGGf0kLHyZY68qLYWvwwWRpPou82pRIkcaoqsKNvRE6 c88QjQzeP2sjur0DlKufcwuS0F7XL2K3ZNlRMwrnFEA62a/AzSVjy1Nc+MzgjzL9l7cC N0s1yV2R/1oIuvsSfS+y7kE1zkpbKGWhaVIO2lJkiZsd9okeVZzzteh65HZy6Ia2p1SH T1XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766170448; x=1766775248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZB6t+LCSmDHDB2wEBDcvFiIOCPM7RajbYAPyeWM/P+U=; b=TWtdNrqhDuo0IO60mR0oHuHFxfxis6bsKnYdWmfFfYeTZgrqns3njzbYFnKrlmbZ5K McJX5SizkGQ1PSqENwsjqbqC4DfT0N1LvyxErq/MdFlQI/oGL2wZJ4Gz0aiMqh9ofABu tJVspW0z0fYIB++gVVlsK9L3iZ9/iTxCI1MognytKefu+nPvN9Yw9zdYrN4eHwbojNob 0ml3EnK3qAO4vncT+zwUMDbvUb8sin5VAHfpkwFa2uv0qW2PxLn2K3nLdcPs69vA3uiK E+OSrM1Y9nCFDVVlVDXaT2pV46Y4SKPCx5mpeHAZHjP8zf4jA9sPjeQgNVS0utunnxCV C+Ng== X-Gm-Message-State: AOJu0Yx/p/HYHOOdXlAI/to/kZAwvswfyjHrnAQcWii1h4c34tAKl204 Lslw/e7lew+M4AZSKQlN9ul66jV7CYdV56ADMZgq438an3ynqyLYU9qmdGg+EFBbYsuPKyLelTI phA76KTw= X-Gm-Gg: AY/fxX4PeoDSOfBfOd+vWWFKmG267mrEf3hDKv/WjhbQ61q0zuWC9DyybxdjP1HqS5R NiRitktpy+jt1cTCdxmmtYhuuyosS6LDjhSSvyeeiNDQWojNd8hYqn0DAcJe9a6nfFBplvUkaKC KFb5Uz3DgdONrVEtMQjMsTXSOTEL3gGmJTZrvSBRfTryxmzbO4oPCG1llxA6m4x1NSfI5lnYIcS QBFSfsv79CEGbf4ZLJVpXO8to82qKtHDNwMNY4jjQtiUGRabKiGJHCUQdQk5GESxVRjUbSXc/4d JxidvTTtARck1nJuiN8ofLcUMhM6DMBYsZaiWOqhLB5G9D+LLRX978sP69fwZSNPMixn9xezKzV L355ritin5WXrvy6jE/t9J89ZFLjHcTovLwNs75PyldgKg/RGPWM5Rd1INUBCegG07uYb0PNAQk kv72EOrqk07OJoT4lbHFqAJds= X-Google-Smtp-Source: AGHT+IGhmylcL77xhmEoFDEWSes/+yQYLhGp3jXiYDWcofc5+LzvNQT/QmCZIWP4vZZz//e2AgSVMQ== X-Received: by 2002:a05:7022:3b8d:b0:11d:f440:b695 with SMTP id a92af1059eb24-121722b8251mr3686148c88.16.1766170448302; Fri, 19 Dec 2025 10:54:08 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9114:a36f:5c87:44a7:b42f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfa2csm9088941c88.3.2025.12.19.10.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:54:07 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Collin Funk , Sam James Subject: [PATCH v2 2/5] x86: Do not use __builtin_isinf_sign for _Float64x/long double Date: Fri, 19 Dec 2025 15:52:21 -0300 Message-ID: <20251219185400.1618765-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> References: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Neither gcc [1] nor clang [2] handles pseudo-normal numbers correctly with the __builtin_isinf_sign, so disable its usage for _Float64x and long double types. This only affects x86, so add a new define __FP_BUILTIN_ISINF_SIGN_DENORMAL to gate long double and related types to the libc function instead. It fixes the regression on test-ldouble-isinf when built with clang: Failure: isinf (pseudo_zero): Exception "Invalid operation" set Failure: isinf (pseudo_inf): Exception "Invalid operation" set Failure: isinf (pseudo_qnan): Exception "Invalid operation" set Failure: isinf (pseudo_snan): Exception "Invalid operation" set Failure: isinf (pseudo_unnormal): Exception "Invalid operation" set Failure: isinf_downward (pseudo_zero): Exception "Invalid operation" set Failure: isinf_downward (pseudo_inf): Exception "Invalid operation" set Failure: isinf_downward (pseudo_qnan): Exception "Invalid operation" set Failure: isinf_downward (pseudo_snan): Exception "Invalid operation" set Failure: isinf_downward (pseudo_unnormal): Exception "Invalid operation" set Failure: isinf_towardzero (pseudo_zero): Exception "Invalid operation" set Failure: isinf_towardzero (pseudo_inf): Exception "Invalid operation" set Failure: isinf_towardzero (pseudo_qnan): Exception "Invalid operation" set Failure: isinf_towardzero (pseudo_snan): Exception "Invalid operation" set Failure: isinf_towardzero (pseudo_unnormal): Exception "Invalid operation" set Failure: isinf_upward (pseudo_zero): Exception "Invalid operation" set Failure: isinf_upward (pseudo_inf): Exception "Invalid operation" set Failure: isinf_upward (pseudo_qnan): Exception "Invalid operation" set Failure: isinf_upward (pseudo_snan): Exception "Invalid operation" set Failure: isinf_upward (pseudo_unnormal): Exception "Invalid operation" set Checked on x86_64-linux-gnu with gcc-15 and clang-18. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123173 [2] https://github.com/llvm/llvm-project/issues/172651 Reviewed-by: H.J. Lu --- bits/fp-builtin-denormal.h | 4 ++++ math/math.h | 5 ++++- sysdeps/x86/bits/fp-builtin-denormal.h | 4 ++++ sysdeps/x86/fpu/test-builtin-denormal.c | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bits/fp-builtin-denormal.h b/bits/fp-builtin-denormal.h index 77b7184975..5748eb86f0 100644 --- a/bits/fp-builtin-denormal.h +++ b/bits/fp-builtin-denormal.h @@ -26,3 +26,7 @@ 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 cbec2f406a..96b64379f7 100644 --- a/math/math.h +++ b/math/math.h @@ -1249,7 +1249,10 @@ enum ? __isinff128 (x) : __builtin_isinf_sign (x)) # elif (__GNUC_PREREQ (4,4) && !defined __SUPPORT_SNAN__) \ || __glibc_clang_prereq (3,7) -# define isinf(x) __builtin_isinf_sign (x) +# define isinf(x) __MATH_TG_BUILTIN_CLASSIFY ((x), \ + __builtin_isinf_sign, (x), \ + isinf, (x), \ + __FP_BUILTIN_ISINF_SIGN_DENORMAL) # 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 bfb8f54237..2f9a5c7b66 100644 --- a/sysdeps/x86/bits/fp-builtin-denormal.h +++ b/sysdeps/x86/bits/fp-builtin-denormal.h @@ -23,3 +23,7 @@ /* 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 1fb8aeedf6..52eb551d2c 100644 --- a/sysdeps/x86/fpu/test-builtin-denormal.c +++ b/sysdeps/x86/fpu/test-builtin-denormal.c @@ -45,6 +45,10 @@ 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), FP_NAN); + TEST_COMPARE (fetestexcept (FE_INVALID), 0); } return 0; From patchwork Fri Dec 19 18:52:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 126903 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 1D2544BA2E07 for ; Fri, 19 Dec 2025 18:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D2544BA2E07 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Q1kEwxDm X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by sourceware.org (Postfix) with ESMTPS id CC02C4BA2E27 for ; Fri, 19 Dec 2025 18:54:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC02C4BA2E27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CC02C4BA2E27 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170452; cv=none; b=vz+xABHBpKv/z6A9xbiFs3HJPZr3mmwzTaBNQrE4QZov9Wf/1hotJzBn53Yn3Cin4Unu4SsgLEWCUAd1f+vIzZe/36QzG6mYaJ58ugAeCdDjanXbtGZzXzH+FuEgL5FhCbyKMFJ6jiW3sRg5wF5PLTwqrwM3kMPJmzYxyptaJT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170452; c=relaxed/simple; bh=FdkRAxtmy1d48jBPMcacrf5+6eoMrIyXuY05cE6mhmA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=QKbkBIxvpcsmd8tY8Agymd2rBVdpHMqMCfvcMFkByl4hPogGHkBoRnf4txSKOAvGdCWAuQU7eIu0aGlWf6cHL0DFZ6JW+hPg6rwOZP2Q03S0KmQq32s91up5JnSH9bkMh5zo2R/XbzhPmX9Xf/T8h1CnYk7fZl2hAcjovzrVYao= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC02C4BA2E27 Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-29efd139227so27338215ad.1 for ; Fri, 19 Dec 2025 10:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766170450; x=1766775250; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z9Ph/wn82IPGTIKNNOJXcOPKc/fO4pdYpkF01B26s7Q=; b=Q1kEwxDmKkcdaM9rdttTbpq99AiuZTC3/ytQYViTmJSUGlTw27LFKoTGqRqf86dzCD yaj7uSR63D849eeUagml2mYEWKE+FZ+nvSwCqsfIL0CqxVO5zMDQSN3oTgzRmHTMH7Ie dkFjiNGXAiQbWWvQd7eLSP5Q/moYvQCozbrVxfmdbppiPVM0BCbxWR/mbKGibhH99fMW ar+RyiBfgTtfRoJooKzxxmbIkN6E/jFhiD4DDePPJ2d2gN/7lEwDTjVe+zN6GuTpvTH1 gW+5O5SL3HgO3jSFNY5mfSyDLQRfg8WbCXVoP9cS0wCh6o8EK5txmDtP6b5BLpIDMovr HKAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766170450; x=1766775250; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Z9Ph/wn82IPGTIKNNOJXcOPKc/fO4pdYpkF01B26s7Q=; b=DSAcHqQuPQzOnz5YicETdlAFklYx+3EXccxsTDJwbKwp3xBLaEZlfSvJNWXLdzwgGn Td7gKq+7ggY7V7TRQaKgJN8+wTT4jW0UQGib6fsdQcj3ah6AALN4CF9sP9gDAl7VqEc1 oRb0lRXOLhrHJeBWgktFvRbRk8XiORIW12DrWgU2DQn4Q7H06s4GXfzBPy9hhxmzuYUR MIluPAhr0Ap+1JC57aCcXVuEIIFM876l0iwvpf46Bg2eeL1NAIgb+5BNjeXE8LQF2K5z CC/NWmHwbjl6kEusk9P3AIFTkKrmJyDGlXH67nsMyeGRZxt6ouH8y6/ecnqAR3EV9six UXxQ== X-Gm-Message-State: AOJu0YyUlVkBFTZ4m1BG5J/bDDNF6bJOqDjP2hLCeOU97eWahhMTTCnN cz/JUw9AZX9Lk0ZTa/8nwEkF55+IIDonwYEW4PpwtZ5YkmKcNP4zbTrgmVpT/AYuAVBsol3YIFs tTnn0YiA= X-Gm-Gg: AY/fxX7g+YgSkwPO18GPqK8PfRQ45z18NYbz0GeIrSgTnvWTlslkOv7EsSTTmfG55Ku a7i2+QbPx4nNcEXzCLx+tDH9WfEm+zCs31VyS5O7GlKzHiqKUr4u5If1Zs1T8IYX72DbtKRB//W gUtqwaYipkmBJ96aAoavoTM/k3ZGq4w23oNzeSTTSWTTnvzpWYBeNtZl3ecqVjFIL/MzyC0aaC4 MJCRI0iCRllRYwDntgrxRuDpgKTzZZBbB3f0i1KnWzvGOvmHl9Z3T2U/PpntQtaejcf1wSC4lKF Q0eAexPDZxqB9o1vTdCMyvmTuVdg5ov8TX9SQ8WoTkS+Tjpi/L8OjqLGrWfxwvlGNuRdk8IDx+y YB0+huypiL5o2ZVeOHklyb3+NDRN53VHDpTbnghoW5ZYoLw75sNjuRhlkIIcjy9wfpH/r1EQSxS gxQmmR+yHStiKaduTsRIWzqoU= X-Google-Smtp-Source: AGHT+IECsCiA73iSf+uNP5CZqS/IbpyJrxOJU9UYUFUqvTzMbQBzHhPgEZzXr2vUxpDgM/aYzLzCfQ== X-Received: by 2002:a05:701b:2215:b0:11b:65e:f40 with SMTP id a92af1059eb24-121721acfcbmr3431026c88.5.1766170450187; Fri, 19 Dec 2025 10:54:10 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9114:a36f:5c87:44a7:b42f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfa2csm9088941c88.3.2025.12.19.10.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:54:09 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Collin Funk , Sam James Subject: [PATCH v2 3/5] stdio: Fix tst-vfprintf-user-type on clang Date: Fri, 19 Dec 2025 15:52:22 -0300 Message-ID: <20251219185400.1618765-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> References: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The pointer alias comparison will be optimized away by the compiler, so use an indirection point to prevent it (similar to malloc/tst-malloc-aux.h). Reviewed-by: H.J. Lu --- stdio-common/tst-vfprintf-user-type.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdio-common/tst-vfprintf-user-type.c b/stdio-common/tst-vfprintf-user-type.c index 3fc98b30f1..3bcca88974 100644 --- a/stdio-common/tst-vfprintf-user-type.c +++ b/stdio-common/tst-vfprintf-user-type.c @@ -183,7 +183,9 @@ do_test (void) #else extern int asprintf_alias (char **, const char *, ...) __asm__ ("asprintf"); #endif - TEST_VERIFY (asprintf_alias == asprintf); + static __typeof (asprintf) * volatile asprintf_indirect = asprintf; + TEST_VERIFY (asprintf_alias == asprintf_indirect); + char *str = NULL; TEST_VERIFY (asprintf_alias (&str, "[[%P]]", 123L, 456.0) >= 0); TEST_COMPARE_STRING (str, "[[(123, 456.000000)]]"); From patchwork Fri Dec 19 18:52:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 126904 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 045BE4BA2E05 for ; Fri, 19 Dec 2025 18:57:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 045BE4BA2E05 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=k2bQnLmu X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by sourceware.org (Postfix) with ESMTPS id 9C9344BA2E1E for ; Fri, 19 Dec 2025 18:54:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C9344BA2E1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C9344BA2E1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170453; cv=none; b=Gm0Y12Psx/IEq2t8S3lD0SD/uJOd+doRAPxk/SxQ9HUiBUPB8kf1JYTyhcUsU0cFtmC5E+gRCk6XGX7+YuQj2oUfSUAOwLsP92N97p6I23FZY5gVmvegFR7W3LkE/S6m1+Wbbjx0CIYpelEHkrkTjxwgginzbQzjg0pc7V5oTNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170453; c=relaxed/simple; bh=Cc7qCFWy0PVHfgUSokUUHoH4k2Jmgf8UZ1DrfbNS/Cc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WoHSZs72AbUPClgz50yV6gYAqdQhb3zcwJ41cTp3iNY5W7xZojRyUTS2HMj4ZZFIUH2tiAJTkFCzG3NOIZSgLn7h2HS6RziP5mJhdJLRVNeArX6TCfWvTj4Gjsl3uE+eWOdEuMY47ZU+SvGjVE3GZmpJZFI/mRF8uQZGBzyK+t0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C9344BA2E1E Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7e1651ae0d5so1695863b3a.1 for ; Fri, 19 Dec 2025 10:54:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766170452; x=1766775252; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P3fvAOoDPRw0hwrSmzv7pxtpo7RoZHbooNorzzzLoFk=; b=k2bQnLmunTYtt4dUOjR/xN5C601tLd7oP6ntWyhPylx1wecAsoHcaip8OKrPEYkM9i wImBz/bli8r2tX0m9wwvZa9qvfAH3hm07XRlf3qBqdHDRluQKHhThYKHdLoRYL6OCxqA flzOR6foSF+uqAHPRyslCxtBNx+abuTv6D/1VoXgnj57NcgTaX4XhWezvUHQxo/57ncw zdBbAaV9VNPFcjnjHOgLyncyYCW0sd4LMS7KdnNy0FZhsJKMT9+vKJ4nP9lzpY4vD5Hq 2CWSEql9joGEfZs0JUmA5rWaRvHWRsYUHx/W3ULx4XxjxrLaxoY7fYCQp9NcPZXGzJto zWKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766170452; x=1766775252; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=P3fvAOoDPRw0hwrSmzv7pxtpo7RoZHbooNorzzzLoFk=; b=OB2ZyhitmYkiVHkdxqlLFUHuyMUnx7milIoA/pRFkTfdgP1VOReEvARFv0fvviYL1U w+b/GiPH4m3XoYf+q2/qc6nQGNb8hewRCPGrQSU1JjGf++AJBr5ZGu2wMZKzbbdYtTyy kOQ1a+i4kriEBAQyenlDmo27JGhRiV/URlLwOviSTx6EAsVVaxWa5cQ9OJhrS7E/v9Sp jMxcgBdelbX1xE2ElitGuP/LQt/YzLAkSCyeRz7y+jhmNttcPEm0vqwUldfGHmwza5Y/ V/9YuFz67wPjiw0D1odS3vXjeqqpBzjy9zOanhLPW9AiXJAWys9tBys5gaDKXUq9N+BE SWzQ== X-Gm-Message-State: AOJu0YzZdS2/0C9ESS8qMoI0sokfgUZ3/Ms0y6Jvid/oxVH1BbP9ajmk UkqaA9+DE50aC3ykWKX/W4nSrPcTHl9PcQh769ydw/PIjK3iJxGDx8sN0xFMXci0FkaS/lNtZn6 oH2F7Uhg= X-Gm-Gg: AY/fxX5LgQOvrH7JJdvbYEWWYNKl3kW8xvHqjHD7Y6e4a9b50bTZcjWnUCkB0gnQr4Y zIz5pNbD2c7+ib2uWEt+HQtbhwDJUdxizucf/B1MgJIRBkHxPpZWKola+JRy+atbC9bwLKpg0PM scs0Bdu1AuaZIgB22UGFvZNZJf6x5aX1s7lAB0wAI5mrkK8zkhQMDTONJbB0OarNIvJk7SHd0xw Pt0Wtdgds4u2EOQuI9lnD9hycFrhFYghVG6NvZgE5RqU4ahZxE0Wemhjkz4f5oOLCIDa0ChmC8H VxbWZxQg/E8EAY63L1vqOmQc9lfaSEMZUk8ZuYB5HAL0i+ot+58DwckxPpvghhwo5GyrU0RJnPQ 7HkoUCnoilVodo9/GS9ypogmu+EfXT4UCN6IyoIswYJqilu2ZFPKPSrQfrxKu/eqbiZnU6rXafk HKrDeioEVek3Z1Hz4OqCJIxqE= X-Google-Smtp-Source: AGHT+IEF77s4hjz7hnJuNLhAv4unm0IgUntMQUQlBYa/pKfvcyphM12zqm3Wupfom0O9WIqdxnw0FA== X-Received: by 2002:a05:7022:4190:b0:119:e56b:98b8 with SMTP id a92af1059eb24-121722ebb6cmr4071222c88.31.1766170452038; Fri, 19 Dec 2025 10:54:12 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9114:a36f:5c87:44a7:b42f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfa2csm9088941c88.3.2025.12.19.10.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:54:11 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Collin Funk , Sam James Subject: [PATCH v2 4/5] math: Use math_opt_barrier on ldbl-128 powl underflow/overflow handling Date: Fri, 19 Dec 2025 15:52:23 -0300 Message-ID: <20251219185400.1618765-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> References: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This avoids compiler to move the operation before the 'iy' compare. It fixes math/test-float128-pow regreesions when building with clang [1]: Failure: pow (-0x1.000002p+0, 0xf.ffffffffffff8p+1020): Exception "Underflow" set Failure: pow (-0x1.000002p+0, 0xf.ffffffffffffbffffffffffffcp+1020): Exception "Underflow" set Failure: pow (-0x1.000002p+0, 0xf.fffffffffffffffffffffffffff8p+16380): Exception "Underflow" set Failure: pow (-0x1.000002p+0, 0xf.fffffffffffffffp+16380): Exception "Underflow" set Failure: pow (-0x1.000002p+0, 0xf.fffffp+124): Exception "Underflow" set Failure: pow (-0x1.00000ep+0, 0xf.ffffffffffff8p+1020): Exception "Underflow" set Failure: pow (-0x1.00000ep+0, 0xf.ffffffffffffbffffffffffffcp+1020): Exception "Underflow" set Failure: pow (-0x1.00000ep+0, 0xf.fffffffffffffffffffffffffff8p+16380): Exception "Underflow" set Failure: pow (-0x1.00000ep+0, 0xf.fffffffffffffffp+16380): Exception "Underflow" set Failure: pow (-0x2p+0, -0xf.ffffffffffff8p+1020): Exception "Overflow" set Failure: pow (-0x2p+0, -0xf.ffffffffffffbffffffffffffcp+1020): Exception "Overflow" set Failure: pow (-0x2p+0, -0xf.fffffffffffffffffffffffffff8p+16380): Exception "Overflow" set Failure: pow (-0x2p+0, -0xf.fffffffffffffffp+16380): Exception "Overflow" set Failure: pow (-0x2p+0, -0xf.fffffp+124): Exception "Overflow" set Failure: pow (-0x2p+0, 0xf.ffffffffffff8p+1020): Exception "Underflow" set Failure: pow (-0x2p+0, 0xf.ffffffffffffbffffffffffffcp+1020): Exception "Underflow" set Failure: pow (-0x2p+0, 0xf.fffffffffffffffffffffffffff8p+16380): Exception "Underflow" set Failure: pow (-0x2p+0, 0xf.fffffffffffffffp+16380): Exception "Underflow" set Failure: pow (-0x2p+0, 0xf.fffffp+124): Exception "Underflow" set [...] Checked on x86_64-linux-gnu and aarch64-linux-gnu with gcc-15 and clang-18. [1] https://github.com/llvm/llvm-project/issues/173080 Reviewed-by: H.J. Lu --- sysdeps/ieee754/ldbl-128/e_powl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/ieee754/ldbl-128/e_powl.c b/sysdeps/ieee754/ldbl-128/e_powl.c index 4e20616705..9ff5a43573 100644 --- a/sysdeps/ieee754/ldbl-128/e_powl.c +++ b/sysdeps/ieee754/ldbl-128/e_powl.c @@ -279,9 +279,11 @@ __ieee754_powl (_Float128 x, _Float128 y) if (iy > 0x407d654b) { if (ix <= 0x3ffeffff) - return (hy < 0) ? huge * huge : tiny * tiny; + return (hy < 0) ? math_opt_barrier (huge * huge) + : math_opt_barrier (tiny * tiny); if (ix >= 0x3fff0000) - return (hy > 0) ? huge * huge : tiny * tiny; + return (hy > 0) ? math_opt_barrier (huge * huge) + : math_opt_barrier (tiny * tiny); } /* over/underflow if x is not close to one */ if (ix < 0x3ffeffff) From patchwork Fri Dec 19 18:52:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 126906 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id EBB664BA2E2E for ; Fri, 19 Dec 2025 18:57:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EBB664BA2E2E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=KWd4Hl7N X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by sourceware.org (Postfix) with ESMTPS id 6020B4BA2E28 for ; Fri, 19 Dec 2025 18:54:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6020B4BA2E28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6020B4BA2E28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170455; cv=none; b=T9aG7DNj10WZy7Spgdl/CUcUwXAbetcixOJiELIBEaneiWwUzRmEuGBSYk8Wr4UBUvf9FriSA5x9Nnr94ttF0xGVizmabf0qN2/sDTdfhI5pYYFU2v+dQFgQ/s5dQ8DicBQkCiTQ6ymcwlOq9EowBgtpiOBL7qTrblFp6T3Kxyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766170455; c=relaxed/simple; bh=RBDyC4LxSNLqrde241+HEmfwsY/SWR6WK7O+elmuV+U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gb510OZga3khUGFypu0vhNY5If8c1a7HlZd/T3BQgL9of8PBU9CjktU9oUTaGDNpdNYoZj4hGSs7Ak2fv+DEKAHrwxnb7qVsI6WMWCdhT3RDI/+EVMHByc1mozHLiCjIuqOeWQxAnKBlaUZn/FFV+GnYPDp9qB15f4QxThpeeic= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6020B4BA2E28 Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7bc248dc16aso1857237b3a.0 for ; Fri, 19 Dec 2025 10:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766170454; x=1766775254; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lStIB4qpGs1z0ocRTU6bHgRp2+SWdK+kbUaD9eyCAV0=; b=KWd4Hl7NRMF3M2lvpODd+zYHjwzlPvTg8gYwdiYfO+vS5TTJeVKdWNkBkZvFIznn3I zjHTcbzZDworVraGHUYpxPyR8CmJp/8sg+kSU/AQCX5Kifrgw/Nd9KEU5KrOF3MwIU+J rouJrOIbCTvh+u9oQCO8cdkSdKUj6MZPvJBNBlb7NAqZnWDTQRpVu5mHY844iofoGczs h42edybr0AB0cdnVf4INjtxH5LPok+0KaInYOd9aGajfTHIaZIP6k+gFQ+D2r/FH55UR KxYa+v9nBXFTAlFCo3xokgB+6r7CGFMuO5fbss8z9MYmHOrUorMeTjy94FMkgNMx2EzY biuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766170454; x=1766775254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lStIB4qpGs1z0ocRTU6bHgRp2+SWdK+kbUaD9eyCAV0=; b=RNXJTQqUyPdGoIBt0tEHSo4W4o9sqqGmWxfYAIHiwoynGpvsWlgjM/BuH03mLKtJEs 3vbLZznitXX4F5dfv1k7DSQXgOy8Oi+iNx2Z57ra/ZfGz1jOiT6lFWUhrR1r6GwouL1C nyaYFErIaGoLV1MqPT5YTnuFnn5pbUneHcU5xCs5tPADVAAUagnYKRGSdnbNigvAL41D kkJvvmueI9QZqz8/N7xpspWNwmCh6F7RgnuriE3nEzVq9kddtV/YnTQASDferL9p4DEH IdmM2gPBcU4+G5DxmZJXjwe33W4zbmdnEKxU6EQNgsRjqpzh2IOqiEGKe0Uw3DQuFbtC NsDQ== X-Gm-Message-State: AOJu0YyF/uBcBqwvQrfONNpsnx4cazJjNHwqkrVePDRxCFOJynf33c4C 0TmrkGM1uBmVxN2e/W/bBUk6oFRNczs7to/2hhRkBUVvrZO/NZ3XK1Hal7E/QM/aLRNiamHbz5O tGBFHjN8= X-Gm-Gg: AY/fxX7+r92InX4a0XhWT28j9ZjsCtmgJLECBmBB9bDrbHhBbxEGiCBMih9BkGmgajW VOsT24KMoAqK6W5yNxTWjZJcNnhvwLglBFgINCL5D3ho3ZiMYRQQIXjNllGnDgZTrDGwUlYbPh7 ZT3cOgumvBbRh+QiNKBrrpX1LssZIXYIHgGA/qgH7xy1owHiqwyB7eD5QQn4JYoqX5LQ9vjwOJY PkkoJboYIh6imvogFCEOY6q7i866qPiEAJ/NwNEnZl+5tcQGJbjqgX86bsE8+Sj8wR9SHC3Jahv QNcKnJEDdse//vjN1DrMb5cbu8JtIAU+gZDqlSVM1Emy34SptVHq27u7oPOzSG9uNJYQRoW43zf P2CyqMC/KUU12QJOcYPj8PnE/LMrC0x/CNd7KHL6uJcGkEteus/PL2sFltqqIaNF8DYKhemKqEo EBkCUyRY6HVoIdkdW+3RKGYjQ= X-Google-Smtp-Source: AGHT+IG0FyfdtiEk3oZSONokFNmFNtPN/O6t28h7wZjgMwEnwPVyXOtJ1clx+J0awt8QdZbFZAO9Ug== X-Received: by 2002:a05:7022:e11:b0:11b:7dcd:ca9a with SMTP id a92af1059eb24-12172302438mr5395605c88.34.1766170453908; Fri, 19 Dec 2025 10:54:13 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:9114:a36f:5c87:44a7:b42f]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-121724cfa2csm9088941c88.3.2025.12.19.10.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:54:13 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" , Collin Funk , Sam James Subject: [PATCH v2 5/5] misc: Enable tst-atomic for clang Date: Fri, 19 Dec 2025 15:52:24 -0300 Message-ID: <20251219185400.1618765-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> References: <20251219185400.1618765-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The atomic.h macros now uses compiler builtins. Reviewed-by: H.J. Lu --- misc/tst-atomic.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/misc/tst-atomic.c b/misc/tst-atomic.c index 5537354def..04eff6eecd 100644 --- a/misc/tst-atomic.c +++ b/misc/tst-atomic.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see . */ -#ifndef __clang__ #include #include @@ -253,12 +252,4 @@ do_test (void) } #include -#else -#include -int -main (void) -{ - return EXIT_UNSUPPORTED; -} -#endif