From patchwork Wed Mar 27 19:40:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783153 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2374986wrt; Wed, 27 Mar 2024 12:41:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWl+uL2v0S1LLvM5Oct90IJ/Z9y186JPtx2XZfD4RSDwlh5kqj+gJ5T6q7KVOa/79lUlXP/yALD6U1zp0U+auk X-Google-Smtp-Source: AGHT+IHuZgh/+xrz9A9XOpjhr4EOpyExAGQA3LqC5CbZdXb4yoFWapDTdEL5k8HtJF68BRvba4nM X-Received: by 2002:ad4:50d0:0:b0:690:bae1:dd2 with SMTP id e16-20020ad450d0000000b00690bae10dd2mr544463qvq.12.1711568511040; Wed, 27 Mar 2024 12:41:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568511; cv=pass; d=google.com; s=arc-20160816; b=SeQiiTakQ63fDaq7kP4gy5i3wJSg+uzJHBGMOi5ZCNwzzk3mYBfNWnD2oOp1XcT8yW WTq360azEIMnDrvl9lWvyv9CGMb1032aifZHLGTqVBElvD77ioQPWZ6TF/SCRNbS6Giv ldVhPMJbOrP0aiXCOALwnOQyQR4FnS9MZ4DHQ+qoTTeOdlji30G4rXYLBHuKULVFUfsJ EKef6torKnCl/J5hBd6NUmLTE7G9amEM5lsaML730KPfndsFW/4v5AHNFmHsCQWv8Hkn TFI0fVWeaYhqSzWUnvhUWW7kD36SUnpYNb+NTXzlHeb7l79TElkiUzaZR+hF7SHWG0w3 qREQ== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=xM0bEaL2ABl3Ls/8bCAVCkPzu+hbOKNXOxMT6+5zfns=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=pR9bQaHgEQwGarV7ke31hFeZF4ZDxCYvSvVbn8Uhosm3x21klAO3dgF10URilsIBBW GBTZVtCs3bZckH4Br09ZebjA1RwJ+ofz9mpjNQrpBQMRqMGJIETYi25ICzh1nvursgFs oBijzw+NOA0NRFZz9W5gYWf1F5a2qAyINmVRRrmRjF5tIjodVLyBkQ78OlPqA9LGdViB JRsw76ix5cet14lDT2zc+sD0BMQxmUPoRSaAcpLEayv4C7fBX5c7YpA6EbYRPLRkECUj 0uxAabh6kyhfdBWBZeuYemDQW8xa156VHHaq/W8h6eAcY53A5s+DQXf6xS3gZo9CMuQZ IXmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Eep8Z3bi; 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 jx11-20020a0562142b0b00b0069673ce3360si11108018qvb.486.2024.03.27.12.41.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:41:51 -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=Eep8Z3bi; 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 9962F385F025 for ; Wed, 27 Mar 2024 19:41:50 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id E7A613858D20 for ; Wed, 27 Mar 2024 19:40:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7A613858D20 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 E7A613858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568435; cv=none; b=H4jYGT4ExjmUTQ96RUO9lYZU37niedK53d1/EyITMhioR/uaUxrK8KdvCmtI0lakw07zOe9twJQJ54iltQWip0QPdq0L3i2WC0CJym4T1fkA+BT9qcIAXHx4yMN7Hy7ovguVPAOPaRYfGiZB7f7i08P7+Nz2jPX8oNILOpmAVd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568435; c=relaxed/simple; bh=TmwJdU86itK5iLqvFT7K3Lwmv+jwRtk0S1NFuax1vdY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ZCFf6OCPXzv07AB8f28VUv52anG8tkahfAHiLKoykuMjyt+GTpmSOh+jDiUHB4K9HPSrkMgR/JsHvc6SatD+NU70RXT8qq8j2Z82JCs0Rz8cU77tgiIpvjXwG+BbErEV4ZJsh4gZKMnRLmgNHc2Cm8ZCKOPgA7j/lw7i/8d9fSc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5dbd519bde6so94539a12.1 for ; Wed, 27 Mar 2024 12:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568431; x=1712173231; 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=xM0bEaL2ABl3Ls/8bCAVCkPzu+hbOKNXOxMT6+5zfns=; b=Eep8Z3biQiG0YrggbPX66XFsi0rL1/pD0HAYR+vWRs0qnx0fO7yGMi6cZcag4tv/An lj5Z95CbcTx6TE7xBLj14s723Xa7znFIjtvyXPNmh9HWZektgD7lK79GBPQGelJmS5LT lhp5rxqTv75VpPjOiy3+yCSTC+6hNCqxZga/DBnPHY924lxjY/ispk6agpyWxkKmyWIi L5xfnVD6sqU1KZwsCHz0qmS05E58fQ81y0jMp6xtDoEM0+Tu0GtL81XRLsHtEsIKZxCm 0CiJ6yO1S/QDWtBBadlybjT2iYmXbW/w3w5g4kR6j30lvUueQzrA6vkaiUDybShpnTjN NQgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568431; x=1712173231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xM0bEaL2ABl3Ls/8bCAVCkPzu+hbOKNXOxMT6+5zfns=; b=oAV+fZBtqngcKAUcodsr4csYNmZYcjqP7Vn07O8aqwodzM0KwvTdgfa2GJmLfLnGNU C08ZbV43cHoAZdueeapwligH76lPF8NAxpZ57Syt6QnF8BMEQ6XzKi3q76BlprzUroJN 3wQ/pgrjIXoAvCkzPf68zUvCwqrxSn5qw6qKyKJpROYAmbkT0aeyQqobfMVUMBUxmVS5 DQ0/G97Nt23pA/UJGou9ifGbPmLoAcjFtW4pQECOhDRG2LTGdJ3apr/W1Jl1l7+Nk/gb MvD65O4xoPtkAkyAp4h/H/jCGKDtOnwWMZMhI9SHZNx/11clLnNtIMTvm5s7ibIPsxtf GNeA== X-Gm-Message-State: AOJu0YyVJ9TXk+l4ZtYrClKbZJsPlfDCT1bKfj3wgGBaCY+chahCaquo VU5xLXoaz25GlAuPmgMMNkf8F8eQslYcfWcmn60KLtVyI5/qdeqLsi03XRLwDzs/YBsal5GHM40 b X-Received: by 2002:a17:90a:9384:b0:29f:e0ef:4d8c with SMTP id q4-20020a17090a938400b0029fe0ef4d8cmr598774pjo.44.1711568431177; Wed, 27 Mar 2024 12:40:31 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:30 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 01/10] math: Add support for auto static math tests Date: Wed, 27 Mar 2024 16:40:15 -0300 Message-Id: <20240327194024.1409677-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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 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 It basically copy the already in place rules for dynamic tests for auto-generated math functions for all support types. To avoid the need to duplicate .inc files, a .SECONDEXPANSION rules is adeed for the gen-libm-test.py generation. New tests should be added on the new rules 'libm-test-funcs-auto-static', 'libm-test-funcs-noauto-static', and 'libm-test-funcs-narrow-static'; similar to the non-static counterparts. --- math/Makefile | 103 +++++++++++++++++++++++++++++++++++- math/test-double-static.h | 1 + math/test-float-static.h | 1 + math/test-float128-static.h | 1 + math/test-float32-static.h | 1 + math/test-float32x-static.h | 1 + math/test-float64-static.h | 1 + math/test-float64x-static.h | 1 + math/test-ibm128-static.h | 1 + math/test-ldouble-static.h | 1 + 10 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 math/test-double-static.h create mode 100644 math/test-float-static.h create mode 100644 math/test-float128-static.h create mode 100644 math/test-float32-static.h create mode 100644 math/test-float32x-static.h create mode 100644 math/test-float64-static.h create mode 100644 math/test-float64x-static.h create mode 100644 math/test-ibm128-static.h create mode 100644 math/test-ldouble-static.h diff --git a/math/Makefile b/math/Makefile index 79ef4ebb65..fb537955fb 100644 --- a/math/Makefile +++ b/math/Makefile @@ -274,8 +274,10 @@ endif libm-vec-tests = $(addprefix test-,$(libmvec-tests)) libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t)) -test-extras += $(libm-test-support) -extra-test-objs += $(addsuffix .o, $(libm-test-support)) +libm-test-support-static = $(foreach t,$(test-types),libm-test-support-$(t)-static) +test-extras += $(libm-test-support) $(libm-test-support-static) +extra-test-objs += $(addsuffix .o, $(libm-test-support)) \ + $(addsuffix .o, $(libm-test-support-static)) libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests)) test-extras += $(libm-vec-test-wrappers) extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers)) @@ -364,6 +366,63 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ $(make-target-directory) $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ + +libm-test-funcs-auto-static = +libm-test-funcs-noauto-static = +libm-test-funcs-narrow-static = +libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) + +libm-test-c-auto-static = $(foreach f,$(libm-test-funcs-auto-static),libm-test-$(f)-static.c) +libm-test-c-noauto-static = $(foreach f,$(libm-test-funcs-noauto-static),libm-test-$(f)-static.c) +libm-test-c-narrow-static = $(foreach f,$(libm-test-funcs-narrow-static),\ + libm-test-narrow-$(f)-static.c) +generated += $(libm-test-c-auto-static) $(libm-test-c-noauto-static) $(libm-test-c-narrow-static) + +libm-tests-normal-static = $(foreach t,$(libm-tests-base-normal),\ + $(foreach f,$(libm-test-funcs-all-static),\ + $(t)-$(f)-static)) +libm-tests-narrow-static = $(foreach t,$(libm-tests-base-narrow-static),\ + $(foreach f,$(libm-test-funcs-narrow-static),\ + $(t)-$(f)-static)) +libm-tests-vector-static = $(foreach t,$(libmvec-tests-static),\ + $(foreach f,$($(t)-funcs),test-$(t)-$(f)-static)) +libm-tests-static = $(libm-tests-normal-static) $(libm-tests-narrow-static) $(libm-tests-vector-static) +libm-tests-for-type-static = $(foreach f,$(libm-test-funcs-all-static),\ + test-$(1)-$(f)-static test-i$(1)-$(f)-static) \ + $(filter test-$(1)-%,$(libm-tests-vector-static) \ + $(libm-tests-narrow-static)) + +libm-tests.o += $(addsuffix .o,$(libm-tests-static)) + +tests-static += $(libm-tests-static) +generated += $(addsuffix .c,$(libm-tests)) \ + $(foreach t,$(test-types),libm-test-support-$(t)-static.c) + +libm-test-c-auto-obj-static = $(addprefix $(objpfx),$(libm-test-c-auto-static)) +libm-test-c-noauto-obj-static = $(addprefix $(objpfx),$(libm-test-c-noauto-static)) +libm-test-c-narrow-obj-static = $(addprefix $(objpfx),$(libm-test-c-narrow-static)) + +# Use the same input test definitions for both dynamic and static tests. +.SECONDEXPANSION: +$(libm-test-c-noauto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a /dev/null -C $@ + +.SECONDEXPANSION: +$(libm-test-c-auto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + +.SECONDEXPANSION: +$(libm-test-c-narrow-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + # Tests for totalorder compat symbols reuse the table of tests as # processed by gen-libm-test.py, so add dependencies on the generated # .c files. @@ -505,6 +564,18 @@ $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c: echo "#include "; \ ) > $@ +$(foreach t,$(libm-tests-normal-static),$(objpfx)$(t).c): $(objpfx)test-%.c: + type_func=$*; \ + type=$${type_func%%-*}; \ + func=$${type_func#*-}; \ + ( \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + ) > $@ + $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c: type_pair_func=$*; \ type_pair=$${type_pair_func%-*}; \ @@ -539,6 +610,13 @@ $(foreach t,$(test-types),\ echo "#include "; \ ) > $@ +$(foreach t,$(test-types),\ + $(objpfx)libm-test-support-$(t)-static.c): $(objpfx)libm-test-support-%.c: + ( \ + echo "#include "; \ + echo "#include "; \ + ) > $@ + $(addprefix $(objpfx), $(libm-tests.o)): $(objpfx)libm-test-ulps.h define o-iterator-doit @@ -548,6 +626,13 @@ endef object-suffixes-left := $(libm-tests-base) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): $(objpfx)$(o)%.o: $(objpfx)libm-test%.c +endef +object-suffixes-left := $(libm-tests-base) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: \ @@ -563,6 +648,13 @@ endef object-suffixes-left := $(libm-tests-base-normal) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): CFLAGS += $(libm-test-no-inline-cflags) +endef +object-suffixes-left := $(libm-tests-base-normal) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) @@ -584,6 +676,13 @@ endef object-suffixes-left := $(test-types) include $(o-iterator) +define o-iterator-doit +$(addprefix $(objpfx),\ + $(call libm-tests-for-type-static,$(o))): $(objpfx)libm-test-support-$(o)-static.o +endef +object-suffixes-left := $(test-types) +include $(o-iterator) + define o-iterator-doit $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags) endef diff --git a/math/test-double-static.h b/math/test-double-static.h new file mode 100644 index 0000000000..d53f46819f --- /dev/null +++ b/math/test-double-static.h @@ -0,0 +1 @@ +#include "test-double.h" diff --git a/math/test-float-static.h b/math/test-float-static.h new file mode 100644 index 0000000000..7834c9e1f1 --- /dev/null +++ b/math/test-float-static.h @@ -0,0 +1 @@ +#include "test-float.h" diff --git a/math/test-float128-static.h b/math/test-float128-static.h new file mode 100644 index 0000000000..5f8206456a --- /dev/null +++ b/math/test-float128-static.h @@ -0,0 +1 @@ +#include "test-float128.h" diff --git a/math/test-float32-static.h b/math/test-float32-static.h new file mode 100644 index 0000000000..2df27d1ca0 --- /dev/null +++ b/math/test-float32-static.h @@ -0,0 +1 @@ +#include "test-float32.h" diff --git a/math/test-float32x-static.h b/math/test-float32x-static.h new file mode 100644 index 0000000000..62f78b49d8 --- /dev/null +++ b/math/test-float32x-static.h @@ -0,0 +1 @@ +#include "test-float32x.h" diff --git a/math/test-float64-static.h b/math/test-float64-static.h new file mode 100644 index 0000000000..807c174df1 --- /dev/null +++ b/math/test-float64-static.h @@ -0,0 +1 @@ +#include "test-float64.h" diff --git a/math/test-float64x-static.h b/math/test-float64x-static.h new file mode 100644 index 0000000000..a7801dbc10 --- /dev/null +++ b/math/test-float64x-static.h @@ -0,0 +1 @@ +#include "test-float64x.h" diff --git a/math/test-ibm128-static.h b/math/test-ibm128-static.h new file mode 100644 index 0000000000..b66a57050b --- /dev/null +++ b/math/test-ibm128-static.h @@ -0,0 +1 @@ +#include "test-ibm128.h" diff --git a/math/test-ldouble-static.h b/math/test-ldouble-static.h new file mode 100644 index 0000000000..beabedb817 --- /dev/null +++ b/math/test-ldouble-static.h @@ -0,0 +1 @@ +#include "test-ldouble.h" From patchwork Wed Mar 27 19:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783150 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2374616wrt; Wed, 27 Mar 2024 12:40:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWB0Lp7GMJWq/ocNIMf/lWtDtvAqkKraJUs9lU3UK0TITBVFWHUk1jN/oZaJ1jCaUHbqs/w4waEiS6ThBwe3ryR X-Google-Smtp-Source: AGHT+IHK/Ckv+j3LepSAT0t4heKyQAubnM/KBoiJTcr1plxhtIINCWr7WvQJGJGEAdrJKYe5pawU X-Received: by 2002:a9d:4f06:0:b0:6e6:ebef:555d with SMTP id d6-20020a9d4f06000000b006e6ebef555dmr906617otl.11.1711568458101; Wed, 27 Mar 2024 12:40:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568458; cv=pass; d=google.com; s=arc-20160816; b=LTUnUt/oqo+1iwOCzx0hYPEaG6uEhtAK0XlMGML0szGCFMCb7ZEMatWXyb4OEYrBw+ ROgnCFiahZjOgsi2ipJ9v/AFViYosZKs+ySB3n1Jt1oBV0r6RqexDdtlEirwSeMM3ThK i1loSUep5K1tvBW+Nfj/Vqn7zYw15ildlFI9XsNNXasFBfiHLZggO5JgDuTpLGuCsQmg bmxUIxzl2qSaQjH7UeFVz4IkjfH3Y4MZVqqrOsRDK5zSbqrm/TgtTicz3vSLOnRJnJ/J XIhU3Df1i9OyoPQKsZUM2wgtnz6YWYa15g7ntAPL4pZEG9y2y/zgYEVqKf/hsc3jo+KS qw0w== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=jjSPRu5uI38ay3rKlk6f9vfQN4aBc7xIyp4P7hJYtxeL+1dje7sEHfkHKULgucOdL7 Q2qAU5r1xUAQ4REtweCdva/Nq0XHfdTy9hbTzDCTFV8dYd3NlbokSjqDG3HD0o0sudWX p/89YbfKtCbnpNA/jvhBFtnDRqFPgeKjN9/YudUDFoPIyYdrQG7ua2W9rW9dQUIlVOu8 8Erbd21NAfCnyTfoZ0/B9aWAFeDzbuWhcDRIVs9wkNxITaKCSbGTT3FIj68mvuOhKe4t x+Pu1QqsTfP94Vj4ZiE+fKvjhL093Bph02gp5fu90SAsFqvLxdjyiF3e/FIG2gJsI+rH IjMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uSUd22tS; 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 z8-20020ae9e608000000b007886d6a333bsi10529615qkf.351.2024.03.27.12.40.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:58 -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=uSUd22tS; 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 B453A385E445 for ; Wed, 27 Mar 2024 19:40:57 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 201BE385C6EE for ; Wed, 27 Mar 2024 19:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 201BE385C6EE 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 201BE385C6EE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568437; cv=none; b=Ruqies5HXLjOihkhHWbdnshk+94ekZR0UwuoY2LER7295WGYP+lIveffidQSa2dfhj+7IsZP7Yx5k+Vq0hsAemAuInEnI4VpTu0XMbB9SkvDdM6SlOu7zsF0KDab+D36pjn7C/YyI0nZ0FTnxDXm6nnGwv61QSAgu2b+jD+SnB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568437; c=relaxed/simple; bh=4aR3m2SjWqChSXYKCt63Vv0Bjg6RMaEe6T3zRnV9swU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=iKehDdKyofpNJfSXSds61YegHDrVptuM6hHUuUtFR/n8af1kcK08Xdfg1eoVG5gfsGzAumRCF37kHSs4JNj+U61gNygW2KW6IK0qeJHkbvsuTicR1GenKlxgwsnorFxmQuTb52gFLZ6hLmQglShpXHkWt4lOgUdGCH4HKkX7Dhg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ea9a60f7f5so206521b3a.3 for ; Wed, 27 Mar 2024 12:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568433; x=1712173233; 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=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=uSUd22tSooCT2c5ZE9NVI0wH1s+o4+3CzGMzzmvf987yO+HobbpTChxGIPYSJtWOe5 xRAhLYV8jGyzUvV/wJTzZGJKB/bDwkbwncP5PEHmpOZz/9pzKXPFOn+kv7dW09XRGNc3 1ldfYbQNjg6PE0FptPHQaXJXRHHvs8oov3p+rY5kdS0pniMglQJumnIt6I5F7SUfLVNb iJCf77YZmBO7AoMI4T6ZbnYfsVeApuivZ/fjUXAOwKbMpJoAviTAg19qzgP1NlOUlrfG sFAuOd3Fapzf25t3Ujujqs5jsbL0IdBLjfemmR7s66z4dVyd46bxXJ7t04UTnxYpv+9p wasg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568433; x=1712173233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=aOG+RcUQ6yLzJEXTGE9FhD2l0azkldD98L1pZIC2T0huhfrUcmREsH9CQF56EWjf15 9nEunj95BDX6BkuFMhIRc5vtOWtTn3uvAo9lZe7geq+2VzR6K/lsrlpNMNF8dvWtbnvD qdY2yvpezdP1Ryi2wdvhwfbzSmUOCqqmWbiogYCk1Yd0NyE0i2Xg0VdiwW8WAnB+MN0H CzKvn4DRBZylXGwVMBGUF6ectabiFagLjdIiyONb19tcA1JBgfy0ShbGn1bvuvzBKFd+ 0IN7L32+H8F31FsrIFf8hVhfWLvvZsbniJpBeadPvB6r+9bZn40YXxLfu0oEhmN5sXIF fr4g== X-Gm-Message-State: AOJu0YxPcOZ8GkkIsxMMSpm5maE3YHAM9YLwI+xY4p/0sO1Br12FxSuR cn6Dm3nU94FaG9UJwMVpJIhsEATk0Kue4cWd8UY2X7ZxS9p21KnVB/sUnjfPSG40Eu9fMtyYQgV r X-Received: by 2002:a05:6a21:a585:b0:1a3:6dbb:f072 with SMTP id gd5-20020a056a21a58500b001a36dbbf072mr1174537pzc.8.1711568433464; Wed, 27 Mar 2024 12:40:33 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:32 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 02/10] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Wed, 27 Mar 2024 16:40:16 -0300 Message-Id: <20240327194024.1409677-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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. To statically build fmod fails on some ABI (alpha, s390, sparc) because it does not export the ldexpf128, this is also fixed by this patch. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. --- math/Makefile | 4 +++- sysdeps/i386/fpu/w_fmod_compat.c | 7 ++++--- sysdeps/i386/fpu/w_fmodf_compat.c | 7 ++++--- sysdeps/ieee754/ldbl-opt/s_ldexpl.c | 4 ++-- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +++-- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 ++++--- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/math/Makefile b/math/Makefile index fb537955fb..964bf2be71 100644 --- a/math/Makefile +++ b/math/Makefile @@ -368,7 +368,9 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = -libm-test-funcs-noauto-static = +libm-test-funcs-noauto-static = \ + fmod \ + # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) 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/ieee754/ldbl-opt/s_ldexpl.c b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c index 1afbe7d8ad..932cc4341c 100644 --- a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c +++ b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c @@ -17,13 +17,13 @@ License along with the GNU C Library; if not, see . */ -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # define declare_mgen_alias(f,t) #endif #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __ldexpl, ldexpl); long_double_symbol (libc, __wrap_scalbnl, scalbnl); #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 Wed Mar 27 19:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783151 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2374713wrt; Wed, 27 Mar 2024 12:41:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSj1Z71d4rW+INFIPQKnkf63McHGqnzIi7ZMmeaEhdO7UOsamwOFnHzSZa2IeqSjejZeYlZpVmMw0C17fNH3r2 X-Google-Smtp-Source: AGHT+IER62zmELSUN9hbPlMbwux3HRteg/qlCZb3Bzv39/Kw4h91iUVPfeYymCp8u5kxxVj+aBgu X-Received: by 2002:a05:6214:580f:b0:696:b120:264 with SMTP id mk15-20020a056214580f00b00696b1200264mr446002qvb.1.1711568473043; Wed, 27 Mar 2024 12:41:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568473; cv=pass; d=google.com; s=arc-20160816; b=R7QgESBVGbmgeJC+1j0/xxlCnJQjuOsLkVlj3z/WVsc5fiL5j6dG5I8zptYCRVMbfp vslywTR99vXQk8YWUVpu1LSrB3Htq7UOA9TBLUBUW3R7REdTjXtJLnLg1rFGbOd0rodz ilElVnmpsQp9mHclBBYOq2Qe1kMvhyRf5BRSEXyDo2PmqFhOMd8Jhq36d63lE7reA1fA fQv66OeEBT1kQwuhExZJY1naXaCf/IL3R69RyYi6bvQBA8qud2xgiq5/isVKvHA7fc7X 3AzGKNdmmvq0Iq/VK191uVV0l1odkZzDsCCvfJ9s+M4WauRHaNlPQ84hlwLtgzjcT8CT qLPA== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=dcR2ma1WvOPlvqy70XySXYoVacImk32cK9Z3i7CYpHc=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=CNC6ZNuzOauKY0uHxpKDgdjN6gV1zS1XgvlkWWQ4AD9ACdUXnOZfBnSbAVOoXJZvgB P/sday/KMnYLixd3iwiLfbB1SMAEscg2bhqyEqdWHF2EBuhKQz/6LzXF1jUO0uFqagZj bgy82aGKRMlqcUQIP8c6Qcg2xcoGrNrlM4YOy5tCu/tVBz1vOS5px25AAav2MVXqh1yI eSntu1E3TGWwNFU4W/T21lCc24iOC5r9CKxj1VzqXwWnHbIKK7S/roLO2YPVB4XYbscj sHBSm/pOItfWV3MU+rEtjkiPvmVtixat13UA+5BUGO9ETIYh4rG2TpyUeSTovDHWqA8D ZEPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fpJjgSAz; 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 mf9-20020a0562145d8900b00696b0d57193si1429252qvb.403.2024.03.27.12.41.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:41:13 -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=fpJjgSAz; 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 7FCCF385C6EE for ; Wed, 27 Mar 2024 19:41:12 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 4147F385E446 for ; Wed, 27 Mar 2024 19:40:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4147F385E446 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 4147F385E446 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568439; cv=none; b=lquwqjMD50ridGY73lmnCJuDIV0Tac0MPEOllbGQQqR2CtLJhDCDR1AXk5enftg+wBXX+EePlqBmUp96sYbUrfwGt4kvpo3f4QxQXcdZU3JA5Z5bH09+1pL5Dt4EsbYrJq92WP/7gBhKzgeVfuZmq2HoUb/4/9NettoAr+dMtQg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568439; c=relaxed/simple; bh=FWgJkfkwseYq7F5C+DGVquhkJLx5vPNk1M7TtjMJhC8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=t3Cj7A3IpakMsvW2WdGzfu2xK7H7uWQ+GzFSQklqJa7M6WYRy7SJ08ZTbgJ1plTBQ6Li6h1HUzX8NyVEENcsshF1IHRRgslxUTDd9C6jmeM6TmlENb1pvArOfltcM7zl1qsPenA4FpMW/iZVM2fKRiI32GR8Tt0hV+O4/G/fsU8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5dcc4076c13so176087a12.0 for ; Wed, 27 Mar 2024 12:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568435; x=1712173235; 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=dcR2ma1WvOPlvqy70XySXYoVacImk32cK9Z3i7CYpHc=; b=fpJjgSAzzjcpFDCJfbmqTzNXFIzcr27LAnvI7YOJptnc69Mnnxo6HcLUdEYJ+18XQX obrpoj+RGeCbEwO/RGw0GZDgidRAyrVisb3NiVdrowFnvkG/xJ8GAhrUOtRDJBNJu2Re op+fFYQnS9fCESFKTZdDHBGwV56gHeYGE5u3JpHFJanjXDKwbufiQwHV67Ii3r3xJQ2P ULc2REKWodqGQpw3x1YuUP+79/N5kOJv/1MM7c6PsLvvms2Xb81GnXKFcAJUEF82KffC K6wAALKkwZNodkj89OF9e2Cx29ipp1KbPwHT0Hj3o1c8lbck6zIP/YHJ7D5iBhXb48v/ S8Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568435; x=1712173235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dcR2ma1WvOPlvqy70XySXYoVacImk32cK9Z3i7CYpHc=; b=pBxhF2HgmAgWrT9y61rzA8/yjFwCofA2dJUgko+k51N862CQgCLFF0xmWZR5442tT8 jFoUYuw/saMCJ3abVLW7cvyiwYBw3e58HmavN8UKqa8z7IoGtuyqCi61bfyHq8ZL1rt/ gIXj69UFPaHB3vIeZZB2Fn2ylux3BmsRxh99159dEG+69/zeSOw+7jMhiaXwAngtXQHI ItwVsucixjurxBWl/VEZIoT5xEZnr0mTU2doO77A78SZfZ5RSDTDUeL5Fwmx+ThZ0/2k ctrhh9UDqlkLuGyVzv1OPqVgSUWeCYinfw2oBTrThczjVqIPXGNF5Do1UnWhPeeVt3x7 ffVQ== X-Gm-Message-State: AOJu0YxRKtzURdQSjm5TIIjHf6z8LOL7Ie4uUrqWA8No2d+VX+ANfShi ViT1PgLxuWFXZg6DBOH5OgfVFzWpHoj5dytAZ2fDOHjYmK82EApCsyzUUrTalhw6Ipa0nkrEvhD 6 X-Received: by 2002:a17:90b:1bc2:b0:2a1:f4ca:dfaa with SMTP id oa2-20020a17090b1bc200b002a1f4cadfaamr323501pjb.13.1711568435616; Wed, 27 Mar 2024 12:40:35 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:35 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 03/10] i386: Use generic fmod Date: Wed, 27 Mar 2024 16:40:17 -0300 Message-Id: <20240327194024.1409677-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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 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 (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; + } } 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/e_fmod.c b/sysdeps/i386/fpu/e_fmod.c new file mode 100644 index 0000000000..3625758f97 --- /dev/null +++ b/sysdeps/i386/fpu/e_fmod.c @@ -0,0 +1,2 @@ +#define FMOD_VERSION GLIBC_2_40 +#include 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_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/ieee754/dbl-64/e_fmod.c b/sysdeps/ieee754/dbl-64/e_fmod.c index b33cfb1223..7651cd212a 100644 --- a/sysdeps/ieee754/dbl-64/e_fmod.c +++ b/sysdeps/ieee754/dbl-64/e_fmod.c @@ -175,7 +175,10 @@ __fmod (double x, double y) strong_alias (__fmod, __ieee754_fmod) libm_alias_finite (__ieee754_fmod, __fmod) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __fmod, fmod, GLIBC_2_38); +# ifndef FMOD_VERSION +# define FMOD_VERSION GLIBC_2_38 +# endif +versioned_symbol (libm, __fmod, fmod, FMOD_VERSION); libm_alias_double_other (__fmod, fmod) #else libm_alias_double (__fmod, fmod) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 8f40ddb150..30665f8b1a 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1181,3 +1181,4 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 fmod F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 5d89aaa08e..44932f111d 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.40 fmod F From patchwork Wed Mar 27 19:40:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783155 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375170wrt; Wed, 27 Mar 2024 12:42:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlA1qFhymS6hNu3kpxQF4H2/TJp/B569z6NcpDS7iOgGU0t39tQMjNGL+/RFzYOw0SiyArkSGZWEi6IkLu72o2 X-Google-Smtp-Source: AGHT+IFLwEp+jiZl1fYzYTkxVW5QEkliNA2kxa9cGXxefQJ6W3T5C6pcYfPTdnQvlZm3HZx8jT3O X-Received: by 2002:a05:6808:ec4:b0:3c3:d6cb:4b3d with SMTP id q4-20020a0568080ec400b003c3d6cb4b3dmr1113551oiv.13.1711568534341; Wed, 27 Mar 2024 12:42:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568534; cv=pass; d=google.com; s=arc-20160816; b=VOntePnzrWZx5V8/7bYfE+lY06pEj5PfksTOx+p2nP6duvxdjvMBr06mAn9rFmWHU/ ITBTPdt0dYGIpuLXvLTfoaiIjyEqhfYEFrRpn+5bzV9mwPjcMwRLX1qzwJNm7JpBluOc cDjPsJZwZyUehGdcDDtXUE5wJ9fqEPtg7RV+r1zQPtx/sWhACmjXFC3Wd5S/gNRFENy5 Ta/yEWTcnO3e4D+sAwtrw6NWAqFe71qXoJjbyH5RiHM3UamuGqFRgPWGn5qZff/bNNz5 FaykmNtEeNDQ/M9OIUXu8lu60bxwu+1WnTU3+fWvJqXQ1lNks6HF9OClOwB8GvdCycRu +nGg== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=xxVrNOvOe0mPi/BVXSb7kTUlPxIfJx2Q3Oom6CeE+A8=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=o5QoHvTSqQQNkoXE7EEgPlhQjQID3TIPWDP1cQ6tkZx+i/ni8A2xcEBYrtp/pDRYm8 x14xWRuy/arW1fguodfZUk+fLoXQJ3WJJOslfxXhsErpKBxS6YxO5a0CSvc6HzGnnulZ 9Wd5dsz+0OWAkrkCYdqAC7HTeDOdydlfde2kcjAKFyqIxKO9I4NA+cjw/KiWJxUiU+Ki TCKVKos42iCHYCkwzi9mx+B4r2bHTb9vGO+Ny0BS7GZ/ZHb8Iscch9tq+17OMKpDFR4z MCHyLdw7VcCmAbjzb4LWJgnVwUeKTLF05psaX0J/QHjzJGWyHwi6hiDZb3xPhBw6rMRp GSuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgkNLtdm; 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 u34-20020a05622a19a200b00431627ee3a7si5982496qtc.118.2024.03.27.12.42.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:42:14 -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=dgkNLtdm; 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 E8467385E830 for ; Wed, 27 Mar 2024 19:42:13 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 8F30B385DC0F for ; Wed, 27 Mar 2024 19:40:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F30B385DC0F 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 8F30B385DC0F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568442; cv=none; b=nElRzcrFwaxAEbJ0Kji/7GBVAVr4j0Moj8T+Fv3IYRXIwWEQZxmjXnqTJZrPqPsAfzaRF5beAKNSVJ6DPL8GGPz0zwQnFX0hsmbI7WBFQuoON6ZPSx5JesxWBsdPt34w7t9QTMqxaJfE1yHIWMpHP/Dv+Xrzt05r4tSUkMXok4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568442; c=relaxed/simple; bh=Lj4xaog2tdjPc2qDBaWYQmFkmaPXpB5xrXtcNLqjTv8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=MGJAdQ7dKsbhwY+XqHbPMmtGbvHbVd/PeJxDOP+erGVdv195PbWOM9ClyYIBkQlRI0k5Mw7pKixjR5YHtVcIJJF+bU8mqlfmtY+MBq0t0LbZZ9TAKuL9/zRF5TFXiGJL0xtlkhBYE6YIkGh0y4FnmC7mdV28lSIrAiECRI56rl4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5ce9555d42eso71945a12.2 for ; Wed, 27 Mar 2024 12:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568438; x=1712173238; 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=xxVrNOvOe0mPi/BVXSb7kTUlPxIfJx2Q3Oom6CeE+A8=; b=dgkNLtdmk5dChd/ogS32q/1rhlS4XoOFTBnaQayoEbcOJWKwYTErws/ubnmDYUzRXf Jhpp8PGz4OoeY+gdVvnBuDn3aR/tzp4ghRuhzjool/ldIaKlTX7Auak4kM/oHJ9VZBxa 2+dw1W9bQmrzWGriLB370A8//rk+ZEmk08I0GL0UNpjiy4tFwiDkxkE5lTPdYdmDLYb5 yQG5o1uE9jHlHiQ6dsOAmEdYvGM/Qcj3T1u1AcxqnOINe7yf9SaOLYx6Jtps/Sz/SNID eWZCGV+GJBAgtL3b+DS1MtIn5f99r6l0jtqHbFMt6afNk16Ntm/bFWI2BZxp+NI23owJ IvJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568438; x=1712173238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xxVrNOvOe0mPi/BVXSb7kTUlPxIfJx2Q3Oom6CeE+A8=; b=D1KbrLofB6iafR7Bs1JGqHIaWNhwbxn4BSLJ0mQUB5Hqf0aZY1NJWOiPPnemZ5l20n nOCL0+XALDf73h0IHe/WgGNB1qFKudOIT3bBznsoe0+AirmedjR8G20nxRV+GZ8+flTT IwCH/fEpnt+bV1dWy4SeAiEbtbpq8CENtjVraFoKgUqmVZAleo8/BAFhk83u2SEtyrBm hrVLzhg45hWxvc/Tgt8ogo3Au6N6t1HkwbFtltyghBJ4D4gDUjUCkji3YOh3/ASrz64n RBIdUrqf+F6WBUUCeWM8MPib29AMiUpb+No9vvVGyUadPeyMuJplAiLpZzoESlp/ncgh pruw== X-Gm-Message-State: AOJu0Yzt1qT3Q6aZY41U1h/O8r/Mik6lxSksD0OUQQ4arNeKDfrXOGxi McCyXsnE+w4GH6uGGNsiAkrjSSpTQyeTAXBwGBAkuCKMq++NB3HzKmey6X5yBNbFXbZ1tY+EV0f P X-Received: by 2002:a17:90a:df18:b0:29b:b28d:ac66 with SMTP id gp24-20020a17090adf1800b0029bb28dac66mr773158pjb.5.1711568437832; Wed, 27 Mar 2024 12:40:37 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:37 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 04/10] i386: Use generic fmodf Date: Wed, 27 Mar 2024 16:40:18 -0300 Message-Id: <20240327194024.1409677-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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 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 (Ryzen 5900, gcc 13.2.1): * 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/Versions | 2 +- sysdeps/i386/fpu/e_fmodf.S | 18 ------------------ sysdeps/i386/fpu/e_fmodf.c | 2 ++ sysdeps/i386/fpu/w_fmodf_compat.c | 15 --------------- sysdeps/ieee754/flt-32/e_fmodf.c | 5 ++++- sysdeps/mach/hurd/i386/libm.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 7 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_fmodf.S create mode 100644 sysdeps/i386/fpu/e_fmodf.c delete mode 100644 sysdeps/i386/fpu/w_fmodf_compat.c diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions index d37bc1eae6..9509f9b7c7 100644 --- a/sysdeps/i386/fpu/Versions +++ b/sysdeps/i386/fpu/Versions @@ -5,6 +5,6 @@ libm { } GLIBC_2.40 { # No SVID compatible error handling. - fmod; + fmod; fmodf; } } 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/e_fmodf.c b/sysdeps/i386/fpu/e_fmodf.c new file mode 100644 index 0000000000..15a0f960bf --- /dev/null +++ b/sysdeps/i386/fpu/e_fmodf.c @@ -0,0 +1,2 @@ +#define FMODF_VERSION GLIBC_2_40 +#include 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/ieee754/flt-32/e_fmodf.c b/sysdeps/ieee754/flt-32/e_fmodf.c index ef95c05800..78071df756 100644 --- a/sysdeps/ieee754/flt-32/e_fmodf.c +++ b/sysdeps/ieee754/flt-32/e_fmodf.c @@ -173,7 +173,10 @@ __fmodf (float x, float y) } strong_alias (__fmodf, __ieee754_fmodf) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __fmodf, fmodf, GLIBC_2_38); +# ifndef FMODF_VERSION +# define FMODF_VERSION GLIBC_2_38 +# endif +versioned_symbol (libm, __fmodf, fmodf, FMODF_VERSION); libm_alias_float_other (__fmod, fmod) #else libm_alias_float (__fmod, fmod) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 30665f8b1a..88e7538e51 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1182,3 +1182,4 @@ GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F GLIBC_2.40 fmod F +GLIBC_2.40 fmodf F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 44932f111d..c99c60161d 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.40 fmod F +GLIBC_2.40 fmodf F From patchwork Wed Mar 27 19:40:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783158 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375368wrt; Wed, 27 Mar 2024 12:42:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw7A70tk7+lPJa4WB/haHaRlTi8uF0ctR/oGDUM15013wdUEqhSuZ1Gl1wS5SpUsTtOT1tmkLlsqQ0jZY8Uppw X-Google-Smtp-Source: AGHT+IHgIRUSPNHTp9/MosPB76He4D4m+ELL2iriGQXMV5OwqBhcUPYXdv4d4HyDlY5nd0bbF+CW X-Received: by 2002:a05:620a:4628:b0:78a:6b78:85ac with SMTP id br40-20020a05620a462800b0078a6b7885acmr943892qkb.0.1711568565882; Wed, 27 Mar 2024 12:42:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568565; cv=pass; d=google.com; s=arc-20160816; b=tEXYmQ1P2/cfwaudKZjxGKqnmPthT2Gy3Zm2LEBp3Jb3V4/z+01CW/zKnO97YxjmlO Q3g22y7aJPdeNmwh+QaCbFwGfIljBodI476UyG2s8XJxRsTVi4crKhCTgrmdxNgR/fAR u0AtW15mSTavM7QicVXW4HteTAePGiT1HZuCsJMOMfsBAGCPZnRa6rS63XqMO1F6uhQ6 rvEmUJYcq9X+ebP69vxMxaEUVmo5aDE6j4uAa+RyUgD/t4hmELxDu9o1u32f45hOsM75 wxuRdJ9Z7eeKhmLWfsTmdf9D8u7D6GxvK9j10Uw6fpPp1WLBukg6dhN0AcdJnQgxfFbs igHg== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=DnjP5zBH6db4XAECtZPSD0FlQ9mZafYAi0YvzhHcxqE=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=CFLgQKNucfB2IBE2tJL6LJ4twEc5DZaeebERvl2Szb+j9Cm2z1KKLtUcLBLbjycI9z FbwXn22sDdkfXzJBs/vkVAy5wRq7fZINo2P4pzB5ZKeqrcVitVgXLw1TXuEvTN2Plr2O CunSKeLQ2e43Xw1dLCDL3VfPEgVbQH3fIXchQRRYuZMQWpnlIFS3BFFi7VVFTeEJ/IlU Z15oDQwT5PzDfCp9wU4H4a4RzDkUmx6r9sOJb/r/XfHQIbKo4JfI+SBPHrYPXoGAT9AI FT6kAM3vzqv2pgQrPWXpX4rynglHvQuRx6C5R3GzV1xcqE5XsAUiikcIUcsouRNyvEnK yeOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xml/TaQx"; 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 x18-20020a05620a0b5200b00789f0e4f1eesi10337712qkg.686.2024.03.27.12.42.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:42:45 -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="Xml/TaQx"; 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 41F5C385E44C for ; Wed, 27 Mar 2024 19:42:45 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id A3032385843A for ; Wed, 27 Mar 2024 19:40:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3032385843A 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 A3032385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568445; cv=none; b=Y5K0J1QYzlH+LZNay6MI2+2RJ+ZAjMh0MlGSKEdJyJv3IuLbqoaHWbh2JsGbS2R3dGm3NuibHWPMmKfzfLVIEzp4Ti6dFq+JTrXRstbX+2NpC/5aBxxpBrA+EJunm9Sbiaf5f3YSixeoZXYTYZUJ8vohZFyOTst8CrUOlrTI51c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568445; c=relaxed/simple; bh=wHbvmdicYImSDZMFciUEE4a81Gu6In5X3H4kMS5X25o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=x/qWmQu5sU9UnvPHnF7pZQil2gmF4alfCQWM5fDh9EltJCow1zIjrXzO7nTgULpC2c62kTUru/cLeOcnPxbjT16ePS4F9f+7Eaeean5u55du/t2V7uuTwT/GeSHg7QSNcF3XfuyjYZTtA/lRuyp/K3DGuIvqzLsJOLIG2MMnQic= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5cdbc4334edso73058a12.3 for ; Wed, 27 Mar 2024 12:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568440; x=1712173240; 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=DnjP5zBH6db4XAECtZPSD0FlQ9mZafYAi0YvzhHcxqE=; b=Xml/TaQx1qN4IaZ2Ypp5DTljZI0T2cTJnEyyMJI2DUAr74T7tIuQo63XaxmxibZJL2 66ZYdawo32+TC1VrZVR/H/7OMThaVbSUgFbsCC35GaU5O1g3D+9mT37Nv5rcBQqC39aU /xETC2/jXkvO6cJBNF78eEWemRDVuDdixRuHriHyXzV4yddd+sK5wyq84B6D10aaJvs5 KdbR/e0+BEQuLfInst8d4ZMgxAUCyLZ1y6uVq9MEbbWwmCxpYe5QdcLlM8DR1LS7j28B s0WT4QOrdnXSWA/RNRp/bscdFNHqhVPFwqcKrE2N8okWDvAqM3QMLobdC6H0nN9IQVcj rPPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568440; x=1712173240; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DnjP5zBH6db4XAECtZPSD0FlQ9mZafYAi0YvzhHcxqE=; b=S3H/tJkGJlf19OilhkovGsfA39NNFN4jTZU8DSGqZDkQeuSsaTG03hRDGvX7YBnSJl EazktXIwNCk3RnunPeeubvS3sVfu2RI6cN5ju/l3bZHgDHufqg/CAv6w+oyRKwov4ZRe fHZjvzqXiPuk50AqQw1wPOUmyG4ZoSYEaxtRpbv5ktfTQ3BZ5aFqG3dk6vUNjgA9Qfjg LMdlj2yxJ2qDps1fpryyB2vdjo6+FRi+IlMDFBKVmYnnHiCEEHsQuxvH3RkN5jd/D6wb 5qDTAESnkmptzHVmgTomrkgoBHdoPK+aDcgS35TRRLtPuZTUOUsvQQfaPfYXIqSGhlFW Ie0w== X-Gm-Message-State: AOJu0YxhIKeruK+kj4bq6ay3W17YmV3YO3UttMDI4kkLqq9bM0WQ6TMs pHVPD+ZLF+Vaa7bsedrGJuEvoPBDBiT1na+VIGkZusHIHDDRAHRFQKTufFtqhf9NkyRtDnP+VP6 K X-Received: by 2002:a17:90b:4001:b0:29b:aee2:cc8f with SMTP id ie1-20020a17090b400100b0029baee2cc8fmr726245pjb.9.1711568439973; Wed, 27 Mar 2024 12:40:39 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:39 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 05/10] math: Fix i386 and m68k exp10 on static build Date: Wed, 27 Mar 2024 16:40:19 -0300 Message-Id: <20240327194024.1409677-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 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 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 08ddd26814 removed the static exp10 on i386 and m68k with an empty w_exp10.c (required for the ABIs that uses the newly implementation). This patch fixes by adding the required symbols on the arch-specific w_exp{f}_compat.c implementation. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. --- math/Makefile | 4 +++- sysdeps/i386/fpu/w_exp10_compat.c | 9 +++++++-- sysdeps/m68k/m680x0/fpu/w_exp10_compat.c | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/math/Makefile b/math/Makefile index 964bf2be71..f1d210797d 100644 --- a/math/Makefile +++ b/math/Makefile @@ -367,7 +367,9 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ -libm-test-funcs-auto-static = +libm-test-funcs-auto-static = \ + exp10 \ + # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ fmod \ # libm-test-funcs-noauto-static diff --git a/sysdeps/i386/fpu/w_exp10_compat.c b/sysdeps/i386/fpu/w_exp10_compat.c index b53455386e..49a0e03385 100644 --- a/sysdeps/i386/fpu/w_exp10_compat.c +++ b/sysdeps/i386/fpu/w_exp10_compat.c @@ -1,3 +1,8 @@ /* i386 provides an optimized __ieee754_exp10. */ -#define NO_COMPAT_NEEDED 1 -#include +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include +#else +# include +# include +#endif diff --git a/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c b/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c index 0d3e718626..350f2e4b4d 100644 --- a/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c @@ -1,3 +1,8 @@ /* m68k provides an optimized __ieee754_exp10. */ -#define NO_COMPAT_NEEDED 1 -#include +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include +#else +# include +# include +#endif From patchwork Wed Mar 27 19:40:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783152 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2374922wrt; Wed, 27 Mar 2024 12:41:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4PWqy3WuJwV3dPhZXUW4NE1az3jmusTn939wd03kezaLFlkmT7j64p7qJoIGrE/OWC59gZMcv5hiKkncBghqn X-Google-Smtp-Source: AGHT+IFA5eZv/r0bJcsfx/h57DUZ654S6DmDJuRMo6r5E5tHIw7Vp4Wvb6nIpKfCvIM/pwYy9KWJ X-Received: by 2002:a05:622a:1708:b0:431:38a4:ef47 with SMTP id h8-20020a05622a170800b0043138a4ef47mr760227qtk.48.1711568501996; Wed, 27 Mar 2024 12:41:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568501; cv=pass; d=google.com; s=arc-20160816; b=EvF9Iepk7vL1n6/AIDmCXtJc8oJ/6E7MxtpmDd+cKL/opy17a8s5UyD0c6fSCJLWYd BeCWo3v185Tyd074HMKZ4Psy6uaZ6PY++krYhXyEHpf9ofEWKxP7++H8iLwzz4ZLIuNy WElhwPxT4k/q2Oy0dKk6bAlnEl4wMvCnyEKGrkp2Cl4seNQKGPzNGp+XvYooZ//mBaqu oxuCHwuSqXJmBmkGgyD4p89R17Z7olNQcjRv1pXrdOalAzHn2i5caerKJf5CayFSsxOQ ibAIc3FRWWsRmWCGVjE+s0HoMsoLqlLwTSG7Lu3MRyvkBu2ce38BDRSWbzzKLscAZyvu yb8Q== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=3gTSKqePJhhgVkKF2Oni/s3e8N6TubY4O/UTslyMKiM=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=0cXG0upaWZ1AMM3kKivAxJBtga2Zz5KGT+yIDz5pfESofF8YnRc0w2StAK+TKDNr+P kOw46sGh+D6fPIZfiQHm/gchx4ZzQIM83siclOjFCJJZLsGixO+yRALD5kkRbINVG1mB GYSVLXkCWfXF3L/9jfxkw5JyD+gD4+8x+MBb2jpZ7ILjBNjb8zcnZz7zUgKRAevLip63 AOQDeykFrDqAPmkx5MW9unEg1KTa9CkwaxiBofIfCsrIyG+8XlP1qNVjOl6pdSUrVvMH xZ7RaZhX6F/8jM9gTepgDAbWFoL5dEkgPXhHze64/bxktWAZhZf4/U/FHUhwwYjOhIm4 7rAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUWOkDWA; 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 t42-20020a05622a182a00b00430d9904cb3si10168538qtc.632.2024.03.27.12.41.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:41: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=iUWOkDWA; 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 8FB9F385E450 for ; Wed, 27 Mar 2024 19:41:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id D2A5E3858C31 for ; Wed, 27 Mar 2024 19:40:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2A5E3858C31 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 D2A5E3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1029 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568447; cv=none; b=CPKIl+nnNpLBLlk/WL7dxFX9AdJQv/UyIfZP7xQh/04Q4DWfajzOu1zSRce4cvXSJ/eU5IHDKBjn+sBw/kMPTVApwboTfvYG8rzV7j4i3Ug6wjfnso0AUbbMOK356RCW5nczX6SoEBdkmCyMLvgcO4LL2qyURcyb9vPuKASJd4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568447; c=relaxed/simple; bh=7lsd+JEB6OXhLwzIRmgXKA+7kg76cGxq/9jNxZ2FcCw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=uLMKTNDJBAZW9s9BZMQZ+6nKvX4wqFKHFTMQJCasclJqDWtfo30rb1c6cFsgIBmqKQxtJLlpPKBRsOuk+5hkBa9ZwE+gxGIjX3/m1LtmvA2KYtUBeuAHvM7WyRhNyuv2bIfKPJ3zqBwhlwwV69zEewruuzMRiTpy20AZ28Xl8N4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-29e0229d6b5so190473a91.3 for ; Wed, 27 Mar 2024 12:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568442; x=1712173242; 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=3gTSKqePJhhgVkKF2Oni/s3e8N6TubY4O/UTslyMKiM=; b=iUWOkDWAwntfN4m1j33YvcIzLJJ+drr9fZBRqCgrqDsigrTnUgWYBGcWzmblabFaGS YofY6Jlx3xgV7h5iOGrmg6BZ5vwol4L39GW5avj7C0sPcKp7MbhqvpGtLxLu6f7QLYFb XhsSbZciPowwIYiKzXi/N+/wHKYMj3OYONVmpKtOXjf18A23JQIskP1qbXTr0U/Is0HB MnW7zKyRXaAS7QZfcBUq6pAavHBta4XoZIM5wQLbIJcB8F+iJAEMCUD57vWbMxvET+AV TVcGt6eZnO3KSiCE46IfWZ2YOa50j2YA1prJL05ocDqx6a7oqzTnEroh6Lg0Woqiy+cx v56w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568442; x=1712173242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3gTSKqePJhhgVkKF2Oni/s3e8N6TubY4O/UTslyMKiM=; b=sG7vObilIhJxGEAirdt9bkD+ULq5lkkfgGlUDiC60+wkeQ+l6FMgOvnl1K3p4ibVJR xn7X/LbU4js8aB3UCZFAeQjdq5BBmPj44qbtqtA9kpOSyfahwSx8/T2fERSqH2WqCAC5 SVQSDl9It1fxqIF+poHqFLsraiVBk8H1iY+2QoJZxO+/fjfUYBtYjDhJcLYAiuThNtsN VPYPqBpeilD2P9B5Z4XHJ28IywQvreJssv6U5QCdpzekHBosW9Fh3vlLW7qNpZHpjQ1g CJNI0C4iIjzcbUXtFNniO7l5tToOTmjXEx7H8w2pQ4IPCwlCIZ+fIrZYQv1p8xfwNEF7 7Pcw== X-Gm-Message-State: AOJu0YwIW/gIz/vcy5ekr4+ZAopcMEoVYjdj8xdayHxHIfY3yHdsP6UK zVZY8gqi0XXwPhEIftfC/fAec/xgOjAXEPIhwECw9hZ50jmmulVAXjTspRAKFGOxzTk0iOwrsM2 S X-Received: by 2002:a17:90b:4c0f:b0:2a0:6bca:960d with SMTP id na15-20020a17090b4c0f00b002a06bca960dmr662737pjb.2.1711568442476; Wed, 27 Mar 2024 12:40:42 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:41 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 06/10] i386: Use generic exp10 Date: Wed, 27 Mar 2024 16:40:20 -0300 Message-Id: <20240327194024.1409677-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-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_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 slight better (Ryzen 5900, gcc 13.2.1): * master "exp10": { "": { "duration": 3.70091e+09, "iterations": 5.8534e+07, "max": 91.279, "min": 62.6225, "mean": 63.2267 } } * patch "exp10": { "": { "duration": 3.70793e+09, "iterations": 6.328e+07, "max": 259.592, "min": 52.1145, "mean": 58.5957 } } Checked on i686-linux-gnu. --- sysdeps/i386/fpu/Versions | 1 + sysdeps/i386/fpu/e_exp10.S | 51 ----------------------- sysdeps/i386/fpu/e_exp10.c | 2 + sysdeps/i386/fpu/e_exp_data.c | 1 - sysdeps/i386/fpu/w_exp10_compat.c | 8 ---- sysdeps/ieee754/dbl-64/e_exp10.c | 7 +++- sysdeps/mach/hurd/i386/libm.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 8 files changed, 10 insertions(+), 62 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_exp10.S create mode 100644 sysdeps/i386/fpu/e_exp10.c delete mode 100644 sysdeps/i386/fpu/e_exp_data.c delete mode 100644 sysdeps/i386/fpu/w_exp10_compat.c diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions index 9509f9b7c7..7326f25583 100644 --- a/sysdeps/i386/fpu/Versions +++ b/sysdeps/i386/fpu/Versions @@ -5,6 +5,7 @@ libm { } GLIBC_2.40 { # No SVID compatible error handling. + exp10; fmod; fmodf; } } diff --git a/sysdeps/i386/fpu/e_exp10.S b/sysdeps/i386/fpu/e_exp10.S deleted file mode 100644 index 902f70b77f..0000000000 --- a/sysdeps/i386/fpu/e_exp10.S +++ /dev/null @@ -1,51 +0,0 @@ - -#include -#include -#include - -DEFINE_DBL_MIN - -#ifdef PIC -# define MO(op) op##@GOTOFF(%ecx) -#else -# define MO(op) op -#endif - - .text -/* 10^x = 2^(x * log2(10)) */ -ENTRY(__ieee754_exp10) -#ifdef PIC - LOAD_PIC_REG (cx) -#endif - fldl 4(%esp) -/* I added the following ugly construct because exp(+-Inf) resulted - in NaN. The ugliness results from the bright minds at Intel. - For the i686 the code can be written better. - -- drepper@cygnus.com. */ - fxam /* Is NaN or +-Inf? */ - fstsw %ax - movb $0x45, %dh - andb %ah, %dh - cmpb $0x05, %dh - je 1f /* Is +-Inf, jump. */ - fldl2t - fmulp /* x * log2(10) */ - fld %st - frndint /* int(x * log2(10)) */ - fsubr %st,%st(1) /* fract(x * log2(10)) */ - fxch - f2xm1 /* 2^(fract(x * log2(10))) - 1 */ - fld1 - faddp /* 2^(fract(x * log2(10))) */ - fscale /* e^x */ - fstp %st(1) - DBL_NARROW_EVAL_UFLOW_NONNEG_NAN - ret - -1: testl $0x200, %eax /* Test sign. */ - jz 2f /* If positive, jump. */ - fstp %st - fldz /* Set result to 0. */ -2: ret -END (__ieee754_exp10) -libm_alias_finite (__ieee754_exp10, __exp10) diff --git a/sysdeps/i386/fpu/e_exp10.c b/sysdeps/i386/fpu/e_exp10.c new file mode 100644 index 0000000000..340254fc6e --- /dev/null +++ b/sysdeps/i386/fpu/e_exp10.c @@ -0,0 +1,2 @@ +#define EXP10_VERSION GLIBC_2_40 +#include diff --git a/sysdeps/i386/fpu/e_exp_data.c b/sysdeps/i386/fpu/e_exp_data.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/i386/fpu/e_exp_data.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/i386/fpu/w_exp10_compat.c b/sysdeps/i386/fpu/w_exp10_compat.c deleted file mode 100644 index 49a0e03385..0000000000 --- a/sysdeps/i386/fpu/w_exp10_compat.c +++ /dev/null @@ -1,8 +0,0 @@ -/* i386 provides an optimized __ieee754_exp10. */ -#ifdef SHARED -# define NO_COMPAT_NEEDED 1 -# include -#else -# include -# include -#endif diff --git a/sysdeps/ieee754/dbl-64/e_exp10.c b/sysdeps/ieee754/dbl-64/e_exp10.c index 225fc74c4c..c63b852f72 100644 --- a/sysdeps/ieee754/dbl-64/e_exp10.c +++ b/sysdeps/ieee754/dbl-64/e_exp10.c @@ -99,7 +99,7 @@ __exp10 (double x) /* Reduce x: z = x * N / log10(2), k = round(z). */ double_t z = __exp_data.invlog10_2N * x; - double_t kd; + double kd; int64_t ki; #if TOINT_INTRINSICS kd = roundtoint (z); @@ -147,7 +147,10 @@ __exp10 (double x) strong_alias (__exp10, __ieee754_exp10) libm_alias_finite (__ieee754_exp10, __exp10) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __exp10, exp10, GLIBC_2_39); +# ifndef EXP10_VERSION +# define EXP10_VERSION GLIBC_2_39 +# endif +versioned_symbol (libm, __exp10, exp10, EXP10_VERSION); libm_alias_double_other (__exp10, exp10) #else libm_alias_double (__exp10, exp10) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 88e7538e51..01c5633663 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1181,5 +1181,6 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 exp10 F GLIBC_2.40 fmod F GLIBC_2.40 fmodf F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index c99c60161d..3413cfdbe7 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1188,5 +1188,6 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 exp10 F GLIBC_2.40 fmod F GLIBC_2.40 fmodf F From patchwork Wed Mar 27 19:40:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783157 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375334wrt; Wed, 27 Mar 2024 12:42:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGubWSXt0GURQ5b5w6BwbcbQ3baRSlsPfJKhfRxBaBnR0Mp28Rcpk957nyWjEKrh/aa04CNvgZu1dFm4IS+Rh/ X-Google-Smtp-Source: AGHT+IFC5vay4Ou/WbovbUnTVUe2f4YfoCqg277lUH0J8gKQTMc9Lq94H4IFCQ75OCyGC5klAkl3 X-Received: by 2002:a05:622a:1002:b0:431:7c76:2cd with SMTP id d2-20020a05622a100200b004317c7602cdmr456687qte.31.1711568559710; Wed, 27 Mar 2024 12:42:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568559; cv=pass; d=google.com; s=arc-20160816; b=s2fTU6qVqNmlL/SqizSoPj3qdOZEyumqysYuZr08Y4+xDTHjcYqCqWdwuKaNNtiOz2 34Vbcb2fv+785Xh0fSgoEQM/OU4of9rJjJZzlpnwn2IRBi4TRP3u0HDSGmEXpCJCgTcJ bgH180jN8mdhoK66cUUTwg7oVsJUDcfaj6/b1R6xTQ8SwsX9ry6/58O3ElXusy4Z/IcS RPbpouOO43WNcoXKbVIlPibPH9UZSpTMzX+7n5s0Q2PsGzZNAUzG9BW+q7gbMkZGBRNF 1u8kY2Nf7UjPH9gQuDwnTZiBjkokO9dkTc7uNNm8RsIpDP4XWVuO2CrDS28vvUV2iApV UWdw== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=b/uJsYX5TjTzzmu5D77iSjXX+egw1x7sUXQBSMn9NVQ=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=jcHe4eqHmugCBgVShmKlsaLBkJtJ7FKjWBoLE04ps2XXhjEehb/d/xn/KZ137Xt7/A lqrqavIrAAkgV2juX3KlCWcK4V6BomHd3UVPRSjXCgvnRRlFYfEVcRWndsiH+FqEC5Ya LLVNC4rGvuKguHBk2h3p0RSNm+S1smSUSNy+wJzCS/IJzU7JuWLO6J6s1RRFqbpvn47T 2Yg2Wb4n1ZbukjVc0SQ6yDuhkxxAAEeojKZghVv1Us1e/Sc5bc32BIxLKU3sz6e0wdyk nCTaRlEBhuIMXQ7rBzkrfMnffoKscuAmdnPeoWpLyfu5xNMJj5t8MCf6GaAASm8Ux5gj sBYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZFTOjJEo; 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 gd27-20020a05622a5c1b00b004312638637csi2389010qtb.504.2024.03.27.12.42.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:42:39 -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=ZFTOjJEo; 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 51940385EC57 for ; Wed, 27 Mar 2024 19:42:39 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 8F4DD3858427 for ; Wed, 27 Mar 2024 19:40:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F4DD3858427 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 8F4DD3858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1036 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568448; cv=none; b=MAUo+ZGGhyZi6dGlIe93mP2Ym15IjIhsqnizoUCRLy3QQDf0S5fLNjWSTB6V4Wp3Xclk42nDvQNPAanW1coHw772ELZ/tThc565TPHVngckM1/AIudsX/b8p+7HlJZtGGAH+TT/8rFJkz+opBwLu0d0jjxfJow82SM8w+ly8S2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568448; c=relaxed/simple; bh=V2QOHmynST+A06BJ1vVs7hRXKEsIYCDGCjaalv4frLA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Y3j0iod9p/vbeHuLn/QS2/oWvxQY85zGJHeZkIBmuD2Affclpor0vtBhvVTIWJYlvImethCL18kmCao0NSfI8xSXLPtWp2ZR0bAr4c5aEPQ5md39hzmSMGz10M9aDBxgZriB12a2lWWA6r5kdyWBN2cYqDgfjHY6NbeSad6CbmQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-29dee60302fso956988a91.1 for ; Wed, 27 Mar 2024 12:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568445; x=1712173245; 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=b/uJsYX5TjTzzmu5D77iSjXX+egw1x7sUXQBSMn9NVQ=; b=ZFTOjJEo4puhIjIb8HbKVzPEGuq9v0PIkET+qdIcVA8d5Aoc11fq+VFzi5p2YPAb3A 856iw5idvrIcrxx1xGZ4B38eO6mpEIPQyux8JbKYlq7eYD2ZkaPOqj1GjyWGDhNLad+e 4HZMpTYm54ZVqlQUeLIM40uq3yl/+JvWJmVaELBYyVLcE2M6JdIS5nQEjnqSpMi9XNzV 0D684DaHZh22rPLPLmUpFhbbZ2t/3ofRLmbGXmJ9D8uPs7W03lRw3CWG5aD5dxnWkqDY a2iBti1Hq1P0z5i2cR4ZAbMYX56P0jf4rR79mVstyC5AXFUcSCpU5QDHSA3+FXO4DMOz Zd7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568445; x=1712173245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b/uJsYX5TjTzzmu5D77iSjXX+egw1x7sUXQBSMn9NVQ=; b=FOeNUGGAyFx6RwklDmLoTKFWOvnAJp9vh+zbEP5MteQ/gx9lqat3DutUW+ekNRhUzd Debd9Yexbj5EZ/ITc0xNZdHKhXe04q7iznZ1DmnTzBAQfPLB58ghNmXRdTK3MKd0Vsrr ZEQGI5+70HCNw4F+oFJj1UDVrbqB9izRt2LOB5oT73sWp4WwdCxlT652JAaKAE9YrrjF eNfz4AftIdREVTurrABfhC6ET8e7KTd3dSxM62tCOvTW/nVgEUkIc4SLEuk/9bLiT02B zgxJ2TKm2EiKN7Ca2dIUoHru68i+eoxuPk3EJ/kT3CcCDohK8UyBnD+GnTmwUl1sqlry JyRw== X-Gm-Message-State: AOJu0YwkGyvV/y98liSL3DT3RvVk+45vDvxAXiHCBQOt/pWsMJaJ8ISI ZD0beiTe2NIxTFdKltB2ZZFZjCnrtYp9Redf5CzEV3buaz22i3mE6pha+Ip1+JeVac7WeA4Xecf d X-Received: by 2002:a17:90a:990e:b0:2a0:4ef8:182a with SMTP id b14-20020a17090a990e00b002a04ef8182amr278626pjp.21.1711568444717; Wed, 27 Mar 2024 12:40:44 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:44 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 07/10] math: Fix isnanf128 static build Date: Wed, 27 Mar 2024 16:40:21 -0300 Message-Id: <20240327194024.1409677-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 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 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 Some static implementation of float128 routines might call __isnanf128, which is not provided by the static object. Checked on x86_64-linux-gnu. --- math/Makefile | 1 + sysdeps/ieee754/float128/float128_private.h | 2 +- sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/math/Makefile b/math/Makefile index f1d210797d..516fa72a26 100644 --- a/math/Makefile +++ b/math/Makefile @@ -372,6 +372,7 @@ libm-test-funcs-auto-static = \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ fmod \ + isnan \ # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h index 38a8bdd0fe..672bf3cccf 100644 --- a/sysdeps/ieee754/float128/float128_private.h +++ b/sysdeps/ieee754/float128/float128_private.h @@ -352,7 +352,7 @@ #define frexpl frexpf128 #define getpayloadl getpayloadf128 #define isinfl isinff128_do_not_use -#define isnanl isnanf128_do_not_use +#define isnanl isnanf128 #define ldexpl ldexpf128 #define llrintl llrintf128 #define llroundl llroundf128 diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c index 59f71533ce..b73a4e80d7 100644 --- a/sysdeps/ieee754/float128/s_isnanf128.c +++ b/sysdeps/ieee754/float128/s_isnanf128.c @@ -11,7 +11,11 @@ #include "../ldbl-128/s_isnanl.c" #if !IS_IN (libm) #include +#ifdef SHARED hidden_ver (__isnanf128_impl, __isnanf128) +#else +strong_alias (__isnanf128_impl, __isnanf128) +#endif _weak_alias (__isnanf128_impl, isnanl) versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34); #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34)) From patchwork Wed Mar 27 19:40:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783156 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375182wrt; Wed, 27 Mar 2024 12:42:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCfNc5wJTKcRzPAXnwp6OKuhY/4Oj/A0MnWFnJHjYh9eNgN1nY+ZNIUMsZu6KgYa0w0RGjB3cKDeCZ5oYy0NJ2 X-Google-Smtp-Source: AGHT+IH7CBSCReOSSRnFy68hsHHVgeXbMbbLpP/dCEoWvo+jAevln9a/UtHF9oRQmwqbB3S0a498 X-Received: by 2002:ae9:e518:0:b0:78a:54d2:e5c3 with SMTP id w24-20020ae9e518000000b0078a54d2e5c3mr584188qkf.59.1711568535771; Wed, 27 Mar 2024 12:42:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568535; cv=pass; d=google.com; s=arc-20160816; b=tjrzOE9a+rKQGHDw0qdkatFbpB1ApRyE5tNdgV/TRtNomn/JXZwMytbp0XkBB6s5sq e0mcqEdzI2HToBHNbzyEmuzmcL5OcOkFF/O0lYwyzGmT8ZJPNh6961TsLDRSomyRHpQf Dbf6FG98jPIFr9nrqSUrZojO6yBqmP7a9yTyXgujDyp+VKPNraSOQCq9JsSTdIvhiERQ fAYsL6DMM6fra4qZKsRFImpIK6wI3NLtTjWExdD2i0ecIoaGwc2P74/clt0lgyCyn4LB vH0bLvvLy5ffRdjRU28xG03VQEtajcpp8M2nHp4zfjvr+hKOrYmQlsf1M1r9QGvM1Avg SrLQ== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=mgzBHY8eIbS5Bsjmn6NMaIRe85fsSw17SEUeNUUQPqk=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=yIHd/HwIMklQuMFYKBWM6VSK/ClPBGr/JwKL7b5N9tUiSb+uL6NOjYewGSwbCQTRto sMn9jn23nkkfwfAowSQAe4a1WWIyHA6t5nLQowqvS/Eq2X21ts4sIhOuAiR3cRz8uxGB TwW3ZYhb9Ls5W2z8L7l2f+51CeEAkebE0Fpz5/LylA45IdU3dpyUGHjIimoUK1/X0cbn kU11Nrn3pulsQL1Ex80QUg7XYa9nEKkvtjayk9+hp90agDYmRihzlWhZQZmyT+K0GcxX 3wsb/KCElKU5stYKeufPSSLDcUpcy0LHER7vT/iyW360zLgAeOVpAKYuKrLBScal8Veg B3dQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KlsQkKHP; 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 da49-20020a05620a363100b0078a51c03fdasi8351045qkb.255.2024.03.27.12.42.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:42:15 -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=KlsQkKHP; 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 5C1F2385E82F for ; Wed, 27 Mar 2024 19:42:15 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 3084A385E037 for ; Wed, 27 Mar 2024 19:40:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3084A385E037 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 3084A385E037 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568451; cv=none; b=B7N4M6lrkQR5au1rtAotXgX6WONeasC3ZLBwzpR6CtWmAPqsBtHj8PVgQ0ZIEGg+AnZx+c8Mj+V+94nzQsDnJ8uGT7Kb3I8OQw6kKiGkPeSar1uwJ1Z1/IYaOO94WeKFL5whbh3n3UH2G+s2P2PE1YfKCqdeHU933oez362zzo0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568451; c=relaxed/simple; bh=wX45uKGaEumacqHgV0XE5fPzRX3klc784/S2m/Ik2O4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=xvYxfyhvAk9tMj4oLQluLQT7PrkrkAeom5a8hXUGjp37Wqd9TueNC9Yz2I9txjLq9CIy7yrteopz30WMg2f18vmpGDBgc0TUM0V7ry6vgS5WQ3JKQcSxOC9VdnnPcwhWXrVK9BnIVfnSeBwAIFWAhx7ii5vZwuspKlidxyfHnI4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-29a8911d11cso195485a91.1 for ; Wed, 27 Mar 2024 12:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568447; x=1712173247; 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=mgzBHY8eIbS5Bsjmn6NMaIRe85fsSw17SEUeNUUQPqk=; b=KlsQkKHP59w9qgd+WmSETmF7Nyoshye0WrkNSnI144qK3X+M3NNBZ/YktlkJDBckG5 GUydthUjNxngoVhkZJb8HEjh1+ZgYUdYyAB6tsgr6ok4peuQPYAgL+TP44aRpTZ+k4g9 AGDURXDHnPyZcOCbvgtzFwdufUfKM5HKoczIleSoeEkw2PiHAYI0OHhJi3cYeFHKeE9X haMe972JULuf3WpwbaLVss9+7ZANMHL8I7Bpgfg0i+p7d7mMWBq+2f0kbJ6Lzu5mR1gr 3fBjs33YQcDy3eJxgQjJClYwdvytk80SlPsFfcLG7gHlJ47CLBjE/xXJCWnC60pZHJLH lSQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568447; x=1712173247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mgzBHY8eIbS5Bsjmn6NMaIRe85fsSw17SEUeNUUQPqk=; b=tTQvDS+DWCIlf8TRvD+51a6yWH2ngH7C5TGC+0uIiBDyI+IQTbALsz0AICrS6IvDmH rLQweW+23Ti5JnHk0RvvRkfvO+TyC3LStetfmeqbY8edL78rjyvWGSruq1KDOrEPfA1C ZCtTGsQCxGCE53MMQ/QpeYulE6+oplo00FGBg+ehHRUkeRSRV+2oJyDUHEbwcm0JkSBR 40SPY+i+avF374OKSAcF2fW/N4/DF3EMige5jzyVoBJ1kgPE6bGn9MKVmceUw97VFrOs KquvH5aA0IJ69D5wcwxnjeFZC5O0EidlRA+D/OiFI07t9IpBvBTW+Z8QDrXrA4azom3x 1OTQ== X-Gm-Message-State: AOJu0Yxf4ydgknyNU3zpskZEBM7sRAVXHckJrwvLa1dtMWCD+Ok9i3ML 24Y86sQNduFSuw3/gpIPRJ4nwOBi/2CtbqU1Az7f7vzLKMsacFVh+W9RBFRrwCMw3u7dF9+sNPF H X-Received: by 2002:a17:90a:7f98:b0:2a0:4008:2ac1 with SMTP id m24-20020a17090a7f9800b002a040082ac1mr679087pjl.26.1711568446801; Wed, 27 Mar 2024 12:40:46 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:46 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 08/10] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:22 -0300 Message-Id: <20240327194024.1409677-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-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_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 Checked with a static build for the affected ABIs. --- math/Makefile | 1 + sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index 516fa72a26..61736159d1 100644 --- a/math/Makefile +++ b/math/Makefile @@ -371,6 +371,7 @@ libm-test-funcs-auto-static = \ exp10 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ + copysign \ fmod \ isnan \ # libm-test-funcs-noauto-static diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c index 11b42d04ba..80137847d3 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c @@ -1,10 +1,10 @@ #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __copysignl, copysignl); #endif From patchwork Wed Mar 27 19:40:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783159 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375457wrt; Wed, 27 Mar 2024 12:43:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyhRxVKExi2hLEE76F2+iot6zrg7maS0lh3iWkbMfukwAOGcdGhWFe5REo8TsgyKArqNf12maJRDdlCeClmg7h X-Google-Smtp-Source: AGHT+IE8xer7CXLDWU0NyTiVqnF+k+hONnhlSAIP31q0x4IlNLAMmup9MdE+UIAqfnb747AMXeSG X-Received: by 2002:a05:6358:341d:b0:17f:5657:8d57 with SMTP id h29-20020a056358341d00b0017f56578d57mr412758rwd.9.1711568585493; Wed, 27 Mar 2024 12:43:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568585; cv=pass; d=google.com; s=arc-20160816; b=pjzVLsC75Ub4NRYTpq8Tr97Z2eVQJKwYSpp/BhkXUyIf29/me83TYqSIOvb9zkl3hx TBgvCUhFU5+l0qSAzVfsPQvHsV9B+72+QBiFaYxhmwYZ8UGpgZ1jjCW5vHB9V0NOjaDT l2XK03mtOzp2GH8MyGLBoMXdj7+4fFlYLMkblfAfy1jlmjTY0ivw4CdRUeZKVf6+QvLl hfqRx6rBrZ042H9xM7kkj2Ea2AjsgzQ8K8GqUhPSMyKOyw9/Ruh7ZedBYQkEXAoWM4lT nWSZd6gSHODMjcfTyu0wBdVCQfZlJIU05BAhnImR9HkPSIXiJwn3WUvyXQpompK8HjjD SOxA== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=arRKjEUA9fLaWUU6cs4FH4l0x0zrMQFWVGEvxXC82/M=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=MO1onIqn0y1lI7uBcuI0/X86FA5CCBrNl8HMp8DdgMEjKk5HG0izlYWV52D5SdsU+R Hzlbpmz+I1HMon4ihuAK8xPcefSnT58jz5n3IzR/DfjGXtXyDdENXnz7L7d1R0TEqpLy 4cvMaOyI1UJDSX42tvTiwqkEujhCudfiZMHOjhO9TCOnBYHDy/5czWeh+FpNcxy/Is56 b2hy0EuyLndjZUMLgKGCJj6K94gQkNFDu/VdS+h7pzQFs79uTcfh7TpEsRS8Xmq4EmcC kEVKXRBJRwS8IQd0wJqBOm7l2kuW6FobuoreDgjD5wyJU3lamQVo4LMboc+xtdSbSAr8 ucuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V0GffipU; 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 nh8-20020a056214390800b00696b010f9b7si1570736qvb.44.2024.03.27.12.43.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:43:05 -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=V0GffipU; 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 1423B385E45F for ; Wed, 27 Mar 2024 19:43:05 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 1AE903858C55 for ; Wed, 27 Mar 2024 19:40:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AE903858C55 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 1AE903858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568452; cv=none; b=GsBg5GQoGsSsBTou1pdPUfPZ8o3Daer8A9nhsKgsm+OvrEJaBOQqav1PeMBCIby9WcHAI+/dL1Nw5KYxitLvQTKw5iFkRkFNYNhk7dxZRCoIbZcdiwjnFl9rwpjFMZ3Qp2biJENwBNExITH7noN/4DnGFAkuv7jksVgWGtOmqgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568452; c=relaxed/simple; bh=zK0STUkqWkMaFV4Mjh7D4y4NBZjYZDhFN7KQsB6A7eI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=oywvRkm6ellQuXoZ0Fut01qv/Rrh8HJraU79cZwX9W2lMYJTeP49j+kmqEsaulFt+rRqVMiqY8ITtJknoYC0zvzWCo4QyCoNDmNRsN2QlqaBl3lN4mMd7CXQG+8a9UKnroQSZAa+F9MTZcJv35feLBGfN5v3yi+yDo8T+looXkc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5c229dabbb6so113146a12.0 for ; Wed, 27 Mar 2024 12:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568449; x=1712173249; 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=arRKjEUA9fLaWUU6cs4FH4l0x0zrMQFWVGEvxXC82/M=; b=V0GffipUvQ0G6Gk3KDnKLqFgVeRLgYMU47l4Jm8Nh6d85Kmd7kz+xw3Mo5A1r2gQ2x F5b0baSIOxwxCNui4uvH3iuGnAz3vn37l6FfDow7P3qh0MozNEVvbn/4yogwillMyJJs vcldIjn4n/12mZsTMlFd1nhK8WtTgIAHO9OAk9af6LaiBoQ0b5MvDDHTbjEn5pHPq6Ju SR05nmj8xh3N0nHNBwGzDUbKJ0SZX27pFVplV0CKX3XcD3ORxA2Wb9FjGOmbeA4gPrZw 1vkhc3OqP2Wl9ArQjANyFUrvl1/+BAzcTQW6U5CqJUK8hGloABVl4p0bgrHxqODBhA6y Prpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568449; x=1712173249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=arRKjEUA9fLaWUU6cs4FH4l0x0zrMQFWVGEvxXC82/M=; b=GzpfG16ZknkkNVlsU5ZwMdDGGZmAU5hmSF+d3sgBCV7tm1blH8huPfwhAo9zBrvct2 G/lGLEvueeq+xh6HUfSFzVFN0XEYZvM3chkDydNv3lUdluhuBWCeDzZ0fpMWGnsH6tT0 twT8rflk3+aWxAgx1wzFqXN44JZlP9/RS6Ws6vYq/jxo2zETPKaQZtd53Bjm1QGcaDQj Vt82Fzwh3oU/rkuq4MbnRoZ+GWSkVxh/jZxFXRfiHT7d+CcTm8wxJKPZHp+axwr4m6rz eFSksFCVQJ8mMrX1J8itzBlrxfIz1VpYxo6MIFoxTqcAAsFWzrc/L+uiwAM3yTz1OqGV MEwQ== X-Gm-Message-State: AOJu0YyHXL9tOUS1ufLal1+XTmf+EtX16n/UosgpzomaTPH+B9cmxiYF n/3me33yvy5RV2WQubC3/PX5tQCKSdoNakpo/fhZxjaNsr3iq3m/mOBJl8/oLnUoTlmRG1kVcMQ L X-Received: by 2002:a17:90a:fa95:b0:29b:b478:b8fd with SMTP id cu21-20020a17090afa9500b0029bb478b8fdmr621625pjb.35.1711568448824; Wed, 27 Mar 2024 12:40:48 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:48 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 09/10] math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:23 -0300 Message-Id: <20240327194024.1409677-10-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-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_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 hecked with a build for the affected ABIs. --- math/Makefile | 1 + sysdeps/ieee754/ldbl-64-128/s_frexpl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index 61736159d1..655f6ed4e3 100644 --- a/math/Makefile +++ b/math/Makefile @@ -373,6 +373,7 @@ libm-test-funcs-auto-static = \ libm-test-funcs-noauto-static = \ copysign \ fmod \ + frexp \ isnan \ # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c index 73ac41e40c..f5f7d349f7 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c @@ -1,10 +1,10 @@ #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __frexpl, frexpl); #endif From patchwork Wed Mar 27 19:40:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783154 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2375032wrt; Wed, 27 Mar 2024 12:41:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL5vGWQ0X5SmQHr3yvui9jsZC1RKRegpYCPfM8SUacOZAJlR2aq4Dnjzny2ywemAAKEB1Vk3MWQaNmIMtuYNDo X-Google-Smtp-Source: AGHT+IHrnMmJ/xic7FyDl8ERmtwEV8FgIxMPMvUoPTSGpRdloWmTw6nbfiYgxNz1O41le/C3sKOc X-Received: by 2002:a05:6214:4c0d:b0:696:72ba:100c with SMTP id qh13-20020a0562144c0d00b0069672ba100cmr521000qvb.45.1711568518977; Wed, 27 Mar 2024 12:41:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711568518; cv=pass; d=google.com; s=arc-20160816; b=CNhWq+6GRd33sxwxha4rULMlkir80HNHcE3gweuJtvRkfTC/Xk2nHihyGocmGe4ItR pZOZSNZarUMs6QMS8P7Hqnj1cWQse2Ar2eMPYFHdHQ29UkkiJHpAF7m62hBbj14/dgxW S4CBMivAcakdxLrnV+uZ7kSH/vhD3sWm7OVwnVtr59fTM5hIjlXhyqIDOxMSRoMBNGTO 5K9QlmatB2Aq44dv/WzeDBMh1qz6Ls9m5DlghRy73cXNNHTOnmQmnes5UFeUXfB99Wz8 /kJFu5W1H41I2S803Voc0cK4CTfWjfNCA0QhG3UiMwblJGkkNu5KE+K9jw8VUQIX1fne uiYQ== 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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=XEBGnvKMJc/FekL1l9x46E5WjtTLo3MX29wvCcbEgeE=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=GZAwPsNVrf6YIN0W3ac/ciKU9raeYyvgBSkEzi1jL8B8IE+14KX0ozckgjuSu14uSN dgqbP3Ufjsu/06kA2ltRwYGJQ/cujHMrvMb8u9JhJE5cZhilPvEXQ7hhDlluyFehBuPY EsjX1iT8TkcINRY1P8YBbRUG6m0x2ZRZ3iWgM59LhLh4b7mgZFjss80TUeLDrQmN5po4 F57zAdJG0cpycnuHGXjgoTot2khVm0vhytScOIXphg3fnCJBFl3rprpGTaSF+RifdAxd 0ANv/7stGlwaJ64rtv1wAMGiO/umM16LsTmxOF9o6TMm94tL2VDh4eSaAYYuG69yXurO H3tw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evRsfxQQ; 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 kj16-20020a056214529000b006968ce8409esi7386671qvb.184.2024.03.27.12.41.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:41:58 -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=evRsfxQQ; 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 99C92385E44F for ; Wed, 27 Mar 2024 19:41:58 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id A1B37385E454 for ; Wed, 27 Mar 2024 19:40:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1B37385E454 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 A1B37385E454 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568457; cv=none; b=opoGgJdcn99IkzkqDULicJPXfIujFpmr82AqfKzmJD/UTcMHRt5EsA07g5zmwigOWze5WZPlZf8Ff7ooUXw0CqUlRQp5jMMiUT0PCJ4YySUh5uYcMbXyw4a/Pn/vWwXJWom/e57eUE7vIAk8Uup7Z/uwk+natZvMP2/5GfqnRms= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568457; c=relaxed/simple; bh=/Xf7aJ0aBDDwls/BEo72jFQHS+OKW6FU016uLRxh+I0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=JH0wAd0RSrxoItWTvaAGiZ2fjdF9UarB5eEtESTyvXOCIIUHK0jatbxBZLP01dZ1cRT5fEHBPXZRLNES46e6ush8znup7ExLIGE/Bta3v6ZDnZAzczvqzSllNM6vPz/BT7FosK34vi//2WH7PK2Dw/MYGN8rtxRcVydTDaDQTYs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6e8f51d0bf0so238257b3a.3 for ; Wed, 27 Mar 2024 12:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568451; x=1712173251; 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=XEBGnvKMJc/FekL1l9x46E5WjtTLo3MX29wvCcbEgeE=; b=evRsfxQQkTuQcm0IyfiwMvKaQS+1GUSAELqJV6cxXY5Qbuz2Y8N9dvekWH1mqNJERB tLD/NFTN0WaUfVM8/+3b8TLIqEyaodaaX5vpF1sO/OoUNZhTMKlowJEi/RFqME8m4+Bi yW2FEhQgWEanuX6q051G0gzXfa8WgUsNnpe+Po+TzcObPOiClenjZv0BEOQDHVjRCzCx 9/abDzuJigDRKCDGhtjuln4ERh4MxeITmIwe1K45qPHMo1U543q7kBp03RmbxLF+Ry94 UD3EWIvpdUQIRkjfT13NB9QCw0VCJ7W5xRpS84BemZNwcKI5GDHAZGpEe2jlwVAE91ul SAcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568451; x=1712173251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEBGnvKMJc/FekL1l9x46E5WjtTLo3MX29wvCcbEgeE=; b=YLUGfCcWlGQR+vssUH/4ZWvTqd+G503EF/82ZefXgctBjWuOWGA37PjjqgdcNwYEy+ RNVlDtZeJgsITQ6XxBL/ORsbtOWBbRUawk12e+kDLkCP+ITYmAnwy74PwPkF7KtPcoCZ R3LnRq5rutvHJXi+EOet28i0mhttTiBdK4L/v74rRJC124hSuDajdHlc259y4BzhpE3a POadZ1z+mpUl65TzdLgRI/+RM778BAnP3ZStEmnZUHyh0Msgf20PK/NbYGQYQPg+dWAT 4jzFL9+iP/2vuXt5ynussClw7PIAM80oPJp6UARD498MZnwpOUbViPyv+GvMeVfxf6W6 uHUQ== X-Gm-Message-State: AOJu0YyfwgO9gIKYCD3tD6S8ShOKTZ4A9+lqEKORX4ElFFxdepXBAxQv 2RbPH27Tz6AQpptXVFQ8uozi2frHn++9978Z//Z3XNAjLIiN10u2aWvgGg7/y04bLov6xET8Qx3 / X-Received: by 2002:a05:6a20:3d88:b0:1a3:56df:c9bc with SMTP id s8-20020a056a203d8800b001a356dfc9bcmr933631pzi.40.1711568450998; Wed, 27 Mar 2024 12:40:50 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:50 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 10/10] math: Provide modf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:24 -0300 Message-Id: <20240327194024.1409677-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-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_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 Checked with a build for the affected ABIs --- math/Makefile | 1 + sysdeps/ieee754/ldbl-64-128/s_modfl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index 655f6ed4e3..af1909d0c7 100644 --- a/math/Makefile +++ b/math/Makefile @@ -375,6 +375,7 @@ libm-test-funcs-noauto-static = \ fmod \ frexp \ isnan \ + modf \ # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c index 7d7aeae111..ba3d31334a 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c @@ -1,10 +1,10 @@ #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __modfl, modfl); #endif