From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 116C51F44D for ; Thu, 28 Mar 2024 14:12:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hChnCoIg; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C41DC3858403 for ; Thu, 28 Mar 2024 14:12:16 +0000 (GMT) Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 64DBC3858D1E for ; Thu, 28 Mar 2024 14:11:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64DBC3858D1E 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 64DBC3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711635117; cv=none; b=QdyStMcyEmNqPurwdDFObl1TWqKL2Z+CuDcRHr98Sb3I0DY8zhzXgOf9FwZBBXi/OXF361uSZmHNKfn7FSWgQqZz7TL13j9pHCILSemivxUEHn1WHvWIs9lSFbWoJSv9fVlheqJy2WFFL+36Iz2HAUmggb+nv0sgvz77MZETJzQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711635117; c=relaxed/simple; bh=kpYjrEkyDJx5WFLO4EJb32hBW/4TKiTrAM4IkmZs1eE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=BmyNBXPifpO42/Z7GFfqwokiTmKic5Mu7zCMZpK1KPwfMpPJrodqwF72vDst0cJRwRAhVo4xxgxw9BXSQibweWFhPwyU/bfsoG43QPebalxCgaGa4q2PXmTzH6shspLSFwaP76cj3yiktohIod7lkbJAOJGrxtmI8JqRELYtVBU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1e2266655b1so1344685ad.2 for ; Thu, 28 Mar 2024 07:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711635114; x=1712239914; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=/zOl5RkwCWp2BNCf1g0s2HZLp7czruH5D+iTw6ZZlx4=; b=hChnCoIgM/Fu9y35rMtZf7NflHmGxwBMFnhuTcKDQb/Ot3q2mW6t9dP7LpRW7SNiHN 26SLJz7ZcJU630KNt2z8fD6IFM+wsZ+jOx+nbBh0AkhsIRTwPdsBrGFtfmtzNA0ZIIDT 4oa1d/1UiWPfnWquKt79Y7D8o6YozLJA+jRJ/EVHyJyUPsqeQz9ozMoZu7cbXf0Xxivd +ADNZcAm7HCOaRuP3AF1wp/vx9aVksAwVduJ7Soq3Sg2XrjzrdF5zKSXBOBTjS9gPq/S /ObC/mClEHUqmlffdL1UmFnertdsv1neA300Fbm1MiClbxv0PGBxeVNninS/qH/36f53 YGmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711635114; x=1712239914; h=content-transfer-encoding:in-reply-to:organization:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/zOl5RkwCWp2BNCf1g0s2HZLp7czruH5D+iTw6ZZlx4=; b=GzCGPg35kBL3PxmsoFsfBNrh5mGG5izfTDJDvM/F0znNM4mzgBayaxO84TG0nAQypZ ie7RDvA2uhtB4qQKsgPhsgGhtOqtR7w4iv6fmkbR3SEtDmGr/sstD6IhQAUtP5pDN0Bz zG96dfmkFTQSc00VXe6DL3ENP3QJbDudT06VVxYMQd3+DNTDyHTr8EdNmlJR8wQMgP8a h6k7UcADnKkIfJH7vtTJ2H1s60mN9+VP/7bSvJgDMVuG9KXW6CAjHbRMdew1zgZsw1IW I095yDSLKRZB9wG2JkPu/s2EmEKa+Y9/J4fpEE7hDyINDxqpynMws4XGUKnq0gcqyfS+ J57g== X-Gm-Message-State: AOJu0YxXEuNrHZpkp1XfgANcvRSANI+O69oZXMS63Z6OHxgQoQjQDKvn oHQUXyRJODH8SwclFK16xOfT7iZQf163uMWCAnY3qX9jI8XlKU48xgoGP9wSB1a2N7uFuKDB8jA T X-Google-Smtp-Source: AGHT+IHkeSWpfUfHEQzbJxOSLFRb0RaDK8Ze7IAXIecpHBCiqDK/SyBikWOHZ+FXpQPxFzJTMgel2g== X-Received: by 2002:a17:902:e750:b0:1e0:cdc7:4ff3 with SMTP id p16-20020a170902e75000b001e0cdc74ff3mr3435484plf.30.1711635114322; Thu, 28 Mar 2024 07:11:54 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:b18e:f80b:dc91:dea1:d972? ([2804:1b3:a7c3:b18e:f80b:dc91:dea1:d972]) by smtp.gmail.com with ESMTPSA id t18-20020a170902d21200b001e0d093d962sm1602289ply.248.2024.03.28.07.11.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Mar 2024 07:11:53 -0700 (PDT) Message-ID: Date: Thu, 28 Mar 2024 11:11:50 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 03/10] i386: Use generic fmod To: "H.J. Lu" Cc: libc-alpha@sourceware.org, Joseph Myers , Florian Weimer References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> <20240327194024.1409677-4-adhemerval.zanella@linaro.org> <1936623e-b6c1-40ef-b7c8-249eef54d071@linaro.org> Content-Language: en-US From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+e=80x24.org@sourceware.org On 27/03/24 18:38, H.J. Lu wrote: > On Wed, Mar 27, 2024 at 1:37 PM Adhemerval Zanella Netto > wrote: >> >> >> >> On 27/03/24 16:55, H.J. Lu wrote: >>> On Wed, Mar 27, 2024 at 12:40 PM Adhemerval Zanella >>> wrote: >>>> >>>> The benchtest results shows a slight improvement (Ryzen 5900, gcc >>>> 13.2.1): >>>> >>>> * sysdeps/i386/fpu/e_fmod.S: >>>> "fmod": { >>>> "subnormals": { >>>> "duration": 3.68855e+09, >>>> "iterations": 2.12608e+08, >>>> "max": 62.012, >>>> "min": 16.798, >>>> "mean": 17.349 >>>> }, >>>> "normal": { >>>> "duration": 3.88459e+09, >>>> "iterations": 7.168e+06, >>>> "max": 2879.12, >>>> "min": 16.909, >>>> "mean": 541.934 >>>> }, >>>> "close-exponents": { >>>> "duration": 3.692e+09, >>>> "iterations": 1.96608e+08, >>>> "max": 66.452, >>>> "min": 16.835, >>>> "mean": 18.7785 >>>> } >>>> } >>>> >>>> * generic >>>> "fmod": { >>>> "subnormals": { >>>> "duration": 3.68645e+09, >>>> "iterations": 2.2848e+08, >>>> "max": 66.896, >>>> "min": 15.91, >>>> "mean": 16.1347 >>>> }, >>>> "normal": { >>>> "duration": 4.1455e+09, >>>> "iterations": 8.192e+06, >>>> "max": 3376.18, >>>> "min": 15.873, >>>> "mean": 506.043 >>>> }, >>>> "close-exponents": { >>>> "duration": 3.70197e+09, >>>> "iterations": 2.08896e+08, >>>> "max": 69.597, >>>> "min": 15.947, >>>> "mean": 17.7216 >>>> } >>>> } >>>> --- >>>> sysdeps/i386/fpu/Versions | 4 ++++ >>>> sysdeps/i386/fpu/e_fmod.S | 18 ------------------ >>>> sysdeps/i386/fpu/e_fmod.c | 2 ++ >>>> sysdeps/i386/fpu/math_err.c | 1 - >>>> sysdeps/i386/fpu/w_fmod_compat.c | 15 --------------- >>>> sysdeps/ieee754/dbl-64/e_fmod.c | 5 ++++- >>>> sysdeps/mach/hurd/i386/libm.abilist | 1 + >>>> sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + >>>> 8 files changed, 12 insertions(+), 35 deletions(-) >>>> delete mode 100644 sysdeps/i386/fpu/e_fmod.S >>>> create mode 100644 sysdeps/i386/fpu/e_fmod.c >>>> delete mode 100644 sysdeps/i386/fpu/math_err.c >>>> delete mode 100644 sysdeps/i386/fpu/w_fmod_compat.c >>>> >>>> diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions >>>> index a2eec371f1..d37bc1eae6 100644 >>>> --- a/sysdeps/i386/fpu/Versions >>>> +++ b/sysdeps/i386/fpu/Versions >>>> @@ -3,4 +3,8 @@ libm { >>>> # functions used in inline functions or macros >>>> __expl; __expm1l; >>>> } >>>> + GLIBC_2.40 { >>>> + # No SVID compatible error handling. >>>> + fmod; >>>> + } >>> >>> This changes the ABI. I assume that it fixes a real bug. Is there a bug >>> report open for this? >>> >> >> The new version is the way to provide the system without the SVID compat >> support, which we for all ABIs but i386 on 2.38. For instance: >> >> find . -iname libm.abilist | xargs grep -w fmod >> ./sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist:GLIBC_2.0 fmod F >> ./sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist:GLIBC_2.38 fmod F >> [...] >> >> For i386 specifically, the old SVID symbol will be kept as fmod@GLIBC_2.0. >> > > Does it fix a run-time test which fails without the fix? > Not really, but it is one less assembly implementation in favor a generic one (which also shows a slight improvement on recent chips) and it sync i386 with generic code (so less possible issues, such as the static lib in this patchset).