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,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 7BD271F44D for ; Wed, 27 Mar 2024 21:39:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=BgS7i0k1; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B10AA3858D34 for ; Wed, 27 Mar 2024 21:39:18 +0000 (GMT) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by sourceware.org (Postfix) with ESMTPS id CAB7E3858D20 for ; Wed, 27 Mar 2024 21:38:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAB7E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CAB7E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711575537; cv=none; b=KeTFx/XeRxZtKSnrco3iELEdk8D/Zy5m4ejs8OVGvUBsRn+vlN0kIzssvu/uFb8Dlt/U16NeOltHx+gtngBjqTc0I6iPGsPWjman4sCuTNdjpu0q0S981lNpBNxXJujCI6e7SfxQHr0TWKff/7Ir9QDfE4lMqL2J7BKh4qe9aXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711575537; c=relaxed/simple; bh=Dt3+QfMGq+2PW3USL0CASRIXXMb4mDtMW8YPwoAGPeQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=JuW56mTxA9T+lRLc7aC+L0vBXzxftL/SmSv1v+pNcDAKeM1gG66yA0AmGAqLvgTNo+Q0fsQk2ewb8LEOumCginLW3peuqvRb7vjN9mQtcGSpInn2UiUNqUYij3ntYBTW//gFe9M9BJ/A2LPWPBFHYo07qzetVVLXyp5RFJmtc1g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-60a057b6601so3170317b3.2 for ; Wed, 27 Mar 2024 14:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711575531; x=1712180331; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JGkgTcrq4rvfQyhDdZ06gt+/1TDsoffB/AAhKD/+G2g=; b=BgS7i0k1eogIXmmS7geQZ2T+Td52EbpgJpaS1I1Xi7exruyKMxANnxKJlgFAjDJ1r8 Gvd2AgFFc/iZo5S7F0ZtuMOf4gyX0Ex5ixeC2Bf/o6Khuab140VtS4h5EaYQbFGnOS7s WmPMwdNU05A+Tkkz6B9L2wLL0D27qq/Far5ArttTLWD30u+281JEWwHdukpPElwlQmjm 7g6gVjB3nYaDScl9j451tQdkjrqxjrnSmzYqoLriKANEEyDC+PS7tAEV8jvPblcWRPaC LoY0KbLge/M0aWLTOzzU8v6TdKvs1idLxRNpIL91fUX90/4qQubpJZIEKNqcInlwIoJ7 sXng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711575531; x=1712180331; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JGkgTcrq4rvfQyhDdZ06gt+/1TDsoffB/AAhKD/+G2g=; b=dkHalSG/d7CxviKrIQNMMEikLlUBGrMK5NpLSlZjJQJI4TKMYGjR+00ZYW9KsDccMX 40ZgPumfRYfsLOCM3dkoNoGL3Rkfepy2JPJjqFtR9KPVq8dUH3VgpmmjNzABIjAuZ+FX 9TILoIj4MnMr+NW94UF6MifgS5wgpecCypTRC+YvQFCTSSszUW9y27+TqenCAoE7aO6C tmAbdmVj+NGzh1drvn8u338C+fb5YUVa0uz8f1uy0rSeB8aI15bqw03wOKNieHpHPhBb xIeExPM193wCe4U0vXzO4msTh0y5EZv9+abAIHIFQtXtKp96yDmRLwP8DqGJtImfthuk F6Pg== X-Gm-Message-State: AOJu0Yw2XmQ7iwgL7PWGKgS5icZPF/cELMwYl1ptcK4ytrt92shPhMgH 8Y7/DotVC3sotE/0RGbzsTQJF+ESlhzxN7+tTzLW/uUVlU/2cmUj+4q7qGe7/V+EIkCMUvAWvtv Un6XCmzR4EmwF1h+HypveGTzMJujeZ/TS X-Google-Smtp-Source: AGHT+IElNkvSR+Ebix6aWpPRH2fKcYtN11H4SZZzSTwXjOgOISwU5G+hLVDQRvorP/fplm3DdbKEGAUOW23t3sHh7mk= X-Received: by 2002:a0d:d5c3:0:b0:611:2960:e52a with SMTP id x186-20020a0dd5c3000000b006112960e52amr1026879ywd.17.1711575529663; Wed, 27 Mar 2024 14:38:49 -0700 (PDT) MIME-Version: 1.0 References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> <20240327194024.1409677-4-adhemerval.zanella@linaro.org> <1936623e-b6c1-40ef-b7c8-249eef54d071@linaro.org> In-Reply-To: <1936623e-b6c1-40ef-b7c8-249eef54d071@linaro.org> From: "H.J. Lu" Date: Wed, 27 Mar 2024 14:38:13 -0700 Message-ID: Subject: Re: [PATCH v2 03/10] i386: Use generic fmod To: Adhemerval Zanella Netto Cc: libc-alpha@sourceware.org, Joseph Myers , Florian Weimer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Wed, Mar 27, 2024 at 1:37=E2=80=AFPM Adhemerval Zanella Netto wrote: > > > > On 27/03/24 16:55, H.J. Lu wrote: > > On Wed, Mar 27, 2024 at 12:40=E2=80=AFPM 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? --=20 H.J.