From patchwork Thu Mar 14 18:18:08 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: 780290 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ed0:b0:33e:7753:30bd with SMTP id ea16csp577810wrb; Thu, 14 Mar 2024 11:19:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRvF/yTNcxQGCn4B4Unum/eLM2gOyydWf/nEqqw5vf6PUSa3+l0v4Pjm2F3YNhSelb61mD8gAMa+OrVUbPwDrD X-Google-Smtp-Source: AGHT+IFmxBTGOSftCDvInIoqlfM0yAdvXGH9gjXe55mzVSjLSk6nInkFR5uuqcpkLP2VBvvljUDR X-Received: by 2002:ad4:598f:0:b0:690:eba2:6761 with SMTP id ek15-20020ad4598f000000b00690eba26761mr2606693qvb.20.1710440358492; Thu, 14 Mar 2024 11:19:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710440358; cv=pass; d=google.com; s=arc-20160816; b=JAa2fgRoAVFaEFpo0RbSHd2kp7vFeuZWNqV5N2fb9+eiPAHsPqVyBhuApuuZ0k0MyJ hs+rV1YS/Jmeb8rq92s9OO/hVNj/rlp4Yk3KvIvhK0BjHbz2CqWGRcZt6tlGrpbybIar wXTyYt532SpnhKzLMKdj/V6HcUTbId7KqLX91txunkdPQyXIWuWL4QVFYDGK4q7elO9Y aX0on/F2JthaZ8Nx0gjFAx89zgMZunFxNbBSgikjiqL3P8QOyCljy690LibxZTlCsLEP V9ZBQslJ4Dcc65S+Aww1qgyV9eqI0v4pZqWJQZUKh4n+lcqCaU2qoRjxzLyIZSX4L/BS E9cg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=1c4L82w2R0JEPhgrPrx+f5B66yhxRLl8/heowMTKVhU=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=un4oQ7TbZh3xzAJ0YkoXSHnTINGU0sKzscotfThPRzBJBL7ifZIziPN13fBseI3q2Z eMGJV31lLD/qUjhhW6JRL7PmqQs6YIcVIr1R9o+zNjlq3BJKxN2aCmXgHteg21WifNL2 67iLi1WqeWX2w6m3c3xh2pvD3ZsTV03oTLoUPQKxboE2w7bOP6fQZA2eT5P2XNpmJVqQ +ZXBUdnc5cX1KIGmO5bxnI3NVki/UhnQdtlLdjH2kZpg7QlfPO1Nr6bpGQLve2t1o+Oe NbzxZASs72xT69CE8eCGG5f7WM6RszSC5/o3ZWF4e7FiRF3BsAByv52HRbpImkuEim7m 9tBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vY4Wzdj+; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id iv11-20020ad45ceb000000b0068fb764232bsi1189166qvb.224.2024.03.14.11.19.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vY4Wzdj+; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2445F385771B for ; Thu, 14 Mar 2024 18:19:18 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id 2BB413857C60 for ; Thu, 14 Mar 2024 18:18:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BB413857C60 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 2BB413857C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440300; cv=none; b=X5j/PhcAhJLG1Ug3j95rYUr2Xfnjik4J/vInTDxr0GpH2mnytF4DOx1vxlmf6KblzS5FmFtfcKA/xF+mh1urVyKB7xo3MvNOYq29rNoxsT9aCSfX7C7wH6rGfa+Pd59+SMzxXWNlGv19q4Zvbdzs9OPGHGP9JHlWNqHKKCaH0KU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440300; c=relaxed/simple; bh=F61JMsyt/P5ZMhAmn2xsfWQk137ViN9kNLMmWqGPBT4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ITmVRDgU2jNv4zHJztYuhokE9JWzCKWe46uTlfrJJJgfIO0CUfejNSXKeq+wkhqDvf+0ai+DHxcmtVU2/T3/ttmE4xGQlZXpj4VQ15NhvBF760/HRblpFAa4z8PQgHL67szxTQsI+n3/lGqWjsqhSV6XqajCPdQdbzJbgY/Ntrc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5a46b28a77dso337338eaf.1 for ; Thu, 14 Mar 2024 11:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710440296; x=1711045096; 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=1c4L82w2R0JEPhgrPrx+f5B66yhxRLl8/heowMTKVhU=; b=vY4Wzdj+GxGJEzArYPQ3gP4+Mjrdsm3GUAbCpEy2HIPw/mKTgZ320ljPXQu/U1nqLt aQdOxcL7m9TIL32SkXZLKY9ZQT+EsLpaoSRuV4VYIrIE2qN5/rnzs01P7CjZ3JtTPNSS OrPV2b2zYEi+wMv3OmH4q3YR5mEYnfwXVty/RzrWCOlqw5Aki1dFhh77nIpPlTJPwAdp n45RgLSHcE3Jz+oFNMHaNs2M6NewTzyEjAAcbHkfkpHOfh0wMWnvELxPhJqxH+7BDk9T RmyhNQzc6WrNv/u2dLgupanR3SYBBjIKiRPx97B8hgo0bWUwbHsBHork1z4uGGx/1Tnc nGIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710440296; x=1711045096; 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=1c4L82w2R0JEPhgrPrx+f5B66yhxRLl8/heowMTKVhU=; b=Jvr1+5cfaSeHHhsRSuQ+/VXFSRmodD/MBJD9S4JyhaBqKiViRgbXxWhFMmuQS2p2gd uVwfTuJ/ddj8+PTsEoJaCWe8S5AaABbYvCJSta3co0jptUNxGwYNGHa2z/VasQRRU07Y Nj9AOOTLJFBFb5UuIeqtxGgo0B4tCzLygSPaRuROaIXbpjpTl6+se7mYgh94IMcR9Dyg M1S081y9wS6ihQNzeETYe8KmY46SN9rSsaUSscdZZrLMLRAQ6tIHnMTT+I9M7072Gxh/ SITgWokudYjR8FI7QD3o2y2POZTmO7Mpe7bLpB+DNF9wSUH2LcrSPTdryNb1fEDpvZPV BYuA== X-Gm-Message-State: AOJu0YyoD3PXafZt6rrAYj5fQ6mIG0vAtK2ojsZHs8c4uSgBBESiqNGA UD9lXcZLMslfA4z1hq0L1EcPwvQN59TWTIwFdMb/8Mw/TFD+K/blC5Q/rIu2/WxvVXSSvfvEUV3 w X-Received: by 2002:a05:6358:1282:b0:17b:f6a9:dc18 with SMTP id e2-20020a056358128200b0017bf6a9dc18mr3256766rwi.15.1710440296394; Thu, 14 Mar 2024 11:18:16 -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.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:15 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 1/3] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Thu, 14 Mar 2024 15:18:08 -0300 Message-Id: <20240314181810.1330836-2-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.1 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+patch=linaro.org@sourceware.org The commit 16439f419b removed the static fmod/fmodf on i386 and m68k with and empty w_fmod.c (required for the ABIs that uses the newly implementation). This patch fixes by adding the required symbols on the arch-specific w_fmod{f}_compat.c implementation. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. I also checked that a stack build using fmod/fmodf correctly resolves on both ABIs. --- sysdeps/i386/fpu/w_fmod_compat.c | 7 ++++--- sysdeps/i386/fpu/w_fmodf_compat.c | 7 ++++--- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +++-- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 ++++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c index 5ac9995ffd..528bfc2a13 100644 --- a/sysdeps/i386/fpu/w_fmod_compat.c +++ b/sysdeps/i386/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c index cc417e07d3..5a61693e51 100644 --- a/sysdeps/i386/fpu/w_fmodf_compat.c +++ b/sysdeps/i386/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c index 527d4fbed2..57f38091e6 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif #include -#ifdef SHARED libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c index 5043586b91..88db07f443 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif 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: 780288 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ed0:b0:33e:7753:30bd with SMTP id ea16csp577474wrb; Thu, 14 Mar 2024 11:18:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTB5bxtU62owlfIXk9aQnWSMb0YIhrmn6s5Bxf7E46Ye9u3FvsiQngEi7P5DSpCutsofs34IlN1TPyoxnH7tqG X-Google-Smtp-Source: AGHT+IH1t7K5CFph8WAxILb6hRAgW6E9YW8S1hh4I4A64qyMHZEx3Zlhhxw1TwQVGqbMy2HYbIXw X-Received: by 2002:a05:622a:1a9b:b0:430:a5e2:3bfd with SMTP id s27-20020a05622a1a9b00b00430a5e23bfdmr2409073qtc.24.1710440314614; Thu, 14 Mar 2024 11:18:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710440314; cv=pass; d=google.com; s=arc-20160816; b=scsmfXVJsqtgp6DYVFoUIR6znNTHW+iOfsUxpgMhkk0o+WWrmtJPcpnnMOoGroegnf 86sDWbnHqScOEWcFk73fuUtPfdepCpEZb+XxbFr7wqGVvuWKAVFllRKBOelaUFg/zopB Do6dbsq9WF/N8WKKXxc6lwx2DOtb9IqPPuHcYPKfa3/Zox7SXta0lVjq6aEYRZRp9Be0 BLPjm2i9bqADOrRYdUWsJehzLKx0sl/76I4BFUY+YAmedkYMgzE6fMNQWo77I9tNUQaZ cIlDZ2+V7St+ttD45VEyEXvx9XzDhkIXXnIl+sVJcxvfn9q1j7XuBb75NlFmNNKw1ohA ramg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=qr0FUTalTmEs9BCFyj87fnvKEg+EW9zfqE3b6sO5rSE=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=M7gBAfZu1I+HQi799ABwmieQUmrsO4BwXiRZES/fmWqpgI5rmgvT8bTY9QFHBoseqI Xd5deqiomAAjc+JtiK1Hog232+nvXz7NlPB0HO/ekBH+B2pLyByAsADAqjQoFcrk8A5n RJm5W9B+F4Rl6rfY00PhZHUuZaR6Yk88XJadYjHu/jAXpC+hToQDnIpIpnXVRz0f3fmZ 6xmH8DWlFFe/jv+bH671Bc96hUT7EIVtuT0opF0MAoojy14XkBb/Ty1qzxeABF86NzaN VXjo5Trpl6HLXzXRabIdhpNTCvE1rQbsEEjt6t6Z7uLvkx/nSZvNe09sjyA24lbj4M/Q 9/zQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b6s9RYN8; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c19-20020ac87dd3000000b0042e6a06d159si1973891qte.715.2024.03.14.11.18.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:34 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b6s9RYN8; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38F58385770F for ; Thu, 14 Mar 2024 18:18:34 +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-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+patch=linaro.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 From patchwork Thu Mar 14 18:18:10 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: 780289 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ed0:b0:33e:7753:30bd with SMTP id ea16csp577526wrb; Thu, 14 Mar 2024 11:18:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUnWSOveX/z+SYLRhSHLhT5Zbj+e5PZfgL4niyghQR1f60EkCr9LMclOOcsDStaYiSuIoyecPEacC+kxnlU476l X-Google-Smtp-Source: AGHT+IGI8sYWGdiRRQzL92UjCo8FsU1xWcPhdLIenCUJMUq+HfAPwyMDOkAF/Zze1/322hB6qdGd X-Received: by 2002:a05:620a:2106:b0:789:dd47:2ea2 with SMTP id l6-20020a05620a210600b00789dd472ea2mr1853040qkl.66.1710440321769; Thu, 14 Mar 2024 11:18:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710440321; cv=pass; d=google.com; s=arc-20160816; b=sLfPpshWcrv/vvH+qK+HD3RWSvMCoqEPNtjfWIjCk6tXDD54C3iY8s3Jbm+oqj+rku n5wGMEnih1ARYcNDv/TZACFLnuRJ9Z33YiwecneojPSHlS9R25+CN9NSzblluHMsBsV2 GW3t+0RonPVuKdT4ps22n9SqcunYTpxbZtB0dCotZXA+KpRqzrqjdsCz3M3z/Jm3R498 W35bP3sp7ey6Y3ldQp8r0suZXrcHzN5SxXbQW9Y6gX0U4N/tcrWLxV2AnQmFE18h5mA3 330r0P3t7YLxu7UWGn+DKZmoVY0Inh3BNdlnTNDo1c2/q/0LbXIAzvV+kG3I8xTAQebM 1tcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=O+69J1nBrkmIqPnAVQISOg5Bruj1PyCsHc7Ssoxhn6Y=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=BhdEoXG4gSdBbWFwnXK7fet2m0VXZBatpbd0MCl530E+MzVJWp/kamIlpsFE8+5Du8 rX7/1jz9xVNbImEo6Iwg6xpuFXFpZju3h/YuBY6/KNolEXxc28c91shwPWom+KPyjzK1 vRi9PEuOzD1Yo2VIvfl8zxzOS0SukZy24NGQvQDR/J3KorwOE3umGcpYRcX68Dh317qZ cSvQRqRcaRjLfUMmuiXctK60WJWjQEMWGfIJcQGoZTLRxYNXM63q89pSswfz3WKbUiRQ ZrKuEaLgMRoVQ1fRRGXffYEROE31S366hXrMDCUwWCB3h0QmYLG73CAu+AZBTy6Y0nV1 00+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eYVc3A8c; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id f22-20020a05620a15b600b007883904daeesi2052928qkk.131.2024.03.14.11.18.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eYVc3A8c; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E0CE3857023 for ; Thu, 14 Mar 2024 18:18:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 247B23857BAF for ; Thu, 14 Mar 2024 18:18:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 247B23857BAF 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 247B23857BAF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::335 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440303; cv=none; b=dlxlMf2Se4lPaSNSgvJhGJUo4UrHM663HDRqR/ZtaVE93WzOVznzhuQJYrVQiCYqbrYT3EsbRyld28vDqBDkTXZbj+M6jpvL895fU6ZpOJLbpcpWo4kZ4dT5xXyQUoE5+rL45SEP7mf00GWZrzaGC1+/qkvwlDzM/h1SRxPYq8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440303; c=relaxed/simple; bh=nJzWTB8epvhuZbidDHEBfu96p85fifF7yXYsdbyVL+4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=RKfWBF6lhB9xFn5h6yfeLw+aLNSaT2QVoRI7f6aMPBX13F+uCapdsH10fVPXFbSJOPdX3C6F0YtGx9qr61oz3UOEP0bdy/x1CWcTSugGFHZrggb63L24266cR4SIuZBQ5N0CVAwzetlgbqslm+BD8I+Rv5TyI7wixbIBsmeG+Bg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6e677008501so150895a34.1 for ; Thu, 14 Mar 2024 11:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710440300; x=1711045100; 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=O+69J1nBrkmIqPnAVQISOg5Bruj1PyCsHc7Ssoxhn6Y=; b=eYVc3A8cY3y1LaOjf5UQ5CjlSLt32y95TyAve96ciHw9k5hz3Xn5arubk5xAtaVW+V DnhiRikh9BbK4A9mwJoHdBnqglb9L8NMAQHDQtUAV1lVubpEXRnBFi6qP7EYWbKaFRlP ekBW7z1mPDeNl8CtfKkKVCxj05GKe8J4LGUj027zRRHeKebxrAcmNSmwC6Uc0r6Wiiim X+uYMRetrTF3bJY0zh7QU3TAzUut8SFZdSpk90YcmmlG8YE7/hKHiRvMJrIFloSXZL5k 3ajb7yoyic3awoNO/OpmfrcgdL1hlnBbxoMi2cDlcZjuEd+kJRnPK8hYWxN6UvCnKSrl x4lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710440300; x=1711045100; 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=O+69J1nBrkmIqPnAVQISOg5Bruj1PyCsHc7Ssoxhn6Y=; b=K1YNbPFcBGz8mujjBEJL5guta5RE9kFb06v0fQ33Fnhu87rHGZVx2ty6VBWP2wx8go l0FPPA47X1f+4L919DxzkgLYoVA+cE8HLrkjLyBqbIRsDSrUo9rdmzCZh8yqviz9egMU JGpU+TyfiLkSZBS4of4qkz4hfrCXZq1gpIhsF+m2Np4dWjDokSqUMhj7GfH0MOeVKbb1 g55P/gCaBSKgVmCvqNqT5fibiiUt2XjqAvQtbgZcPPEwXnnLuOdIiE1nGHd9LJl3YWru poZeyfLpvKyWWVnzs/0Q9bKxI9Geru2XEnaWo51ouIcCUeKy5SrVbp1if6JzwvPY2bTT cDyQ== X-Gm-Message-State: AOJu0YxH419bfyLdghSw4jpcgsMoGcPqH+iHDqz5RRCsV9A3V2LgIX9+ qrDxvlp7hAER+CDgCkH1SXydgj+P+LH47waAw5NlMcAafeYmTNEIjlAEUPD/imoa46DKsUB1L1V y X-Received: by 2002:a05:6358:59a2:b0:17e:b568:2af5 with SMTP id c34-20020a05635859a200b0017eb5682af5mr1609607rwf.7.1710440299691; Thu, 14 Mar 2024 11:18:19 -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.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:19 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 3/3] i386: Use generic fmodf Date: Thu, 14 Mar 2024 15:18:10 -0300 Message-Id: <20240314181810.1330836-4-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.5 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+patch=linaro.org@sourceware.org The resulting performance is similiar: * sysdeps/i386/fpu/e_fmodf.S "fmodf": { "subnormals": { "duration": 3.68732e+09, "iterations": 2.2912e+08, "max": 71.447, "min": 15.836, "mean": 16.0934 }, "normal": { "duration": 3.75848e+09, "iterations": 5.5296e+07, "max": 273.208, "min": 15.725, "mean": 67.9702 }, "close-exponents": { "duration": 3.69035e+09, "iterations": 2.07872e+08, "max": 64.454, "min": 15.762, "mean": 17.753 } } * master "fmodf": { "subnormals": { "duration": 3.6863e+09, "iterations": 2.23616e+08, "max": 65.453, "min": 16.243, "mean": 16.485 }, "normal": { "duration": 3.71129e+09, "iterations": 5.3248e+07, "max": 281.57, "min": 16.169, "mean": 69.6983 }, "close-exponents": { "duration": 3.70274e+09, "iterations": 2.03776e+08, "max": 81.474, "min": 16.206, "mean": 18.1706 } } --- sysdeps/i386/fpu/e_fmodf.S | 18 ------------------ sysdeps/i386/fpu/math_err.c | 1 - sysdeps/i386/fpu/w_fmodf_compat.c | 15 --------------- sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 4 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_fmodf.S delete mode 100644 sysdeps/i386/fpu/math_err.c delete mode 100644 sysdeps/i386/fpu/w_fmodf_compat.c diff --git a/sysdeps/i386/fpu/e_fmodf.S b/sysdeps/i386/fpu/e_fmodf.S deleted file mode 100644 index f73ce9da1e..0000000000 --- a/sysdeps/i386/fpu/e_fmodf.S +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Public domain. - */ - -#include -#include - -ENTRY(__ieee754_fmodf) - flds 8(%esp) - flds 4(%esp) -1: fprem - fstsw %ax - sahf - jp 1b - fstp %st(1) - ret -END(__ieee754_fmodf) -libm_alias_finite (__ieee754_fmodf, __fmodf) diff --git a/sysdeps/i386/fpu/math_err.c b/sysdeps/i386/fpu/math_err.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/i386/fpu/math_err.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c deleted file mode 100644 index 5a61693e51..0000000000 --- a/sysdeps/i386/fpu/w_fmodf_compat.c +++ /dev/null @@ -1,15 +0,0 @@ -/* i386 provides an optimized __ieee752_fmodf. */ -#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_float (__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 dccd7ccd79..73c14a914e 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1189,3 +1189,4 @@ GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F GLIBC_2.38 fmod F +GLIBC_2.38 fmodf F