From patchwork Thu Mar 14 18:18:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1912203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=b6s9RYN8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TwbH84lC8z1yWn for ; Fri, 15 Mar 2024 05:18:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A1B63857023 for ; Thu, 14 Mar 2024 18:18:42 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id A6CE23857B86 for ; Thu, 14 Mar 2024 18:18:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6CE23857B86 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 A6CE23857B86 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440301; cv=none; b=ZMFb7rNBcab9L/0OvJb2ePh728EPZE0qy1ReYdaRCwMS9blM3SvcZBJYn0qFMAi4qmiQgf9P3lYlDOS7tN51UYwlEyQyZsZXethc+7/Rm7DuQYTTv+XBjLmj9ukN570NsheEcOq4bJiBw4tgs4+3a4VtKvJ0f5pAG2BRNP3NP/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440301; c=relaxed/simple; bh=yjTFTZMuZxj3SiTRuQueHHSf/vqvhLqP8zg1hgGW630=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=NaQwWDjUqYwSiTH5bVkHLEprMk7se9Vv6mYBwV6kXUyRSHIJniOD1+2FxkOlkNiRoBEMB1MPs9pF07Py7icp55MwxgwiuciJ6ux1kOJisPMixOB0YhcXnX/xhQaaydI2MeHDWpoXRFmIwhkywdoYQnXg12KzYh4XI3bBpPfJq9U= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6e6b22af648so1918256b3a.0 for ; Thu, 14 Mar 2024 11:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710440298; x=1711045098; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qr0FUTalTmEs9BCFyj87fnvKEg+EW9zfqE3b6sO5rSE=; b=b6s9RYN8/XnUywz58v3FoDCG4rqUpb9h69xhWMiuUuGlP/rFNkiNhoWSp8QCJ5aVSu zRSeEQRmL5J/7xhBPrO9luAsWj2v/XqD/Vizh969N73oMgZVPWmczY6fzl2gieR9xCRC suwe04kwIzus7kc+bZqVkat1VSry9sagd0XPuFiEoFzcAY5CCbyTE0NNglOAlQp6ocQY zdBD4lBp0z2q/AytrI/d9d2kdII9l7qrFCjYNlNZVjkAcOE9QKEyaLAIoKnwrTElbHSr /0lbT1AR8cmYPukFXQ8CZfgN8OsXPwIvusQyq/fOA1cDw6E9H5jvtRK+MZ05qaxaFRiv lwAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710440298; x=1711045098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qr0FUTalTmEs9BCFyj87fnvKEg+EW9zfqE3b6sO5rSE=; b=rYctuneoxlgjFFThY8oAauHk2Qpq+/VGXbxm80+0rBR/U0txLBlyYp+sXjK3e7JaOL TFY0eW2DAHSpBvu5mNQy+U5FpEhnFRTX5NnbGEbGCwbdo75ClRRM81Dg0pFJpU+u2zta wwWZtvwiUgZAMVdLOtbE8WsGKOvjVKB1ud7yEglJ789/U8s+9ANp+vXvYYBa/ftczjx8 OpUpFmfzIqCD40C+wAKruFDIz1Rb013UhkVe6R/xYo1MIijS7PAIKYROAdSzvnuOb9iP rAXUNWfwUsU/k15Pf02VlubLUGt8uGTdFruLfKwNFERvFRdOj/Zh0u+g87l+AJpEefn4 IiYg== X-Gm-Message-State: AOJu0Yya2G76dpRyGruA/ZE3PAvjScy+1wE//UJ/B26ogfAu3P8tJtFV UcEHqlMYjr140T86Lg9/4rpefCLLj0/XZO4AUmq3r2EgbZobMZ6kupKP9ZxYMlDCgxi2dwLejqy q X-Google-Smtp-Source: AGHT+IHUeU4Sc5gWyzjbKHy9UAG6wsEnfKBgbnpB3wDjPxlmkiByCb9tGPwtQrVK0FBCYxuLA/hGGw== X-Received: by 2002:a05:6a21:99a2:b0:1a1:5a12:9119 with SMTP id ve34-20020a056a2199a200b001a15a129119mr9005699pzb.3.1710440298213; Thu, 14 Mar 2024 11:18:18 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:8dfd:b85a:7d6:59ce:add5]) by smtp.gmail.com with ESMTPSA id n188-20020a6327c5000000b005dc491ccdcesm1013469pgn.14.2024.03.14.11.18.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:17 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 2/3] i386: Use generic fmod Date: Thu, 14 Mar 2024 15:18:09 -0300 Message-Id: <20240314181810.1330836-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314181810.1330836-1-adhemerval.zanella@linaro.org> References: <20240314181810.1330836-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_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.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+incoming=patchwork.ozlabs.org@sourceware.org The benchtest results shows a slight improvement: * 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/e_fmod.S | 18 ------------------ sysdeps/i386/fpu/w_fmod_compat.c | 15 --------------- sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 3 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_fmod.S delete mode 100644 sysdeps/i386/fpu/w_fmod_compat.c diff --git a/sysdeps/i386/fpu/e_fmod.S b/sysdeps/i386/fpu/e_fmod.S deleted file mode 100644 index 86ac1bcfaf..0000000000 --- a/sysdeps/i386/fpu/e_fmod.S +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Public domain. - */ - -#include -#include - -ENTRY(__ieee754_fmod) - fldl 12(%esp) - fldl 4(%esp) -1: fprem - fstsw %ax - sahf - jp 1b - fstp %st(1) - ret -END (__ieee754_fmod) -libm_alias_finite (__ieee754_fmod, __fmod) diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c deleted file mode 100644 index 528bfc2a13..0000000000 --- a/sysdeps/i386/fpu/w_fmod_compat.c +++ /dev/null @@ -1,15 +0,0 @@ -/* i386 provides an optimized __ieee752_fmod. */ -#include -#ifdef SHARED -# undef SHLIB_COMPAT -# define SHLIB_COMPAT(a, b, c) 1 -# undef LIBM_SVID_COMPAT -# define LIBM_SVID_COMPAT 1 -# undef compat_symbol -# define compat_symbol(a, b, c, d) -# include -libm_alias_double (__fmod_compat, fmod) -#else -#include -#include -#endif diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 5d89aaa08e..dccd7ccd79 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1188,3 +1188,4 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.38 fmod F