From patchwork Wed Mar 27 16:45:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783133 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2299581wrt; Wed, 27 Mar 2024 09:45:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUy9S2wZ0aqkmtAI+zC6WujC2/7klG6tf+i+BdND+XRepZfbcx0AxWYG0o0YRUtZIivTLcYhxKHlz1+cf1UA8MQ X-Google-Smtp-Source: AGHT+IGbv9k0jZydJ4TBD/lbzhzcEXVbf/jn5YkVXsj6NVlN0+OHxhAbxSAjnuPH1+wNPjcjnQbO X-Received: by 2002:a05:620a:4f0:b0:788:776a:bcfa with SMTP id b16-20020a05620a04f000b00788776abcfamr89440qkh.74.1711557951802; Wed, 27 Mar 2024 09:45:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711557951; cv=pass; d=google.com; s=arc-20160816; b=RcyeW60DMa8dpwa4OPk+wBP5xWXc+elCjakvsyCJR/UMv/zUQFUYk91GtNyoUSDxZI 3QDSxE+oE0sZ0YjEz7DXs7kwuW4O2YpawInS0sTjEJHsI1c5B6Q3oCrVFx7IMTQa23WX qSXy2tivUGJCKzownhJ3VLa1/OcAO83s8yvAn0wOlj3bxQf74+lLngq1BNdBYPNeDWpd 3pillT2bux0CYo75cuHSHSqHQQO+41k0y32D7Jkj5WMLDqH9kVkP4RtnU4R9pNb8SzEu cgzWP25HthOe/KsHQ0S/7iFATz1hZHjHTGkkRuuNtrC1sPuryNZIIZQ3Hb0T06LhkW53 L7UA== 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=0/f8HJ5ku9d5OGQ0T1FbdCu1bPiYCOSzo8xyt/fDkvsXOzZQ3zsWQyV0ENTOvCMbgk dkX8F+DOw7uMoR3b7CHfBY3tG3RWrAEylP653b/tSrcHKeKQEBWusVAd1hVk1BOcuLHN nLSk8KYPoEJlB7I5vyPckiq5XY5oQzV6n75MRHk5WaslJs7PMunSOsgSMxkzP2J75Mb8 cKAKWNhu7pHrfNj2kh3HWSndf51UB2zvpDXLQRr2mKw6sBkJpTC7kXlqN2ZEbnUZl3rs mDV+gmRUhKHN8r+/WKTvPsX6+xPDs6BvHCNnPEf2JqRjWe+XPzHdON3GyBocPodgh/7B FR3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UhQSFryw; 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 ow24-20020a05620a821800b00789dc60c293si10153290qkn.708.2024.03.27.09.45.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45: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=UhQSFryw; 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 6C388385DC1D for ; Wed, 27 Mar 2024 16:45:51 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 0EAC63858C98 for ; Wed, 27 Mar 2024 16:45:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0EAC63858C98 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 0EAC63858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557939; cv=none; b=gRMbtXnwvvePhdV+b5NCWuWHw3wmZwfzVQtTD3CUy/ojotsE2zW2OcV6nUWDL3MddQVpRdSzI+u/u1qsdXW6vM0mT8Gz+pz+Uv2WhrWO2wVZTQid5U47rn5nsKwVfIoyhVvkG9HlL+I9pXHea6mVT3OxHOcVIixlsUh72ftulBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557939; c=relaxed/simple; bh=TmwJdU86itK5iLqvFT7K3Lwmv+jwRtk0S1NFuax1vdY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ZKYYZs2fIvuU8R48TRAIKupU7sIb95jRvcjchUUW0pox+KAb/U20RmWPCC5aVI3jFYyy3GFC8tky/9SglTmTEO/kWKNybFv/C9EHKeKYnLpqcdxwI+223RDXh5MpeGE+JyxEfpyAGshlWxMfkmz5NNTTQMYBfhG44oobkcIUu2Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1df01161b39so183525ad.3 for ; Wed, 27 Mar 2024 09:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557935; x=1712162735; 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=UhQSFrywfaN1rYBPPVNjDTWWwg23sI4mzZAURGhVin1BWRvEnBmDPJNa+CMkBYtIZy EL3AiORIkDatXcdZk3zKNV4dCFTNVAqJz3ThVrYR3OtwHiKU7aO7yjndk17yP60qNVI8 s6Uj/YvbKY429OMAI/p/Eog0RROcoMvvrXuSebom4ILhipe8r8XdtdTwACcRZNgcZnoT SWh8ElKnAUsmQ/FpTWKX6dYju9WzXLmlaZ5uU/J8luKkS0gHKKsjOVkQZkM5EAqbQGCB 7ZgO5MD40sYpIm9dvlX8HZx+8j/KNWT2waVvEaLwTYHYXQrq86fkOrbWvUkFDJq2RtFw 4YUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557935; x=1712162735; 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=egAfKxsjqrX6WWvNqty43nSJ3HfXsm7xa8BLumnaF1hgTIb1fSou/ny0hu7eQoJQc/ uHIcT6Snr9FoUBnBL+kNDZLYHvhm/fFwSL2BMhnIk+hcfO7PSIMpoc1vnHwUNdCET05Q nKaj9ZrSANEr2BdtAk0ySpBXLQtr52YeyDGucW40JU+LSn+YtB4Ss9tqGxS3wy4kjW3T vVRZb3wTnZlDLJYzA4b+4vXg2S1Xy/W9gBLHvyavZQydBjleWV/pwaMLhn48e1077CBL XCe3aZ5D3+BFQYcpU1JZqZGwb4tW6lyNqq7AoVRL7sts2b0yWjumMaCwOh30AB6LVzhH 8aSw== X-Gm-Message-State: AOJu0Yy2pO8MehvbzrUsGJ0kTHey7cLmhoCDczLFeLiWydtAdFEfgnIQ pKGHKk311AjHaPcp/z7C4jFuL9QP1H/oo6ZuWFmmavplRBA5IlR2O9vjpJ5id9SrhNdHOz2YcEV g X-Received: by 2002:a17:902:d58f:b0:1de:faa5:552 with SMTP id k15-20020a170902d58f00b001defaa50552mr184641plh.56.1711557934903; Wed, 27 Mar 2024 09:45:34 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:34 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 01/15] math: Add support for auto static math tests Date: Wed, 27 Mar 2024 13:45:13 -0300 Message-Id: <20240327164527.3717523-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 16:45:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783136 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300065wrt; Wed, 27 Mar 2024 09:46:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTC9L0RdTibzQsjgkeZnF3N37xA9BqIz3eTQeQbuAjyAm0B8gLWPB+BIpu/GoAr9b/Yf69YO/D/WXdjBct+DdY X-Google-Smtp-Source: AGHT+IEME5xIbWL+QS5t5TaAnQjy+ChAoxtEl3V3ydOMp1HyedzLqfH1gYTkHoC07UcnBg31E6LE X-Received: by 2002:a37:e217:0:b0:788:7299:e79a with SMTP id g23-20020a37e217000000b007887299e79amr130376qki.28.1711558017991; Wed, 27 Mar 2024 09:46:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558017; cv=pass; d=google.com; s=arc-20160816; b=iA6iGrBeLk3MjOgHxTnD0VNDJdB42AdUapGq/JJO6QZN8jvI16G3hmh2wPn9JVMA68 LvxgonYh4B6AeI2CSK5Zi1Dx+ljA6ddPKLDDkDxxZaDKp+903E037I6Lcdmu2By7IrZB 7cHDb7oUqIS6j8oKEXMHv+ej9Mp2L499GfyMPDGabGZ223ncDSMY94jIctfYt6a7ujg0 866NGxOJqTwWI9DXC8cL1l8u4qmxendUP0SRNjtjPpOSTlxU36T2/dZVFkmTewnnbr2V d3c+DR4kXSzxHeqJBdSX3T7etjYsL2kmiKdgAFCKmGeymIJgaXWDR8k0N/72Xc+D6liD HUEw== 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=vgAxGMye5YhqfBAzUUiBbz7lEdnHp7qBvl3CINucYc71qo4ozKPfkQSnppsi/SzSnq qmGKUSs3HlMipbb3V619UEkOzVqcLmRxR7W2SBNw5r/lQlQIaHwiN6+XEeQ4oGq0NyPj es6g5dudkSQJs+shceUu6PdIffLJZnC8tUsIjp+vwtetXlF88SJJ9GZOorf9PkAfBfwA amkb0+tAXwsWK0O22nxWXuxd9S/OZE8ed3UcToiNfGUJUD/VEOsjIP2hpHYdgZaO+9T8 Z7Ry01YKS+aHmEohlQAyXyXYuD86zhDsiteiI2NepZPmpHZxbjL5uOAoS8hD/cdjCtwE q7tg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+QGS+wq; 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 pc39-20020a05620a842700b0078a078f100csi10189030qkn.333.2024.03.27.09.46.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:57 -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=G+QGS+wq; 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 9EB4B385E446 for ; Wed, 27 Mar 2024 16:46:57 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id B96413858C36 for ; Wed, 27 Mar 2024 16:45:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B96413858C36 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 B96413858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557940; cv=none; b=eTwwis9yVzhoUXoo5HPepNqwTQHBgoNpFkwYQtsfxfA2/9OyqQ08ACb4dDpgrY/Uy9h1UXEyUjpHHCejhqhvsGz41Wkvdb4JqOaX/dFVbI7ShUriAxLWMVVuBNfLGN7JpRCNvhFQ3ZbvSCqLANTg6zPdHLV4tXJhGb5xWFH41gU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557940; c=relaxed/simple; bh=4aR3m2SjWqChSXYKCt63Vv0Bjg6RMaEe6T3zRnV9swU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=X11Wqn0Qc/2kkaZi1BJbAK43ItJoBegJGIvumjJOBuEhmR0OXlWSAqfU45F/Jc3xA7ZCHlKyWmwvuIwTsDJULXB3cwxJYhGA78ArL74cCTvfQd5n6d+mNIqFhIOm18xKgqyYG6FIgQ2SwF37HVwXYyPXTu3wJ8rVyty84KJdYSE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1df01161b39so183865ad.3 for ; Wed, 27 Mar 2024 09:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557937; x=1712162737; 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=G+QGS+wqM4Waw5uQXeOZK977hREhvems3Ifzh+b//aL9w/l3NRqey+f90/dB05pFof /OMvj2VAT+qSFSYlLDWU6o4jdYm8abP/SRhK2p78FgL0AtbNkwyyk0dTk8SydcFW5hBM ozjb4wrPqJANc9TDvhfQEqUNkWzAi6B/+9T38Pl494n3nuCaAnQvwLiO7CzXxWmNaSs4 tbAKcaS3FD/8eI7RZaQvqGKiyRBZWVj3hXhjHH032wTDAr88FZlDU9HGI5KGF9iKJESR dWU4zg81zI/7VLh+/3XdTRGU4MbzNf2xzspI5JB2C1SGDAOZ9mgQVrmJdKbIdiKOzkqc 2iFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557937; x=1712162737; 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=LcBTWtp3z+tYfm0Le83w/Lsi7AD83HNfFLSvLB9Utr9PkdvHaUFolxTYYiC9T5Fg45 M2QYoxGKJcrIxDs1xsvd7gjnQJwa//FsbhkUFxe+2l/uf9Vg3KO2/FYaTkxw+o++2K0D 5oJ/35hKvUJ/RTiX78XFJPBzMvG9zP0sd1gs87/oGweAovuwF1GqgXi1PFVoyRJBAPvO bmo1BTRL2ytJgu8t7Ax2z/CfU58u4vrH/KLxqzDH5q4S9l9RzUiHNUuEWRSa428JykT3 0pd83e80OLxH4dbKl5UZRllfZ2B54Mm02SelTJH/qFTKZlVG4fLuaCW7wX9bCLCuYiTP brgQ== X-Gm-Message-State: AOJu0Yys7Jm3UgK0ilh9zGytGSekpOu0VXlDMbS4xL9AfjV4tvy0IwvR /FjTXtes17NTmDoPSVbJwvFRg+XA5Ws741yxSVNlgJwgokkMsao4rCtQI3r1rz183nBSijQv2PT k X-Received: by 2002:a17:902:f54a:b0:1e0:fc73:8f81 with SMTP id h10-20020a170902f54a00b001e0fc738f81mr282804plf.64.1711557936997; Wed, 27 Mar 2024 09:45:36 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:36 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 02/15] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Wed, 27 Mar 2024 13:45:14 -0300 Message-Id: <20240327164527.3717523-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 16:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783140 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300451wrt; Wed, 27 Mar 2024 09:47:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8Fal6NmVYiX1JQX+jyEm69Jk4uqtcA6LIBsRahYdrUAOEfzRCIJB4I5L1AwVkInclWf0t6k6J+5DHWbTOJPIn X-Google-Smtp-Source: AGHT+IE3C762IczLSdTAJD8jrfVtBiNmfyBEPp8IxieTUmGv/pYzv5O4X4NqdRYEw9qe24Vyfhpy X-Received: by 2002:a05:620a:37a0:b0:789:ee7a:154a with SMTP id pi32-20020a05620a37a000b00789ee7a154amr148844qkn.3.1711558069696; Wed, 27 Mar 2024 09:47:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558069; cv=pass; d=google.com; s=arc-20160816; b=rE5ph2HRpOn3uSttLRlRultDwe+ikjQCNLec7HFCMJNIJiR9KOh/0ipYjxGRm1NypK kYDpjA4eFp6zjajLS8kcZhlw9PVcSTQoe+kJ6enaLKejPCeg1ZurTHjJG5rL6TxeWQZ8 Xns+FbsPVTy8T099ANVTv0NfZEUgoPbu1w7psEfsu7mXcWLhw4My7K7LSDeKo4ZGsbTR xwjBSHn2wEbk996Y3AkCzN/nEJ+O9m2vS6VP6Z+3mCk9wNkJr7MJrH7RLKHzZQg78AbX XRX0zr/xCJtoSZ7YYG3MvQtbjnAKNU7u9YOfTMpXa0tGKS6bUiMBmoyv15y7vHCIDCh3 MgDA== 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=lm35N2bVgqE+FsZ5b/qUOqnnu8xWnTjAoCYTPCc7MCuFhxSQloPx+reOdFKARsUVEM pySTog+z+hPgzutv8RDU5c1J/0k3wRR/j09b54+APuN00+yhD1lHbTI/bR1Ydr2gVLN/ 0Y0JO26LwHW9IPN81BffqTI9zvGsAWMSNZexGtXWHEgR1iFMtfb+SIlHRB9GfhIhnrH3 xoslBYCjJ22wQdgEznVUDfv+U9HYP1RwV6O2HtCLmOIasbICxTGG1CwGr1TvF582Ra5X dUOjRVu09ghJM3bXKsuRzEhy0wvqc46NHMK3Te8pnHrKSeXbyuUm0yKRkLA8j3EUYgfp k2AQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="T/ag9lzp"; 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 c17-20020a05620a201100b00789d40d2417si9994730qka.1.2024.03.27.09.47.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:47:49 -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="T/ag9lzp"; 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 54B35385E833 for ; Wed, 27 Mar 2024 16:47:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 9E4973858C31 for ; Wed, 27 Mar 2024 16:45:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E4973858C31 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 9E4973858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557942; cv=none; b=EOITG7JpkPHkXnuna3s4prxcAL2328tlauiJCuA1sttRsf89fKJ7CLwJ7MeQtvdgmI4AJna9oQNE0OWVNMDcqytKIdgFH25RxJdb9Ar8V5Y4QSfefiBiZNam1AtBT4RDwEnRIf8X5aqAYFdQfPBCHQ7BALLVhG13D77NEm+0owc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557942; c=relaxed/simple; bh=FWgJkfkwseYq7F5C+DGVquhkJLx5vPNk1M7TtjMJhC8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=bfba0OnOFDFmfORSg32SLmynu077EYRyK07WlSKVgQspDZqzWN4yMNS3eVP6hmoLeiv5IA2LGlbICT5NgD41ytzxyYp4VkOk+80oyp1QKkKCiSu21Fr6Ky9PZb7QQzz1rN/m9sQXjRrkXQdsAd7FbBuZZUXnalO1WXluMbWVNtw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1e00d1e13a2so348705ad.0 for ; Wed, 27 Mar 2024 09:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557939; x=1712162739; 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=T/ag9lzp8BhYPPqYv/Et32+F3/qXuC51KQfFyy/ncxb1jo5WDaJNIpJMrF5P2ZdkMZ B0hdRKoy0nuvJfMqKO7jhavlEfzC2as9G626geU2B5Rv5mI/4J3FCXLo58qgCney2Vqj uPbYNDLPbM790CVtbCaC7rC8SypZ+U/F69QXaOlclhO3vSxaaiAD1dCz6vOn9q0Jwd00 7NTJKHe5JaC34eT73FCuc9ReO7OLNOQXgcIUGIxyZxYGO9pQx4ybC4VnLCabbgYh+LOl G5zJiu9oLWhneAOH0DUqyFrIQvUcRHZIkS77PZcqOuw6L8VDZScCrmY14T/NDYaBbCtY zzUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557939; x=1712162739; 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=rvBOXVw5+IZcgfl3qKtmefG5rDXWP394IB9xngjMuLS+2Ia6ZFZA7lsstMQlMgXMA6 4Pq2TxRObnYFhkYDhkyUmHaqtkaqQDxtAZShoCVTTH9+dwdL9wr70HEK+9DXSlcON6Tg nQsxyJqwR3apxrT88GJA9THtnpXntSJL8CVkE7b1F1I7jLXPqskvTNs2BwO3EWYaZfFV UWn6FF6dosgzEdvSv16CtGsF04wLWXb3W2+E3OKPRrvSX9j+SDLwCEQ6HgxG4McG/a4M ILAp31fk0j9JcqpjIz9DIVw1HWjX4USQK9Rt3g6Xvg0hFkz/4EqhbIe+hJwFgsyqYX2B gT8g== X-Gm-Message-State: AOJu0Yzl1ydRWECiSc2+tuU04ZzDud88vUH5SfQl81VGvnryo7pqD+o0 1DWbX6qDuNFGkr94p76LqkybXzU7Qwqecy6otxJBn+Yo26WX5FbblOU2JHI+MybKp7QY+YZ0x/F o X-Received: by 2002:a17:902:fc4c:b0:1e0:f6de:afae with SMTP id me12-20020a170902fc4c00b001e0f6deafaemr243936plb.57.1711557939104; Wed, 27 Mar 2024 09:45:39 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:38 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 03/15] i386: Use generic fmod Date: Wed, 27 Mar 2024 13:45:15 -0300 Message-Id: <20240327164527.3717523-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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, 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 16:45:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783143 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300850wrt; Wed, 27 Mar 2024 09:48:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXwuCJYTbCFPxdK8igy5ZKRS1B8zyHFyYOD/fDdccBrngIhqj5YKSK4vV8irYuqzozCTMU1oGiR55X770bo1bx2 X-Google-Smtp-Source: AGHT+IFbwh64oY2VFp0uswnRAHhGQNNIWYSrUfmosBM4KnmLT3mjotujbR7lmwOHvwqXFZGBiq5c X-Received: by 2002:a05:6830:1350:b0:6e6:e52e:a856 with SMTP id r16-20020a056830135000b006e6e52ea856mr367036otq.14.1711558124694; Wed, 27 Mar 2024 09:48:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558124; cv=pass; d=google.com; s=arc-20160816; b=Jzk9scohVoce1q4GSsdlm3SbMZQLTqjo3uH/do+Vm7qXCs5rwD8FF1PkvSjtbcf7rH HU9uFvGygCB5O0LoWALp90i4rM9SACktko/7+c9wU1RN1t15PeiydAPMsVfhLY7oCacx DzqHA8geveG4Jpikd1IgML3u0SFHjVTBk1jmn2RxNnmSKC2tA7Hs/UHTn0xF6RoCepm1 T2ey7wIaJa839zEZkig1bSezRLmJc+sdzo/qkxXULIXR86vjo/FE05geTR727M/bTlGp aryob/BToG4pBKKMEubl9pA6nHUsTIkf1Xc13TNKUA0TVYCw+jaWsrublje6UlEXdEPc qTWw== 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=mM2V4I+pb1Hl4ajSSsu629MGJhjCMLdk79FGgG+5tEwn3F4Gp2voWkb7xG5fyz+vDc a2toNJRcnXvHcMjIfq21jkKGEYPpjtGM1VTeW8ZMdYm2MZPqWbp1yq1Dybb0obT1VTWX hHyBC4CDIuXA1RLzduw0MBFRb4g25cHwvZvn2Bc5O7gSIkhnLBVWpXfKQsZL17SpUzEJ 9gSAZ1DvPaDzIx1ZV3EJ9fe2hdkAWrI6ubqn2yjsuGK1EPWydj7GxvwS+ussdCTy6pUz EJpAw6H1XqcEuDx3xwdXEkCFs2NtpRpMC5iLr+vVy/AIcJzgAYGPXtTqdrEsNro7yAbq OraQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AhAZ6ucF; 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 h16-20020a05620a21d000b0078a5f289feasi4740291qka.419.2024.03.27.09.48.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:48:44 -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=AhAZ6ucF; 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 52CA73858407 for ; Wed, 27 Mar 2024 16:48:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id D601B385C6EE for ; Wed, 27 Mar 2024 16:45:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D601B385C6EE 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 D601B385C6EE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557946; cv=none; b=OK09+k54KIA98+OUch1QEqRiBTNn1Uce3zEuZDvPBb8mAmqOuf15eou4mY7ZFZ+Zsie82clqBiMa0ssGGt6yYntLP6L3rorrEMyrTILIyEK2z+Hkvl8fZ5OiTApMkINVP/laHxIbc3Dxr21J5gnzs7AFfu8nDrbfmf9daXny42Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557946; c=relaxed/simple; bh=Lj4xaog2tdjPc2qDBaWYQmFkmaPXpB5xrXtcNLqjTv8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=q2fOEiOSD0UpCQs12XKsyYKcA9KiP6O3lfYSnhN/xD0iTKqRGW0BPfnYNjONQRBNTqw+AVvwT12YDXmWoHhiZB7UorJXgdoPm+2RU2RuLcxOgNmr+o8Yi73VGiGNjbOtqvoy23TMgKTIvfVWIC7zTeELY0jBcxNM/ByCTD42COA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1de0f92e649so405795ad.0 for ; Wed, 27 Mar 2024 09:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557941; x=1712162741; 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=AhAZ6ucFJhM2cZGT2ZcQX6r0k0aPCSCa1r2yOKUL8mlWOnvm9rG+j30JWUBwte/tDv Ufn00gfKB9NTVU/2ACQaEkCkhyIVVdHCkKhtWGg3aNDcbtzY6ZlQXOTu5L7orKQcAUDp +snT95aCqSQxNsCU0TTirG2sQkb2PTuVe9KFSibbXDpo5mCjU2BuRk9rUwPZyIChM486 Bk/C+Ugbb6VtM04kY7y0D4Ox8Ij7XYpQgE3NaquhTG6HPdTGgO8k4dlZ+oh1rai3Xu75 yR2D+KNgCLUzmPYmyWpNL4LIjS+bka+lXYx/fbWnd/hyhcN8/xOP5eCWJmh562BMMPKL V0jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557941; x=1712162741; 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=F8pOvOHsLfr/kcjFWi/x+ZNLX8OPqT3k2//pWVHJz0ueXoEJAWU3+wNXzmwC/sHjRk tR7EaQT1XdED56oP5sR+fm9hd6+4SG510BEBp3RgWEcf91O0/2/jcqolEgBIz4S0zEQJ /MDOMWX32Kr2/5q3u9S1QfPsqry+8+BG7xGQISsACaF4WQAeT3xM+qCtB0s+lij332Oz FQSYGS9/v/IWqr6TfVH5LDBMs25Q8zDGZvQBsybv7gTH4+hBI5Mj8BrDV+jQxEEwrxYG wFN1PBCe5nmGtM1ZuFdpU8X7BpRQb4LyVPiuJtx5rinBYaNRA/Qi0AsFcNChNQVQowig 5G8g== X-Gm-Message-State: AOJu0YzYCx9W51pO5w6NGPtFOdiAKuaA55ltD27qPQvl3Zx5hAmRmjwf NDTZhxICbvI0X3w+214dtFgM24HLwXQEbU2toW/Wi7JxTHSgY3UVFB2vcfz3THMM+INH2MSn1rf A X-Received: by 2002:a17:903:18f:b0:1e0:94a1:95c1 with SMTP id z15-20020a170903018f00b001e094a195c1mr318110plg.29.1711557941213; Wed, 27 Mar 2024 09:45:41 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:40 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 04/15] i386: Use generic fmodf Date: Wed, 27 Mar 2024 13:45:16 -0300 Message-Id: <20240327164527.3717523-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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 16:45:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783137 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300112wrt; Wed, 27 Mar 2024 09:47:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHJPxN8eX6odmCbBNMLltjtWapUbRi8r3j/ySFxWEIYKWbmKwCOUvn2c29ckyF7/R3fF3sR6na/B8eRKNLWjY/ X-Google-Smtp-Source: AGHT+IF6WmKXZmIc1w5ELM36cXKsV6cqUOzn0YsQEFRfs7XL6J+bvU00uIwoo3VzAl6YqRz61Vxe X-Received: by 2002:ad4:544c:0:b0:696:8505:1944 with SMTP id h12-20020ad4544c000000b0069685051944mr73946qvt.29.1711558023702; Wed, 27 Mar 2024 09:47:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558023; cv=pass; d=google.com; s=arc-20160816; b=s02/uncMycHpYTaLtlNNaPnP1bzT4dqU/y8N46+KZ1X6NeafAoL5DVqNtRbsf4l1Ku 7PchHUoQDs5kdAhWNn3bvECA/g9B9guQqL995ty8COS/7RmoDUkpa3P5nE2ipEsIji9Q 8uB6bpn3uWa+PDi5BydDq7UPXQWYgXFGhDqx+cUrHqudWOfkKsyx5VdU9trLAat6phst AqE8FuIonLtKOeJAcCBd+G+OOT1Iu8QUDG/K67OLppGVATr9JmoRWwKcnfPdREJ4wI2m 1WfJ7x3ccaqDp6OJ3/S5uvzjBBFnQt5U/wn8TMcgRp07V9/SqeAY0Z53evE4DTw4pzf6 FKTg== 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=yrXbLbVAdweLXfOZTwkVG5rjdwUPsbDUWyr1WfSvlbpna0Rg9tdybrD7EKGoj8Ze0D 6kqTmpoDTPw/N+SOnWkbGKv4DNLJVDqgGh1D6dj8rF7X6we8P8ciSPqMlXbZ6aPsQULU DWknL4yvsPXMJ8DNTZ1vgNTVS8yN0zAy+Qw+JeErxQCsCIWSg521M5qhNOKy3AhMBhX8 +pk0MeehCGDK4uhqeKsmuMoVh4vG+rrKtbdEFjW6PqULrfNcDnlKVlGv+uJfAZjs54WQ zhHD7pW8z/XXDxcLCQpJgr7YwP6Z5736TfzAjK/nH4KwJrbwWUQuxkWXi1Q2/0wrlTLk SX8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eoggeu2p; 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 k14-20020ad45bee000000b00696b0e4b287si1064012qvc.477.2024.03.27.09.47.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:47:03 -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=eoggeu2p; 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 3775E385843B for ; Wed, 27 Mar 2024 16:47:03 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id ADD41385DC06 for ; Wed, 27 Mar 2024 16:45:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADD41385DC06 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 ADD41385DC06 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557947; cv=none; b=vYt8G43EPQTEuKXz/o7AlbQabfGtE0s3Yv15XEpRoV4ihve4+PVbzkJhuJzquokeqaT+xejPI9s1FVEtyaiUV1l2XifNdKT8PHMB2NsC+6NVk8Sn3K6onUTjoHYIv4KZSZlDoNE27bI7EIl9YQQVNBe8Yu5Gufk7jesiepnWruo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557947; c=relaxed/simple; bh=wHbvmdicYImSDZMFciUEE4a81Gu6In5X3H4kMS5X25o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=A343zw8oKPZScG4VA72PisO7LK3oVMNv+JN880Zgrmkvb9GhWggIDZZjIKIMRblKmxeuZGQjIHu5ws/KMozWt5QKnSF0aoiZA4kT4F+s9nCXxcG91R5GmbVmE8Q/x5kfSuhKEy7lfqNOOXjLNgwUN8y8Rk6XGFzXh3YFphQ3A9Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1e0f0398553so219435ad.3 for ; Wed, 27 Mar 2024 09:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557943; x=1712162743; 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=eoggeu2pajrwq6XsMiZTIqfjXbqlbNWI3Ku3COc9xFVprjc6iHcXxoMXINMChRMPhH PFIfSCwyjP7KhKIFdWwzciLwxMk//tcv5yqutLp1dHYPjNyuyzmcD/KYFqLpTi4FXn5G Y8kj5ySHonOT7Txn9Noq17M49ti3ivp9t7L75eVkMUnY3lX3w11nRkmhUcIvv+RxMV0w yQDShGb3HHdBaxCk7oqXSxV1xRxs25ytv9wvMs14Eh4qLeNztyZUqvjMVK3xhCl+bSTy ybh4Yz6sbsTkLg7NQDw114yqHdVPRi/D3clDU1ciUrR5kZttaMQtEJztayldRSusU0fo 4/Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557943; x=1712162743; 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=gcg08ZILpvYV4h44MU5CXByx0zGrimA0okLJ7di0qVQ4Oz/gLJoCYBVKFZaLKytSMJ Pts6sMiSkRNDi8DigY3YVX0OGp00WxdybSFM1wRNUhSO1xUVBhPN0NP8zrZKttEQvEnK wl9SfPn9J0QUtdBLUIKTC7g0KwpIAfJE/zUJxFW8uYW7OZaXXeCubfxT68AkHrvY7QG0 3FeYUNQs14FiJw4fxJJ6EAruNEcOTiFdXx9/QSJYyfTP8s1wTJlfnQd3s0d5nBgmjVk/ uqbViKKlboBkP9Q+SfGLl2+nabc30YqChzsiu8iead6Fhq3jJ8yE4NzR4O26N6tQ89BP LHsw== X-Gm-Message-State: AOJu0Yxpd6ZTeBiUzV5e95aLSWkQ/gNoQNDqtQrXCEwW3wz59x6YVdMh eUJiFDZHZVHIiiXKmOz1EDb1Fx3BQ/0p5hcST0jNfWJE/02wU0511An5N5FIyHN6zk7c1E4nOHN O X-Received: by 2002:a17:903:32c9:b0:1e1:a74:5531 with SMTP id i9-20020a17090332c900b001e10a745531mr293798plr.36.1711557943264; Wed, 27 Mar 2024 09:45:43 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:42 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 05/15] math: Fix i386 and m68k exp10 on static build Date: Wed, 27 Mar 2024 13:45:17 -0300 Message-Id: <20240327164527.3717523-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 16:45:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783134 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2299926wrt; Wed, 27 Mar 2024 09:46:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzXdptetuQNrHcrbA/9iE6JCQZ7o4nimBAFnBGNtXj/kMHt3nNstf7h9vTRlfy9yaERzclWyQrE0mBQ6kTdJIg X-Google-Smtp-Source: AGHT+IH5bxNj/hmdm5i0toaei030eutoBMWd6CPJfQh4IWUW0FPpajGY1auRhzxqQXywLWrjdrnb X-Received: by 2002:a05:6214:5602:b0:696:92f6:2469 with SMTP id mg2-20020a056214560200b0069692f62469mr69449qvb.46.1711557998997; Wed, 27 Mar 2024 09:46:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711557998; cv=pass; d=google.com; s=arc-20160816; b=M9I4c+L/BQ2cUpplkEjkUYM5tIu15UqAm9TiX7sBVggs0XYEpUM2CVJcavOfvybYWZ 4GKABqAeBosQMhjxYnqTkPUl97P6CKkKJ5JCtgmh/NZTeLrKx8ekkGV7bcTLH5rfu0o+ ehApjNaNKFMYOGEVDQXEb68CLcWgzmk2Jd3+pBkulRwZzOQir0fsldc0fvoNTB2cIrqM nIkdI0BoYObfQwaHmZHtgKGuNszUMMsHVDMALxFP9UEi0/OfJu7UMIbQIwyL+4Gt0YqH naC4Hs0h84UJyVGPNbgx8UEC5+0nPwoepH31Y8Q8PBnRhnjwj3XBo+4b3aV/aaux+nRc XsVw== 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=sd+tFdT+XE+oP0bKn5s+sz1M51Z0q/bQUDMhKy2+zyEKCpp8e6ZmJynvSCEKiGXOZv 26tjvnuwHPCHuEDB/oqnKNT5Erqs+ve73kaDc49bQlBtvzQTQn1VP6Jn0zdFUVVZdnG1 sQNDRqAGyTyOz6SDAydfSkk8PMDvAdTFgDX/QfIe746cvVw2vZ/zCakwlnI5AB+yvrIH LizPW7c47INSpns1+4p3AAhlQOPZCur8ZFsI7uqklwSS8+Q0R8M2fcXWoFEsVkE+f2hv o21Rfl1P7GyzQsVLmaiEzwsmQ3VnD1qiG/RwowkiBQ90RzsJgkqyms1qjNJ41WbTDhGD Hb1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OnhXJKtw; 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 jn10-20020ad45dea000000b006968b6c20b5si3063495qvb.356.2024.03.27.09.46.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:38 -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=OnhXJKtw; 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 9AD51385C6EE for ; Wed, 27 Mar 2024 16:46:38 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id ECD233858286 for ; Wed, 27 Mar 2024 16:45:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECD233858286 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 ECD233858286 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557948; cv=none; b=L2Ib919m4Ta+4n8AivKnVa+FFE/dXBMzePFsKCvQ8BE6Fp2qI1dn9T2oopWDxdfTVy4y2r3XkeE9p7H2AReOci/8LRd7bDK5yPsuMMAsnohe9u1e1qhWGcayKr5u3f3y12CG8MwJRi2fpS2GccFAY1ZdQrw0pciAmqNDRjmrAnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557948; c=relaxed/simple; bh=7lsd+JEB6OXhLwzIRmgXKA+7kg76cGxq/9jNxZ2FcCw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=n+xGA3F2U36jvYoHd3CBmDelzss9z1qXXDx9YRmLYUHnuiAaaty3BnlZ+8fgtdAT1D0XYQx3+Qpuw2KcemU/Fyx4RexvJqgGAAFA+dIL4wyTuP8OUvTKecfXKz7XWB4NBIhVjMxiu1dn7p3SR7eRD/I2oYXRmkK92yiNLT6p9v4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1e0d654590bso185675ad.2 for ; Wed, 27 Mar 2024 09:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557945; x=1712162745; 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=OnhXJKtwHFtZdToq/XyABvnPGk06Um84/PqQsJXwRTVtRFLYM2xOST14K3vjAGj6tJ etvMbLvR4suGljKRurTWw5SycLcVxVruV3H5hmzwBMO/Xskfcr4IA/N4Q/rEaGCB0eum tbKLxoyOhBVnVvQ7nQJJ413ZMVJJTsaLzsAHUt0eYdo02E0RU3SDjl29DXdW/hDtazNR Z8WxpRjKmQh69VqEbGff2U0glRPG2Savc8X5vaLLYFk0olyORj9KRzv3G3NRRxRQgUFy V3xZEVS2hNO0ptLrdYq6b+NXR+SKGzqo84lqeHENX6f7i1HhOC6m4pslI5FgmYuzjtet o57w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557945; x=1712162745; 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=iV+PZcO8mBpbXo/yBxoYWCmDrcV8WErWYoCLyJdxMs1mY2tcX/oFOgCeA8WVsoiIUm IRXWe9WndGKgb/N5HplrKMgDo/gPPZt+6FS1jjvRXxsKUo4jaL5nI+GxBvSbBeORnBU1 1o0h6ot1jDytLQmgREnH5WaT/16ACgvUKmWbzzfMACMfG+WDtGBjag+NjdGzrBoHLcoJ SPKibehOWI3DeplpFQnfOWZjS1IOnKB9X2U/S99peOG0qafyKMW9JwD0vdOXWJw6rkYm 695njnkCvy9/W1fVjUZOoW1etk2XcMY9926ZPavMTf9TZp7O7CTOdd0ih1zNG9TWwcbt u7EA== X-Gm-Message-State: AOJu0YxPXN2m/aMhsEbuBaFZjcf2C+7JT+aDYdAacD4U8k1gRpNIwLbb 7muMcIqxL/Os60HOwW6MwRxNSw05AhMqfiK2l01k6LunyyQbYwG32yPhrv9uvkjlg7GqH7QNmxK 1 X-Received: by 2002:a17:902:f786:b0:1e0:8e7:310e with SMTP id q6-20020a170902f78600b001e008e7310emr271141pln.16.1711557945344; Wed, 27 Mar 2024 09:45:45 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:44 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 06/15] i386: Use generic exp10 Date: Wed, 27 Mar 2024 13:45:18 -0300 Message-Id: <20240327164527.3717523-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 16:45:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783135 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2299954wrt; Wed, 27 Mar 2024 09:46:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4xElzP5w8kIzrLsiK+NWdkyChwoccIwPJKKIM45O6sTsUxLIi6+UZwLpMjiKQIPc4Ymv5932eO7cipUWv3O1B X-Google-Smtp-Source: AGHT+IERJl3b2vD5KQ1HP7ILGMR4IXGDbDm4ss+cZctiXL+z6U8K78kk6HdmbJov/5K1uK3KdgWy X-Received: by 2002:a05:6808:1587:b0:3c3:c1a0:c8c0 with SMTP id t7-20020a056808158700b003c3c1a0c8c0mr421979oiw.2.1711558002117; Wed, 27 Mar 2024 09:46:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558002; cv=pass; d=google.com; s=arc-20160816; b=RklugnauxqxZR4RMMid3wv2bUHkQl9k5vFNkuoH2xIvwUHz9SXstjbHdc5rvgscGED dejsK7Tm9DMpyxg8QCA5tq1TdSkNmHViZ7rha7AiNZm2WSA2jLnlE7Lh53+M+i5eRD7U JekQ25qLocm/KJ5LRp152KmAjC/REnDAP2hwh19g1Zg+w7T/2nWBg0SJv0fKQvo8sk2m hKSMqp+qbpozcNWJAoeHmubQHWWkuIJdVOAB7NOZ0WZMBUvM93/jYgrcPLvTSjdtiyYr 8QIK12v5hJszk8vhUOmDCjdIvsej+RpP/9MVhK1gBRZ7mqWv2UIpP5DCboI7KTEmfxGb +e0Q== 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=aXqDlLZgHt2KnFkj7RIwrXgPprb55fvrGiZD0lFxz1piFFSMVja6SvzN1PkKOP310g ww2mPLtFeT58l7pzzVrXLow9fEORgP+7iH7XG9pEEd0AK6uE9WEd2jfxTr4j1iYjwexI 97aBPSgO+2mqCJz9cSEBpVtCZaH1a7IPJtkIsk6pn7d6M9yl7vbwraF6b/Q5+dAjm2lf 88RJoRkHlpABRtmSi+r8ewzWhIPRujbgy2Rl7vrC+Rbl4tUQb7wJO32sCGgLBPwE+Yao 16UQ/frWNobv2/rYac0vooluc5d72bTyTg177AB3K7+eeewHnG1Z1qlcckLZeWdImdHc EgJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NzIy2orz; 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 b20-20020a05622a021400b004314e7da197si7908754qtx.29.2024.03.27.09.46.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:42 -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=NzIy2orz; 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 BE758385EC49 for ; Wed, 27 Mar 2024 16:46:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 2C466385E449 for ; Wed, 27 Mar 2024 16:45:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C466385E449 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 2C466385E449 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557951; cv=none; b=IRcba/t/3YPc1vI1+5eKrlRq9JOvse51XWbCjXsmvUVWRVMz/zhsPL+lPWhecVbYfexUuKYXAcobHEXDioKkQfLSs/VqvTa+DBEfFpcQAanI1sHMVIYTJ6kkgcpV0GVomgdXfWlwNLiq9N/RwwAeNdRrlunpXHFGOxHz45N0E7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557951; c=relaxed/simple; bh=V2QOHmynST+A06BJ1vVs7hRXKEsIYCDGCjaalv4frLA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=QvBS1OP8m8DeIEEwUHXg+llE34eSMaKLJQfeHlq3HqgIRBXnT1WYUMmt0wFSDtQq6/bnXrN9pacrhGk9Uh1OgwKWJ5tjeHVN/2u/kYyXJNZkNsA1/kD86KvBg+r9LzxLC0T/XL7spfRgyJIjlx36EtkLF6E/RlpYYd1cAww1qeM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1e04ac4209eso289315ad.1 for ; Wed, 27 Mar 2024 09:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557947; x=1712162747; 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=NzIy2orztUY6MoK+1ELOiDQg5QBFZ1h4R7q8oU1WvPbdHRC6d4WUPdr3ZAdUoBPabR dXco7n3wm+8Qr0NS0/hcZ2D6jM0p8ywJdNag56jTS1CzN9AMv1NPdoXcmNYmNZvzxE+I euNH9WTPU7zfCrJHHhh41AfMj0Ttw5D7qdewyw6q+DH05qMCa58HYx1P1mjrBVxa6kWO KQ9YeC2Bsf9i6cGX3tb63MkfrN5/SEgVL9wYVhoK5WJ2K1EXVwY2YJLzy68u7iUcQpfu xL5LaTFPEEK+Ph6d7d1QNRUOb0gkUbfrza8++aRBYhIRxQMazLQO9I7ZRfUz1VImAa/a /Pzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557947; x=1712162747; 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=HmWKqB0zjfkLpDpujaPHH32hVmgyukfqTk5g+Bj7g7LGffQhF3UMuQzlePtrAaRo+I gNHHFi9QxyF3Uq1whtr4oHHZcnlP/9p2gVSl2FuMDk4+3iPf04Hz7BvQjIwgMYCW1EVP zGCnr2qxDN80OTvwvU9kIafjzADH0yiLN1W8OO1kAsm8ugK0DpQdnLw5KmhhhUO0+LYU YDlvH9rYbnmzgQvS8cTzINOJssKPSmmlAgdw1TWT6iPwDhJVnsXHQFCwG6369v8W3vt+ AJMEAu1jIvNS4pAjgvCL1ViXxiRXqeBOeZ3tv0lklfb0rTM8cHE0WX5TBVdP57u8Sn6y lq/w== X-Gm-Message-State: AOJu0YytV9yN9nsekQgF8MMVp0Dq1jjH1+QISWTxosuwiqEszunsx2yF OMJYgncBA/q71g4m1VYgDNSr5pcYLbhZZGCWsFHo2C99uvzvyfWXXN34boMSzu6q/5ug/g0WHp3 V X-Received: by 2002:a17:902:ce05:b0:1e0:e1dc:f27 with SMTP id k5-20020a170902ce0500b001e0e1dc0f27mr205423plg.69.1711557947483; Wed, 27 Mar 2024 09:45:47 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:46 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 07/15] math: Fix isnanf128 static build Date: Wed, 27 Mar 2024 13:45:19 -0300 Message-Id: <20240327164527.3717523-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 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 16:45:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783139 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300389wrt; Wed, 27 Mar 2024 09:47:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWInI8krJMbJNw+WXOAfsCpAb622Orrhc22+hnk48p3UOme1uEEuD62MvQZGR3a2wEKXMgI9hE+73KV9dW+63QL X-Google-Smtp-Source: AGHT+IFT7fgII3GEjTKQuB3G9Etv6mps9om+fqCmdNoazzm8VEoEbkJ3kjmSqAZMhfopBF/A4tGQ X-Received: by 2002:a05:620a:44c4:b0:789:eeb7:2273 with SMTP id y4-20020a05620a44c400b00789eeb72273mr96312qkp.49.1711558060858; Wed, 27 Mar 2024 09:47:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558060; cv=pass; d=google.com; s=arc-20160816; b=BX4TIDdg1tTuX8Ktj4VB7P0Q3YZuJ9MjNH2/+QhTk2TGBhnm/fjdTti5jdCtuAqDXN z1fpQqeMTLH6Q+EjjrRtSFBPeRu4SQE2VvCGbVhjmpJz3duenApugouEMWbc1Uj3AgGu mkr8bKxgUo9tEfC/uDb9aoW2rkfgwhiGJRWQFGuxxQpDMsi8koCzfdLrmJ06LMOVP5M9 h/WVo8KgOSjaSko2EkESaSRQNYOfpjFFSZuKLRr9VdtcQWwiVAdOshd54soe8Bwa4AJa 0MGd8uqk0r4FW8WcOhc56akFYdGQl3OnHizSi3ey8ArtCGmz7GSKGSPKrIpBCsQSy8IE Q2vQ== 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=Fe/25dGLIYPntRMdU75PT3HOiqRFtb0qJC18cIks0VyfwLp6c9K7KDpSpSTHsAk8at BXhRsIzEPofZOlh7Hnot6mWv4EBNSDnxQ8QNslJ9owVOTmkCOwWftfTeA3ADr6FWtHs2 rI0xZeLH+0PEZMFG7BVW+mw5/3TtVyCm/+EuBede43N3yv2PFvibzdPuMUzW7VB8NiTL Kx2cyCbl7PSrUJaltKYk4tzEOac8n3a++sOG837eAdzsX/Oi0VjoLd9NewpwjT0GrTg7 15IBq++BWNye+IjG1Gv+t6rWrNonNs3C/WD0sLQ5h/8Bph2ef7mLMfpAPjryBOzRSIEO MFaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sR1dmmOY; 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 m16-20020ae9f210000000b00789f10fc736si3529157qkg.135.2024.03.27.09.47.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:47:40 -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=sR1dmmOY; 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 7CCD9385E82A for ; Wed, 27 Mar 2024 16:47:40 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 3CEDD385843A for ; Wed, 27 Mar 2024 16:45:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3CEDD385843A 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 3CEDD385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557952; cv=none; b=Am88TWYAlKNPffe/MzKN4IvAMlmsFDSXdmLD+efRtxp20tnOyr+RNZ120uqgrzFH7zfih0X23qC5zx/GaHn4+ZWxMnBq4Xv1oIoBlH66LhHESXwtcaBHIuuYJcf6bpoKScBUd/pq0KMGg4rYPdif3m5ij9EWHKjKoCkN9nkhev0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557952; c=relaxed/simple; bh=wX45uKGaEumacqHgV0XE5fPzRX3klc784/S2m/Ik2O4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ngb4UivSSWpJUso6wD7PBexEX99zoe6ej5j9+wzP0vZsBoUthrskKFTI66L6gCl2jX3go80B2UAHClW1myeZWwgl4VymMqM9MUxbUGZ/BuazmS8RmDNRaJfVijwXb0flcUH8y9YtUzrGyCgQz0nSPh4BFk2AmFXRsflGJuVYGHY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1dee5ef2a7bso289675ad.1 for ; Wed, 27 Mar 2024 09:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557949; x=1712162749; 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=sR1dmmOY+X6pPd8qbdV6/ebgq/Np+4WQZWKsQORt7JrgC1CQC2iGGiG14Dd6hXDHjc WhZLXa7zx/rZ0sZ/OC7osljVRFSYkeDO9P8W0ZlcApMnBsSOvdeD4327N949C58uByrl w+AdO2DXASiWY7xZxdxtJpsvEbeLdVCT1KVAyDeRMZtqXS9shT/WoF6P8QQe7Rwmful6 QuLlFadfOflupOZXAgCBfvTciNC0ZDWS3GLvtCmmdYdJMnZ18/atgCZ57xiRZhnEio7k Vpm6aA8KsOInEFatvO3sfZO+uN+Ds9eYkLC3JRvd5bqwikYnW6Y9gCvF2Hj9TrEbk+Wz IR1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557949; x=1712162749; 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=wqkR6qr/Wf3H5mxQVd1B2lZsTee7vLmN2ixAfvjqtPS6luo1b1+2r9KvyijmM45imj upKdJTZQM5BtROq05C8Essf+tEf9c3ez8K8DKCpcQzObgq/e4K1fiUwJu5y0TcOnYovO 44fjmhiq1mNQ7jziQd8V8X9mCZjY3VWhj+SkeEXsGSwtWnzbbMcabFDMKRKQeploonra bzdkIJqIqFUEYm3v3QEDjtc21U9LHUA45aUN42jENRcn3vhQmuCUyUNV4A3tsj3tRkmB 2xPOw2mGVNaf4u/YYwlXSHaKrqgoWSvXqX5kYjg2CKRSHvVoKprXs5omrviO+Z9tzE1t SZwA== X-Gm-Message-State: AOJu0YxcplUSkRykyuaI4k6dTMO09QRY+cZ3Fxmty767tJmE+MwiBW64 3wkvTUyhJCkpZHxJdN7A1aS99V7iNm6osTOOazwp8S1BTfd6vRmSNRfEu8njBQJ+G9kF2qQLjbL U X-Received: by 2002:a17:902:f709:b0:1dd:779d:dd4a with SMTP id h9-20020a170902f70900b001dd779ddd4amr231199plo.63.1711557949621; Wed, 27 Mar 2024 09:45:49 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:49 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 08/15] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 13:45:20 -0300 Message-Id: <20240327164527.3717523-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 16:45:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783144 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2301137wrt; Wed, 27 Mar 2024 09:49:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEBe7GafxxwfwJl/URQHPPJUXfmQYCLQJbeeROOsLIOVTY3/qKq7d0PSvulcvCLp3ytSUDNNJIV+N77Nlt2WW6 X-Google-Smtp-Source: AGHT+IFbPUktT949Rn9QOuL5Y8peCITEOLrTJDndQbmge9RkLAEUMc/wPFko1adVsJYsWUr5dUfC X-Received: by 2002:a05:620a:3797:b0:78a:26a7:624f with SMTP id pi23-20020a05620a379700b0078a26a7624fmr106288qkn.23.1711558171422; Wed, 27 Mar 2024 09:49:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558171; cv=pass; d=google.com; s=arc-20160816; b=ZhomVgPkWC5subZkrhtLISAjtG3VxtkYYenazfSfcPiK5nxIYhU57v94u9hpBjfrvE vhipK8ibi4o1WhGWmG5FpkU9nGINL5qbQ3a/nmqcI4R9b8Vnper4IbUG5knf5DLsNvh5 t3yLmUGQCLHX1gxm3NiMVZ5SjRWxlWYqRpbLZRenC6yvhVtec2DCCYPPPGqIf+CIKsQc DT05fSEwxYm34qabFVBXqm0Xwl+Cf+5NUjBBbCIeREPC2072bvwMiDcQfgS4WT2TXAvN s3cfDAlRonpQG1wmVy2qUt+y9w0IQh7nsRJ+yYHOM+/3NSUQ6zA+dioH4nvaHvEP7DmE Cqpg== 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=BWZ1Y2E0ks8ZfNQd58FAri//oZZIZKE9io+Sb4+phZOJYout56MyJI+dL0D6YzytP4 xRDMYvVgAEG7kTmNbQWdSvvwlFetjSOBFVrM+8WD9ZVE24lAf3CDZmks8rJxAyRL7zBz nj8k2tRJtcxyMM8AFA4BYHDtLrxhqYeBn7VNbmocOZSUZI3HyYwWU6zsjmJ4nFBD58Vn mkmcDmOl5klrnm9FGkqrMHgbS0Xo5nyBd+6tVLdABZYIce81b3ftOgFtN3QEuOoppvkz aGjNL2CZKSvYbHZARQ8U+sYF7WIK+f227jytnWULqLfn7MXqQUeE8xG82p/qVxX92Cte E2Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sjDPC8pg; 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 vu13-20020a05620a560d00b00789f574e5dcsi10290571qkn.638.2024.03.27.09.49.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:49:31 -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=sjDPC8pg; 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 0D61A3858C31 for ; Wed, 27 Mar 2024 16:49:31 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 0B916385E02C for ; Wed, 27 Mar 2024 16:45:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B916385E02C 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 0B916385E02C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557956; cv=none; b=d3PKPokMnk9GvrK77fETFG3zY6aQ8k/XquVVos2jKMyvqK/HZ3vkGR4Ry6hlwg6ofsrlf2g0Sf0poDg9SPgDcWHbwbEiUlNiG7/TxyHU3NOiNB13VbxtImi4DyQoskDowIilJqt0Mk7maB1IT8i2tZBiEZ216NXNWNSrG1uWMTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557956; c=relaxed/simple; bh=zK0STUkqWkMaFV4Mjh7D4y4NBZjYZDhFN7KQsB6A7eI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ndgRHhZe3LOkhjhon5OFKdRqrTaPp7Jjl/bM0E3Lx7eOo56N+IYCRWBJ27tLgeXfJOslJdmrr8+NjTavwK+kQ5/v2nRx8DGz0OpNYnCvaLrsWkzcV4GRDktfXd5VJQqQOIL1o52wvo5mpaEbBk77XTg7j5tiZFHeySp8YtzE5FM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e0f3052145so268785ad.2 for ; Wed, 27 Mar 2024 09:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557951; x=1712162751; 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=sjDPC8pguQiYSYGZPcl6y0ITQQOnnmhxy/KPf1xIPfmNdgH34YT772L4N0tKWCmA9L 2Bzvr+1PR7HKyKODJSYhthKRNLOcbk1J5f5jg7dS6p5+4jtsQC6bxn93Wkz7crjD4OKL cnSs8Kq1nKhs/I+BBAbmD9zyQ8+9EIkYm5ZpS0p/HoLPbOgm3z5I5AtKumCILmksRZYw qRRhYHpNlA71JcZsblUHcDsks2zBN0kVL6iv847B4ebfPEXXJfqFEMVH62JBrJXXtFVN kVob2kPOdG+uESY881IWPTZbLDanlQp/2Yup8Kf9NbroIm+sXRrP14jDlnWiXrgCmGco 7lLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557951; x=1712162751; 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=cNX6+EZcEHc1qcUt2AqJgTcukx0QUIL0rk09NiilzjWfqpFAC1kC6q8q5w+9MK2drz FrLuVNixszl6lAf9qiXgkXS3SGrlQDvXWmwU5fTjbRs6MYHi5lluPlwMbloZCmRv66YQ 26It2dR6ISKZbQWhsrR4FJjuuS/u/t3JFXrzPvJmayscp58t9BcMo3nNCLwAsBf+Aswz hM+1dvFhDoCbz7kSb70hOxWAj1AuKPV+9u8ciQK3Zflujeqjp9Y7jtyCFhzWx7EhRw7K TjKauDaJ+4aH331PNN91K4hAxZ/qV2zmwya6LvI3gu4wXlXLPVaFMkLmGWT5uURLdhb7 uI9g== X-Gm-Message-State: AOJu0Yw28aNBMGfZqH4t2Vq20bHUj/QtZJrLj4C3oYcwjVuDjrwx4lWm smlM4fZP2Df0AV63tZv3xDx/5oCx5bpeQ0OiribcfHyOC7qG8JycSmD9w0/kH2KEv5QO8mBTaUp q X-Received: by 2002:a17:903:32c7:b0:1e0:7bbf:bef4 with SMTP id i7-20020a17090332c700b001e07bbfbef4mr206076plr.41.1711557951725; Wed, 27 Mar 2024 09:45:51 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:51 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 09/15] math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 13:45:21 -0300 Message-Id: <20240327164527.3717523-10-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 16:45:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783141 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300484wrt; Wed, 27 Mar 2024 09:47:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWefw3sw2C915bZTlBfdRqz9EGC17CLe6M4gAf7s1Kz+1ges+OHQGgsf9yKBerf+w3ObypSbXWlpEkHDlXHIHmm X-Google-Smtp-Source: AGHT+IFbKK0t5rqFIc/Z6U5LoyKACIOEv4N+ozf2I/cNXCmpTqhLgwXFCxmQ4zawGcDXw0L/+AUa X-Received: by 2002:ac8:574e:0:b0:431:5152:b41d with SMTP id 14-20020ac8574e000000b004315152b41dmr251348qtx.21.1711558073720; Wed, 27 Mar 2024 09:47:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558073; cv=pass; d=google.com; s=arc-20160816; b=yN8us079ryMVzl6m5p8RtsU0dNzO0fHb8yHCEUkhh/iS6duIZZx0uDXdWueWnkU/AV U8MKnG78IO2Om5tyeVQz4mX8gS8gWPHOsKuvNs+2Aqgp9RJ4Q6iF6IeDeYLLiN8HJsrL lfdWl+ga9CVTdGOnPNIugKqmbC2JQXa1dumv/ekWFb2ORWYpUqpg9mgv6g9/nFBKo6nR mS/Wv6n5px5Frg1xn6OBJegSQeUhDKhWVyRGNSDCB6h+CuJ4tKKEOkSi1XHs2844s2h4 zV9DyOmzxkpC1EA1zb7dDt65eaSEgrWToqOITeFnIKw+RHMjvjMtqjYE3lNONojsRtaF gBYA== 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=KggO2/yVSXaboPFMY/n1yNK4CxVfSIeOVQiwmIqqBz2mo65uWfR1ndaLUnzNzAPdZr 5HexIc8Docm/wpKpBMEo0TX7ih8wCGDgZ9gBJDmHUKa7N/Mr4W4tljO491KoirLcDmuM 8Rf08RaqhMInlL0HddRkCPqA26LTHZvHD0nlK7qulEw903+wqLHi6Ae5taJ+GF08dIBX hP50XgrT3u9VzX+9w1xtJaUmNo5sU/1Smo4B+E2VHUA1TuTHPprB1lTRsR8aq4gP8cT/ iY1w4/zkb4dRaHkXQNyDAtymHiM4LNUdzqF7QlmHNZz1v//ikAYFR5RTYbB+2mTuYCt2 X/eA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZmmKBNXv; 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 k16-20020a05622a03d000b0042f4de7ff23si10413888qtx.274.2024.03.27.09.47.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:47:53 -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=ZmmKBNXv; 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 57B6A385E456 for ; Wed, 27 Mar 2024 16:47:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 5A66D3858427 for ; Wed, 27 Mar 2024 16:45:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A66D3858427 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 5A66D3858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557957; cv=none; b=KgdaChK/zruvFs7pFGn42NB4ieYjRL/ChcttDJh0FYkLFzyLNRgsXYzoB4x83zcDOOiRB8iSVZEAteH7aJhrSlHC0BFE25t97zF5ix0NbiCRW+Gh5UIFWLnbLNy2i3SqLh53NylXgr5GVhtEk/jJgk+FEDm19K8gvx/OAUn7crw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557957; c=relaxed/simple; bh=/Xf7aJ0aBDDwls/BEo72jFQHS+OKW6FU016uLRxh+I0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=JM/G4iJBc66bnj1tFBJI/ne1ETxY+x5cMUvp0WbjgT9OoVAMcWb003iDdluGTSn1hdDZN86mugSdI+4EPPsNz8CCvkRD4Rl7go4p6WhxpHpa11fZSnVgBmHQGW2p+mFXSKcZ17C3Kxwk1i2IYeNbNRGcOTJj90ZoGYO04+JIIMg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1e0f2798b47so397915ad.1 for ; Wed, 27 Mar 2024 09:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557954; x=1712162754; 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=ZmmKBNXv2ypbWUuVqyga+dcdfDDzk+ftCuB61bMi4OvbD6pNyvfzDnaSnaqw9XjP/l /jfvHztW4XY8kBFSebK2Z/2HPIwzNU0qUTpLZ1yrKmJHnaW/QCrfah/Tqd2V/GzzJC9K z/RnO9RUKgWmkFANE61Pt58oUZ7k6vmdyaneIRCHlQASuTo6L0sUQIMXVMHhLGZ+cvbS h7QSB0IUr+ZwGeTnmdrT3gb5e6/9e0raxS1jpVPK+Sb66d3YqgRBsud076b0hgQxHJkD xPzoD39/89AGqS6i8YZ0fNkkdbqqLioRLXgfmk1F8FxT2qs6FqgaU3I844R2+bjp9bAX HZtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557954; x=1712162754; 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=tcqWuZDDiFKExvNp5T9RQrUaMP1WNkoqBFsEdYXxLcXNTUAeW0Vf0t463W6V70O1oA +b/AbiLH1aG16JyshYd+dEW3/q63owD/U1T9XI5LpTghkk5qcpGwYnlosaB+N40uuTO4 Z/s8BKXgSSB8i2g7Y6ijQahwRSPGY4Tcv13E2nmh0JDxHO72emHYePigJFjCy6q1smuo 1yeGMyOUq5lzE3HRtMp1urSy+0qSWCf/VvT7bO9v3Zlz0zBLWtCVplY8nA+bI6xiz3c7 OsjaQ7yD/1MrwL9xyzZebXgIbTpzkJbpSNqtHPQ/vTsocBikAfgwsN/ZCgPnaSDlKB+z uFVQ== X-Gm-Message-State: AOJu0YzV0pUoh/Y6KH+3RMvgvuayOh7NEa72thyDEgL22qZRdO7AQjj5 XiB45Oig2HLnKCZrl9Gxv8lnmLVBy82q7xbAB+xtnDB2VllvHyUROJYk1L2JLMSSnE4LAgoCZzb Y X-Received: by 2002:a17:902:d505:b0:1e0:188c:ad4f with SMTP id b5-20020a170902d50500b001e0188cad4fmr204622plg.26.1711557953790; Wed, 27 Mar 2024 09:45:53 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:53 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 10/15] math: Provide modf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 13:45:22 -0300 Message-Id: <20240327164527.3717523-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 From patchwork Wed Mar 27 16:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783145 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2301424wrt; Wed, 27 Mar 2024 09:50:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXrPEVfxly/teLQvn2d3ZupKaAQkR81B/E9UsKXATQ64clnGbqL8LysjYyPwVQhcwf9ufICc+Bpg5cVzyWHXPge X-Google-Smtp-Source: AGHT+IEE+1OZk3cSKFpYa3hiFtYvVL9qR1ChKc6iuAjwvAdDUICoMv1dBFkiNZfJjQLz5P/CJy6Y X-Received: by 2002:a05:6808:148d:b0:3c3:6500:66f1 with SMTP id e13-20020a056808148d00b003c3650066f1mr694776oiw.43.1711558219592; Wed, 27 Mar 2024 09:50:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558219; cv=pass; d=google.com; s=arc-20160816; b=jfzLU1gWkbuYAY+U0rKQF+ia/vo3+Q6IF36OIlBkw6VVwxodZ0aISbkXyHwygqfQub IQ+AGexDNLK8+1kf9HPWy1ncFI8+8hWDzX833z38nPJjytDDdMG46txaUScxnkmwy4eF KVN9NMVuPIn5ge+EiiX6pegMkLtiy3ZKI/QzU4Fv2KO6VUpi1F62qDpjXonotrMblOUq vOoP+Y3IuoJ/34agxZ/VG9TIS7deKQNnVPfB8u2LNrwHUDVDQmNOsopsyadfUTBtFL/0 V2/gpkph57V7ZTflCZsFzTzsy33vWurt2thEWkbOzzTlqqy93j07wv3+JSMg/C4hjgA9 GYPw== 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=E6meBW8o0nRpvTFaLF8Ch+/RWgMkapQ5IYEczi9JJmo=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=n8CU3kNiUiBUGI0mgE6EVkKlkY9pbEw39np8rl/0k+uPCa6WhJotGGkELuk1x49T38 Jgrose3o2c5rf66pnskJxo7y0vMJ69HPTU6CfwOhOTD1YXOFzdlOEIH7UXn8gwkipKbw iLvEMPgX2NOF2cPeP1SmUl/gAHh0Ib5q/D+K2PjPFw/mNoN0w8FotwOFVrV42o71DdC2 urRFgL33/WJAolqDzZlYltb5Ekr0IIDZDS+Ti7VQfXgBuMylQ0otEYUrzZT1iqXN9BUV y+kf6tFMWprW7tiTa0BkOvTsrfNRPEaY+r2jQJWpR5/ZFlRdPNY0PEjlvRGAagvLkmvU pJsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jJwG1MdY; 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 gb14-20020a05622a598e00b00431503e41dcsi7677693qtb.515.2024.03.27.09.50.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:50:19 -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=jJwG1MdY; 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 37076385E446 for ; Wed, 27 Mar 2024 16:50:19 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id BA7CB385E448 for ; Wed, 27 Mar 2024 16:45:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA7CB385E448 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 BA7CB385E448 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557959; cv=none; b=bOeH29Qdr9nAID09ngJ9wTOIq2v2vGp4P4pFfNTgou2fSkp3p8xSdiv3MebGSy+RvOemOBaPVaeHgyRAR+mnmtOOaiY1+6xK1Upb8TqhDdvXDqpfZCYNCbyp/Qe/P42x7A9lWHjniuOfdzOdDXU5zn4C9sUUNMrYO5qVHToogdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557959; c=relaxed/simple; bh=rr8tM5m4NJ9NHwHGEs52TlBc33W7hoA0JwGSKpgLU8Y=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=fRRSiD0k64zEQahrcclEY+eEqryoiBowssnui4Aj6AGJIBrx6i9rhShwLrxuytgsMkcUD764p4z2v3VcpEWGhiY1Idovd1ntpnydIDlFjkfzxHyruEYUHoaI5VnC320Rq69Ash6/fhVCl4OWJAhRDT/CvcrMUtw8gvJ5Zua8+8Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1dde26f7e1dso335055ad.1 for ; Wed, 27 Mar 2024 09:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557956; x=1712162756; 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=E6meBW8o0nRpvTFaLF8Ch+/RWgMkapQ5IYEczi9JJmo=; b=jJwG1MdY+kofq/FgFygUfMXDtyLQEFpXo31FAttzONL5LYlbkcEYT4IpSha6acQHe1 w7xoTn+gxsFe6QgHGL0jwGGiQhcO4UFKMsJpnSBfYFcBtGPvFyY9QuL336nQshx85yAh viq5WjPPNvjL/XJs/Z9f14Svhwpqzg1q45VSh8PpSpyvs23t1wFjGqxcJAGLZVr8LZg6 e9jGHgHTDDLHO3ckhgL8ct9P6e7MxHENnm3kOnW40eLvpDKJmXN+ttoV1ePaK1XcDPj0 oqxykeEgeDB4lUneepw8ZI0Jv0HFjq8QKtXkbfXYQSJAQ7/8T1FFjQJsA+pENLl17cCh vWlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557956; x=1712162756; 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=E6meBW8o0nRpvTFaLF8Ch+/RWgMkapQ5IYEczi9JJmo=; b=VSU3JwaAKHO+G4ao907Mg7Z0ZOGdpO4uIgeTmf4To09qq1ohKGt4kRlGaUTeMiB1LJ xGD4fAnjChYjLUWbDCYVL0Uq0w+n0b+AY6HEintg7Q/7ylaZnJe4IV6ofwBY3EL82zst bnWhhVGsGrf8rmqv0sEGrOVhpniE6dx/CDUZdv5jyY/c4gcSvmcakjAbgm4a2HP5eNuU XDSczmC30aIpfRNSAZBu83tAGhqVBsq2ChOnsyH1/xLL30x6fdu1FusU3qQynCQKNS1c haAgFwrzgR7FuLHGCHTpEl70CxwWln3sbhpykqGm+olFpveukpHmJzltZ4KrV9AG+J36 DK8w== X-Gm-Message-State: AOJu0YxIg9vsm58bVXf2bIupm2igH4//bw6jAzaeXsch8sP6AKeWsGzB 3WPHjw07Vb+Ucw6c78CMjY66DM9N1b6IyPQHw+FtSIThyVi2L7EqjkJKwZzfwzLPkQklvfWjCm6 e X-Received: by 2002:a17:902:ce86:b0:1e0:b62c:3ae2 with SMTP id f6-20020a170902ce8600b001e0b62c3ae2mr303470plg.10.1711557955939; Wed, 27 Mar 2024 09:45:55 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:55 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 11/15] math: Fix acos template for arguments greater than 1 Date: Wed, 27 Mar 2024 13:45:23 -0300 Message-Id: <20240327164527.3717523-12-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 template is used by some ABsI for static build, and it fails set the expected floating exceptions if the argument is outside of the range (on x86_64 this triggers an overflow calculation in __ieee754_acos). Checked on x86_64-linux-gnu. --- math/Makefile | 1 + math/w_acos_template.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index af1909d0c7..2b2683a9fa 100644 --- a/math/Makefile +++ b/math/Makefile @@ -368,6 +368,7 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = \ + acos \ exp10 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ diff --git a/math/w_acos_template.c b/math/w_acos_template.c index fe6d6c01db..f4b0e91ae1 100644 --- a/math/w_acos_template.c +++ b/math/w_acos_template.c @@ -30,8 +30,13 @@ FLOAT M_DECL_FUNC (__acos) (FLOAT x) { if (__glibc_unlikely (isgreater (M_FABS (x), M_LIT (1.0)))) - /* Domain error: acos(|x|>1). */ - __set_errno (EDOM); + { + /* Domain error: acos(|x|>1). */ + __feraiseexcept (FE_INVALID); + __set_errno (EDOM); + return __builtin_nanl (""); + } + return M_SUF (__ieee754_acos) (x); } declare_mgen_alias (__acos, acos) From patchwork Wed Mar 27 16:45:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783146 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2301740wrt; Wed, 27 Mar 2024 09:51:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHbipckZ7hizj4yKycy/ivGUQ5yQSXHJFDi4pcbsmt2YCsn9cLwD1i61De4KKdzJubVIjCgcrmXuWdjsz4+24F X-Google-Smtp-Source: AGHT+IGRcjXqACK2WU5r7ng6BaH+xjRk6VGrEqWIr1nizNSp2FUbEU9l1TT7OoymCEyEOxqQxhl7 X-Received: by 2002:a05:622a:245:b0:431:4983:885d with SMTP id c5-20020a05622a024500b004314983885dmr195661qtx.33.1711558264883; Wed, 27 Mar 2024 09:51:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558264; cv=pass; d=google.com; s=arc-20160816; b=P1cD/LacAU/ETe9i2dLGdUqadd6ocph7GFo3jfE77tWhScd6KX+rJuWdQikEFzgiy7 w1OPtwoZ3AnubzQFJLxHLArejR1sX6lGIuUAnVtF60fMHB/kHX9J7LIf52PFyF+BzuET 8fHeCvPJ0BGPl8d6PqZAQhB604D/zvSi/TS4oTUE9G7AEb4KdWyley/MiCVg6UKmvzcC GvxZXyCCb6bNZBt6BNznlvc21dtIBhKqBeCfs5doilIEklx71YjxRjfsC59cAJgBf+DQ fVChjAj1FiwS6nkMayF8UDnQSvjdLqUFLBoBYZZ3j/Mp85is3+wj10+a/B/RJ893Lph4 EjKQ== 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=oNW9JRi+n1bRpdFaZUcEXP6xRQd7PQT+ja4l492NHQU=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=CW+5/FEXlEe1tAth/KcPYbJpmCwVR8Vt2HtT+xCOYVByYj6LkfVWcAK3adxcpO8k3t afe7Ni1PLeBxNTl9yrfO2kzWCMYP7cOp333ZCdG18wrjUfopGck9G8ph+wiAzbxUn/Cz z7oXv994pOYnbAL7h6OGJvQH50812iXPpxmfJXSO7YM8Uw8RyO9NrofAn6Yguc1DusPf w+aDIbqI9yz5sKC8GE273pE+E7RXF7N8agCHAhPAF4vZ77Ep1NVmUOGCL6yLkt8WVwLF qpTio38PBRbs8KrM1aDlJABKwpHt41F3OGuz1skqRmfY+szNl4JvZB1c8n6iLo85Kxky hOrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S4oggJMa; 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 hg1-20020a05622a610100b00430d4cdebc4si9708436qtb.289.2024.03.27.09.51.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:51:04 -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=S4oggJMa; 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 7F2C63858C55 for ; Wed, 27 Mar 2024 16:51:04 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 73975385E446 for ; Wed, 27 Mar 2024 16:45:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73975385E446 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 73975385E446 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557962; cv=none; b=vBk9MmfcfrvjZRa4dUYJuzaMF/qiVGKIeVj93H0qjyStFi89+phBE3U3m37ntVf6ZXo1tGAEaYfdWCr1+m8KGQ8upWxWEJNIe4w4kRPAw1t0zx0Qw2lZC0ad9gW5hCPn32yaJUC0sV5jZBCe538l7yxQdHmlhyijvhoa65lT+BQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557962; c=relaxed/simple; bh=RjHRhGP/pIRZOxjZfNvDZ1XPORsgV8/EYTiLPgAY00U=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=bqwKe6QWTc2g5o6wdqRp7z0uObT5eK6gDuAhyE0CsHMnnGLzTJGVN7c4hepggGLKnYg3Swq/ABeIIrNXjgyl9euXWvR2Ko83cARqDY6f+u3wBvVDqvbiDQMWFrY2hiwDJMbOnZh9E8ZNcni4tRv9a9WnHBY59ikdSUaDW0/3ero= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1df01161b39so187385ad.3 for ; Wed, 27 Mar 2024 09:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557958; x=1712162758; 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=oNW9JRi+n1bRpdFaZUcEXP6xRQd7PQT+ja4l492NHQU=; b=S4oggJMa+wsqsmuZL9aybAE3janMVYHFJGX9pIRY4JXMVOMW7TJ4/bx3Y6RCPVixPD d6fmPTfgXd/0qvTebxQOZR2ggJwQ2DtaE4eIaKPpR7SFmdaAXaq8UmCgXnlBwByh8PDW rkS96OU8ezPOz8LYq5xidXBNAzbpZ9C/9qDiCy27Pxy6I/OYKbm3sgOwn98P+SbwAK4N N4vLyCV/SK0jc9ZfLue9PDgAOLsSC2kTsJVxxU6wh4l9J94+P6FuIUtV85AnITqjeTBA 0JI+MiBov7IwmDw6DIUNoocpTHYIxPOL0SKJKkNEJ59sL2BukgcKbWI8xkW7qgY/etNn +oqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557958; x=1712162758; 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=oNW9JRi+n1bRpdFaZUcEXP6xRQd7PQT+ja4l492NHQU=; b=dxdyV5uQtUR9cWKoxpm1yzFx0ulCgCjInpnyszGhIL+R6Ycj8v7/aHYsdJsLYe/et5 nGcAnreo++iOqqD/2RiRuNeSJ8neuXUaUdeTfwXHviKT6v0jNoj1RwOkFA+vC4mLwLzj axH49FhwacjSZ1lEuxCGWxchbD0jPb+N9j1NYNFUijio29NcyTzCjH4qVoUqVYOEjpqV BzxtU8ENwS5gmRX4pAVQVhxGTuAWkFm+v9a9wtwBy6fSIxhOTq9071qimcosCYit3mqD 7RFh0pFgVHDcaTRJz3L44lxlDecCzXLEXDXegO3T14mCwW8P2fa5NImlGbEUPO6R16mW 8K4w== X-Gm-Message-State: AOJu0Yz31e2AnQ4jOF9ADIrtdnlDr+qcdyOwwDFOx8mi8sEl3wwOTJgX zTvp5Zwr6ntbUSTRsfuWUpZaI7u17A+3eOVmUEVqQgZV0Mwe0nu3USHx+//OvADWMPoxY9dEFiB w X-Received: by 2002:a17:902:7248:b0:1e0:afbb:7a89 with SMTP id c8-20020a170902724800b001e0afbb7a89mr209266pll.22.1711557958094; Wed, 27 Mar 2024 09:45:58 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:57 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 12/15] math: Fix log10 template for inputs less than 0 Date: Wed, 27 Mar 2024 13:45:24 -0300 Message-Id: <20240327164527.3717523-13-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 template is used by some ABIs for the static build, and it fails to correct set the floating exceptions if the argument is less than 0. Checked on x86_64-linux-gnu. --- math/Makefile | 1 + math/w_log10_template.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/math/Makefile b/math/Makefile index 2b2683a9fa..aa57171f77 100644 --- a/math/Makefile +++ b/math/Makefile @@ -370,6 +370,7 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = \ acos \ exp10 \ + log10 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ copysign \ diff --git a/math/w_log10_template.c b/math/w_log10_template.c index aca38d4e1e..cc7b503f01 100644 --- a/math/w_log10_template.c +++ b/math/w_log10_template.c @@ -32,11 +32,19 @@ M_DECL_FUNC (__log10) (FLOAT x) if (__glibc_unlikely (islessequal (x, M_LIT (0.0)))) { if (x == 0) - /* Pole error: log10(0). */ - __set_errno (ERANGE); + { + /* Pole error: log10(0). */ + __feraiseexcept (FE_DIVBYZERO); + __set_errno (ERANGE); + return -INFINITY; + } else - /* Domain error: log10(<0). */ - __set_errno (EDOM); + { + /* Domain error: log10(<0). */ + __feraiseexcept (FE_INVALID); + __set_errno (EDOM); + return NAN; + } } return M_SUF (__ieee754_log10) (x); } From patchwork Wed Mar 27 16:45:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783138 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300128wrt; Wed, 27 Mar 2024 09:47:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVTv4rCDIeZ6Re6iygh1TOWrYayvZlB6e2O/GQOe3VTLcXihhI/tWRWKN4OjP4rB2OflSxzTtrUhVBdyGGuKKD+ X-Google-Smtp-Source: AGHT+IFkVF2S8F2WZJs+lAY9rzYMozstQoMvFcJAgNR46YGUd/dHvHvTfmsmFgI6WZm530f/vHqu X-Received: by 2002:a05:622a:1801:b0:431:627e:d390 with SMTP id t1-20020a05622a180100b00431627ed390mr214423qtc.29.1711558024853; Wed, 27 Mar 2024 09:47:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558024; cv=pass; d=google.com; s=arc-20160816; b=dejFUb9I3SoQNz4FhjhZ8j6C/p1XFue7zUg1CaSbJOLOdiUYtU1lrky79CvAKICWOv KgNMcWiwgpNBbayZQAqaygip0b1qEHQoV/M/vtknY7K6IdScuqiXd5TbdXl2Lr32IIj7 kMPORkxCNzb8wmFO2l5BhdvlHeWdTXXM9yPoPdaaw/Vogjv03DePjKJjFdElfICIxtc/ CMB18Z/Hv8dd7HhgiK7IbM0xQzFdtWCiu2lyjWfhU2un/HGOy3Ox8EPkMuDSD+V2lPYn 9CtHE1JCmS4G9MXORc2fNuWt+9Wf5nYZk3mzqSy4CSMiNXt5iR626h7WTG7PpfHkr+Cl MO5g== 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=C8SvVzRbyUaeCjml/gbQthQjBarqYX4J2exTyVV+POs=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=u/OTGXG72VMxyxbSPVoQJJxpkFDoocmZsUZDRPEZjBlx4QjeMVNL5iaAFyNnLOgWwG WEfhOj0RejYHq4go2sY/9FkEjUafwXr6AgrS2RGdK9xeIzFopwioAmYe9XM7bNTfw/Zx lbB85Oq5aIae3Kw17D6wKOOI3K8cS72yHZ44CF4hXvSKje/wFOo+FRFxJHeIkCd4gB/I 6R5Awc64rfyE2nLC183dJ/+S2KfhUrQvCJSRAWGKPC1doNy87jZjtekGl09/axr8eeP9 hdJNJGRrj1YclO1T382x7vgBtophe7BQ1YOsy9vOtwK2kbXnVxfHSnkbIcLJI2fzD5Xq 05xA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMzcZlPc; 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 a12-20020a05622a064c00b0042f2127fa75si10183850qtb.683.2024.03.27.09.47.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:47:04 -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=uMzcZlPc; 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 78743385E448 for ; Wed, 27 Mar 2024 16:47:04 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id B178F385843B for ; Wed, 27 Mar 2024 16:46:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B178F385843B 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 B178F385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::635 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557963; cv=none; b=L7fRkZh1Bl4aQf/yu+uswZYVb1tojenvgFRqyGNLEkTjz+Sf1I5IMLYnZEG9PE4bLGLfOQRUJPj+N1HOiOtJjZSOptRR1tWbHyPrubEe81K4deoyyV5szseCRUzwLaGblQQWOMNFQmmsSP+2dUS5iuEi4zq3ngw3i6fSeQZ/9EM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557963; c=relaxed/simple; bh=x+kArivzxvN8hcZBiHq9bKAjCxH//BHD7Hfi3o2dTmk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=iEk81uoPG4ts3VUDD/Ytnb7WyWsQFy+MjBS0d9kIwJtoil2ODhxfznTwBCS2dVQyVkA2UVH1ozCWI2yKv0GUw4CVIP4Yr1t9bPdqbSXuea/eHMnaba5ZH7mRxH19uTIZfz46vhNGqXvSKIRGHlzcHU27kzOvLAIY4RQZpFzoVRI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1def89f0cfdso9091615ad.0 for ; Wed, 27 Mar 2024 09:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557960; x=1712162760; 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=C8SvVzRbyUaeCjml/gbQthQjBarqYX4J2exTyVV+POs=; b=uMzcZlPcrOVCTF38iXm5xmMiCjYnfnvc7al9B1VdhNFzlYtLfLP+Xa21lMPjF9X+c3 0WwmzduSCd1pOziNY+YSLD2PCExRvztZBbl1LgwxllcZtQJ6qPrmcXS2geDCG1EgZ/S3 3EnrDCi81ftIPyxhA97/wAPwrric1jwF+SXgmt8MOACFZe9X5kikOlSvlM5J++Wx79Fx OocBhUUgCFxL5MPvIl12N91PvtdImuzpptR55JYwRpwhxlwNJNGJkrjvViAiUMoCiiY4 pLvweNEldHyhiB4jRqqW+djy0OVE3dTEftIPonQ3WcO/vcS76ckH7j3DuFWxIGlwKAu1 QPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557960; x=1712162760; 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=C8SvVzRbyUaeCjml/gbQthQjBarqYX4J2exTyVV+POs=; b=kadU3XWwRODSyVuq1hFwbUjIJWsYw0GbMjG9gcXrhu4tOFIpCCZb8xCMZK2YlbWEfe ddjdyfAUdQ5yn5LyiGOw02Ag7/d29t8dT/hOvueviqtwCtW7XbzZIBg6RunNnIGXhXms Yrh6MmY8nSBR7R5narPWB45nFpyYxM7P5DewMvO1vs9Jr3uC8eslEPFnyxUbllc000M0 MR/SG6KYTHglLq6bupSscHPFWmsxocKXmcS3I3J3xdFf2ZY1oOYYWRWQU5jH55/OL/D7 kvQ34qPpIC3f92OqtOjt7OFdUWZCDGoFy7AmFwcqzUtJfU/TM88awMlsnZuK0389LXp2 heMA== X-Gm-Message-State: AOJu0YzOTrJQFIXFpeyqvMxPS7sfngsH39+X3GJ93KZvPXOpBSpMXLp/ dOqpUCkVnpHy2kWjBGgKX2b3TXdQseY1BG3HZGp8dGJpmyZVcgJOo87gUY3XWJNh/m1dxTyRGkK i X-Received: by 2002:a17:902:e54e:b0:1e0:188a:5ade with SMTP id n14-20020a170902e54e00b001e0188a5ademr207385plf.11.1711557960234; Wed, 27 Mar 2024 09:46:00 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:59 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 13/15] math: Fix log2 template for inputs less than 0 Date: Wed, 27 Mar 2024 13:45:25 -0300 Message-Id: <20240327164527.3717523-14-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 template is used by some ABIs for the static build, and it fails to correctly set the floating exceptions if the argument is less than 0. Checked on x86_64-linux-gnu. --- math/Makefile | 1 + math/w_log2_template.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/math/Makefile b/math/Makefile index aa57171f77..7391f2bd41 100644 --- a/math/Makefile +++ b/math/Makefile @@ -370,6 +370,7 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = \ acos \ exp10 \ + log2 \ log10 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ diff --git a/math/w_log2_template.c b/math/w_log2_template.c index f3ac0aab49..8933f2cd62 100644 --- a/math/w_log2_template.c +++ b/math/w_log2_template.c @@ -32,11 +32,19 @@ M_DECL_FUNC (__log2) (FLOAT x) if (__glibc_unlikely (islessequal (x, M_LIT (0.0)))) { if (x == 0) - /* Pole error: log2(0). */ - __set_errno (ERANGE); + { + /* Pole error: log2(0). */ + __feraiseexcept (FE_DIVBYZERO); + __set_errno (ERANGE); + return -INFINITY; + } else - /* Domain error: log2(<0). */ - __set_errno (EDOM); + { + /* Domain error: log2(<0). */ + __feraiseexcept (FE_INVALID); + __set_errno (EDOM); + return NAN; + } } return M_SUF (__ieee754_log2) (x); } From patchwork Wed Mar 27 16:45:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783147 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2301999wrt; Wed, 27 Mar 2024 09:51:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2fwa+5icjUMlAju2575oytSbiKUTRfi42kojr25im49u5rxAkFG4lV2+14QqVKM4MqQ4ygRGmE+jVukRfXxRz X-Google-Smtp-Source: AGHT+IFEJcLg800plkurl/VFrfbvTglNe/BTa1x7ABz1pUtS8z2BzfyXBuNWeixhtwaKpGsTaK+3 X-Received: by 2002:a05:622a:1348:b0:431:523f:85d1 with SMTP id w8-20020a05622a134800b00431523f85d1mr242867qtk.8.1711558302448; Wed, 27 Mar 2024 09:51:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558302; cv=pass; d=google.com; s=arc-20160816; b=LOJOw+3UyahzA4pPwVPVgooVzChDQ0BZ8+2mmREevi3MsKzxVVXWNjmCIZEYGehXus KO5WCNAqd1XBx0yOoGRVOnz1AE2lkGGgNvRO4ZYP7nOxCr0/Kd+MbDTepb/N8X19VqEs jM1b5mdWAfMcWXjZbA8vQm/3PwwmD+Qr3sCTbDzscepvL0f64hwqhiLPVqTwsw+U9yRD 5SfH44x3XUvfBm9EvUI3guoSeITjqUnFVEkFu78iEo3mdGShmim3AzO8VecthyzLNkfs asoSdHdemindFASQAdqToaQlfHBgHQ2xHKAofK0PzwflbW4/DpUOl8dTI170LioK4Qf7 DiZQ== 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=ah4URH/aGPZ0QCEKaSIjDoKiv15ADYgX/jTm5C2jEzI=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=qobbwQI9MOnuDjMuA6iUkfytkTIVICm0KQm08dxWJe3Tzwy8n0F6n1IqKmFjeTZ/sP JXgdnxNR3K45MuPAX2F8cU1z8W2KDEnuzFfYJOJ2hy0XXCjfA0l4yI2DokAjRhD7VpkU 43/FBK0PEXCjX3l1iCMpuDAL1mwLBtqnxhlxlpWj41J/kjvTfkpnuvu+SCSt+rUUfhPo a8YvIdGkAQZDvh9t8MhdGuH0yU7OtbrjByPitMNHehiqB2RAm19K027K8/4/3Hv12ylb 75i1sgzGkHbQ/+KO22BH4HVvAnm4cZcS1r6D2sunv7dMUrINBt0NMb+9aboghi5BYARP Wajw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bi8U2v60; 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 r6-20020a05622a034600b00431817cfe31si1203181qtw.269.2024.03.27.09.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:51:42 -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=bi8U2v60; 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 F1E463858282 for ; Wed, 27 Mar 2024 16:51:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id E7B15385E45F for ; Wed, 27 Mar 2024 16:46:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7B15385E45F 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 E7B15385E45F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557967; cv=none; b=sxUE8N++RlIBHePWnOu7yjN0O5WE3EEAReP3avYFU+9VNRF/Agn1qteicWhPdfQJKw+GxC7nq7iStI3H8LwkBgz/nuNUlR7weSl58bUo/DcxlqrSAJgop6pg4HT4GghiKUUBiBsx7LI1C4ILEe+/XwQcX1FYulxU5uAeU/OxiIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557967; c=relaxed/simple; bh=IHVmuW9MM4fKmTcotIQy+gCOD3rsiBO17gs+zD0Nztw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=eFDzgQ1UjoXw3LMXUqmBO4YDctBmnCm/t/Y2h6sOgiH7KCwA3SOq/4MsQ/IkGJ6jxak7ZvPbwarGeY0jXfGjDH89dIvwnUC4nmSShvujDYQe2NCflqjBPZQbvqV87RbkIMtTrnPocShbuRCb64xqm5ihizqtVeQnNKTdI8bkRrI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1e0878b76f3so649025ad.0 for ; Wed, 27 Mar 2024 09:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557962; x=1712162762; 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=ah4URH/aGPZ0QCEKaSIjDoKiv15ADYgX/jTm5C2jEzI=; b=bi8U2v60z6z422qVu70UWsd3Mw/PcY8RfzRnothUmh6SarLcyY7UgfSyIBKpySgUAp KwZ3OZuUqIc9Y84SLI7gIck7hRbrTHYa9Ri2IB2DkLyeDmqFwXvS77VJyS4BkcRDLIAZ RFJcnY5C9O6bmEXkHw1nsk1jj4lw/7gt05PrZ9MaOa8943pxNGWT0CZrzjNtnhG7lZ8A fqPHVfU1FvuaEitAAOf+adDmgm/d0P7a9YoFF15e3LDJd6Q+I2yCc6rk3jaTnOhVa9WA 6iMGWkaj6PoJi0ZB/y9RhbDzrwpNceq4twkBo4bOMsyyZmsiaCQgZ1MGirWsn+QdsfDI vPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557962; x=1712162762; 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=ah4URH/aGPZ0QCEKaSIjDoKiv15ADYgX/jTm5C2jEzI=; b=Upn9MVaBsl1W6wFcOU2Cl07k0EkecxH6AuVl/TulA1Yvb2TmnOc1IVjAe2HXwGuI9a oX8zCB++XIY4ZnularuKhehxA+jSqtou6/0gz5HwpwqtXEfDBcj5tn8pH+rMRK0vUR3W 6KzeWqDjKVBWWQAlOFqraedp6OimVyy5eJ5I139GM7bD+nnz2lTqN6ZZ9LFbnN6mEprl pf0ktjEnyrLFuHaga3TWbf1OT/gKaC2q5DRDqQEE9y6h+4egX0cHKxog8VWbUu52noQD YW3OiOBR/xrWPlFtDdWQFxDST8Mj+Snzuc3PakHy3aw+qka4S6IIkQ7uEnCRCNOTBkfw fWDw== X-Gm-Message-State: AOJu0Yy/ybRpLk78H4Gz7IacvYNUeb/h9sq9vjCntH0JSf2hCkwUPw8+ Gtzp0UmWDovS2YolYMWEyzyUvWQM1VjJoJh0TlYFxhRfOAY5j9ocP5Y4Go0b4WdlUtPWcf1tyCf h X-Received: by 2002:a17:902:e84c:b0:1dd:69bb:7f96 with SMTP id t12-20020a170902e84c00b001dd69bb7f96mr190653plg.6.1711557962298; Wed, 27 Mar 2024 09:46:02 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:01 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 14/15] math: Fix y0 template for arguments less/equal than 0 Date: Wed, 27 Mar 2024 13:45:26 -0300 Message-Id: <20240327164527.3717523-15-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 template is used by some ABI for the static build, and it fails to correct return if the argument is less/equal than 0 Checked on x86_64-linux-gnu. --- math/Makefile | 1 + math/w_j0_template.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/math/Makefile b/math/Makefile index 7391f2bd41..5807e949d7 100644 --- a/math/Makefile +++ b/math/Makefile @@ -372,6 +372,7 @@ libm-test-funcs-auto-static = \ exp10 \ log2 \ log10 \ + y0 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ copysign \ diff --git a/math/w_j0_template.c b/math/w_j0_template.c index 1822fc8213..afa2056f96 100644 --- a/math/w_j0_template.c +++ b/math/w_j0_template.c @@ -39,11 +39,19 @@ M_DECL_FUNC (__y0) (FLOAT x) if (__glibc_unlikely (islessequal (x, M_LIT (0.0)))) { if (x < 0) - /* Domain error: y0(x<0). */ - __set_errno (EDOM); + { + /* Domain error: y0(x<0). */ + __feraiseexcept (FE_INVALID); + __set_errno (EDOM); + return NAN; + } else if (x == 0) - /* Pole error: y0(0). */ - __set_errno (ERANGE); + { + /* Pole error: y0(0). */ + __feraiseexcept (FE_DIVBYZERO); + __set_errno (ERANGE); + return -INFINITY; + } } return M_SUF (__ieee754_y0) (x); } From patchwork Wed Mar 27 16:45:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 783142 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300832wrt; Wed, 27 Mar 2024 09:48:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJh4s3mS8BCH0ScZWHfF5NlDk5+XDUgDbKvswE4yLDL4z0KjOGXfBt18NpZPNWO+NENRageEygfTgwUdy5W20j X-Google-Smtp-Source: AGHT+IGRp9OCKMYD8VUASarcW6GLJvjSsjiEFqO4vfCCvCZcbcSrHVjFZS9XKx/2qr7XEsNPAbf+ X-Received: by 2002:a05:622a:1206:b0:431:7ed1:4d2e with SMTP id y6-20020a05622a120600b004317ed14d2emr203126qtx.68.1711558121779; Wed, 27 Mar 2024 09:48:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558121; cv=pass; d=google.com; s=arc-20160816; b=dA+NusqvxdKspFwKaIOctP/GUh8XonPr9+wT40XVvOJ4/ET26xBv5tOTBkIT1NtXD3 OBFF+i5pIT/h23TBWjybKW6WiHnYdmILC3uSY1FiWsn/ixlga2jBvtqkmhgSY3GDV3hG HB30+d1Sdhx9iijT1BdmuxB0OR2ZXCM6yfd7t4ZvkYZx1y6BAGizs4OkXm/ckkJ2Sf9D ZrI08PQ6Gvz5If/2bhflpG9i7B5ywWwZzOG0z0knJg1Z2snOCQSoJay2XhI2FMCS587+ b3yJyjq4/XFkW/noxnNjKFxRxZfZp1w3WpVrFER6giJHEzMqRlfiTkuGqdjOS6eWe9Uj MXEw== 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=hU0PJbP2URljP7w6Sb0tW3oRuLveUFIgdOvH220fqI0=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=zoPW9xrVRmBmZbWACmXK25ZRkyUHntPKSZ3m+ECAUUkFdWUS668mdmEyv9cEiv69Sx jlgiwIz4AzOFUEsw5HYIaD7rN8zItJWjPIbOhyUsqg8lOvt8EbzSZrv0/0pV7rMK+uHr F6wG1AVt9bI25qybqAaSOoimARBfEoJDaeKKEwLPR2AYc64qJ2F5GxtBThYCHD0SlwzN pipfYgWo1EF34GYM79buGQQgrOmFWgU/e8EDcBwh9Igdhw3zqpXitanXPCl1fw/B1GoO q/ozhQWxdNdnwdTjXp9g3bvw2Vyi7AdIL6aTVy8LDdkz/Oq/IGYQaX72fyxmd4Q1kL/y Gh0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vQ85pN+B; 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 f7-20020a05622a1a0700b004315b469699si6588240qtb.685.2024.03.27.09.48.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:48:41 -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=vQ85pN+B; 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 67CF4385C6EE for ; Wed, 27 Mar 2024 16:48:41 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id CFDDF385DC18 for ; Wed, 27 Mar 2024 16:46:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFDDF385DC18 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 CFDDF385DC18 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557967; cv=none; b=mwLlpRyhle27g7JgFWVhdrYXmFxrY0DmPAf9e63UuylDN4Re3LktC/3l1fKn/bmQSpeSeLpJt2GwK8QJTJTdH3KFLfpq91iEaAh0Aa6dCCo3Tj2Empkzw11Vf2mSIUbU3pZXzyIiq8hWui2GZzoqWK873/qaQZqYAI6IvLGW3gM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557967; c=relaxed/simple; bh=Mal+E7LUP0cRsZMKfE9wEUgdvKAA4VRP1nVlPqotcCM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=TjHeOzaS9eaQkJSDWaIs3Hp5Nn4QwyNsJAOTHdCSQ9OhkQqTZb/ISqfIqmx6DLq6VoPEgZkzG75X2tPmdTkLjQl9PXJKQMTsbGVgn5t8rVlWHbuu+ZUXCxnxabMgNGFzRX7sfkT+8HXQEi3POrbtX2pljWIQkEd8QBDdmPVToAE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1e0f2798cd8so273525ad.3 for ; Wed, 27 Mar 2024 09:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557964; x=1712162764; 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=hU0PJbP2URljP7w6Sb0tW3oRuLveUFIgdOvH220fqI0=; b=vQ85pN+Bv4AsIizOMn73HaRtIdq/Px6mBqR1aSaGnZx8v/SyugOpAWsmm65TWyf2wS EWyWEmVVAn5vt73lCZCHEhgHrPBnKeo0PkL3BC4+rUPuZMCwukpHW3wQ391whLmupcc+ 9td3iqRXNUMQxLjbdXubdT2r/UvIu+8QrGD01TGMtDBk6KpucNY1nzb1LE0XNLJPBRyW 9+IMz/Ela01Had2NLmF8NkpVvyRe79oUzLhqMiGC1DhaTjIGvZTZVYMSBAvw5psA5b4z D20x0FDlWu//Vt1Z8GH4k0x7SSDKJjrZM67PlLdHMjqeO78S4NDEW4+/arQvKWERvcZQ KeEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557964; x=1712162764; 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=hU0PJbP2URljP7w6Sb0tW3oRuLveUFIgdOvH220fqI0=; b=V6WkdmFb+TNdEegJpI9NqEgIS/KkImBVVronuvUZWOau9qPEtQrvjuTCtoufeZ5VGh fL6UTy8ztxCwEspr7MOggDMp02xoxM/UuUZSLaDxGcVJO2nOsU2cjJwQClmbKKdtnASY zXd0wZEmLYAaOGYujH9SKWbh0sNvKWyMLypUdOGGI9jHHmoncHw9Rsk98kHiAXJm3lhw MHnoKg8dd3SMHFTl8bnP8vycqjjNswu34Xmc87UE5vN3MqYy5HwzBNitzNvYjRAowmt0 JDoFjf6R6NB0i9PE2d0TA5Ov4FWvWVCf1XSaFyx/yJHHIcqMKrlB9kaGEb1wrhVCjELe Prcg== X-Gm-Message-State: AOJu0YzVZyQTzKmAPYP0GCEIf/PkQfGC9XA26IV6qWJZ6wHbjSQhCtMb mAPsTevsYTs/TefjnIPRJ3YCcCxS6wGucsMJAOEJRvQGitffPirV9s+tX+jR6xn2YzoWTd3X1Ty Y X-Received: by 2002:a17:902:d549:b0:1e0:d62e:77d with SMTP id z9-20020a170902d54900b001e0d62e077dmr303951plf.23.1711557964493; Wed, 27 Mar 2024 09:46:04 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:04 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 15/15] math: Fix y1 template for arguments less/equal than 0 Date: Wed, 27 Mar 2024 13:45:27 -0300 Message-Id: <20240327164527.3717523-16-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-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 template is used by some ABI for the static build, and it fails to correct return if the argument is less/equal than 0 Checked on x86_64-linux-gnu. --- math/Makefile | 1 + math/w_j1_template.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/math/Makefile b/math/Makefile index 5807e949d7..b58fca85e4 100644 --- a/math/Makefile +++ b/math/Makefile @@ -373,6 +373,7 @@ libm-test-funcs-auto-static = \ log2 \ log10 \ y0 \ + y1 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ copysign \ diff --git a/math/w_j1_template.c b/math/w_j1_template.c index 0a97cf9219..addcf4fac9 100644 --- a/math/w_j1_template.c +++ b/math/w_j1_template.c @@ -39,11 +39,19 @@ M_DECL_FUNC (__y1) (FLOAT x) if (__glibc_unlikely (islessequal (x, M_LIT (0.0)))) { if (x < 0) - /* Domain error: y1(x<0). */ - __set_errno (EDOM); + { + /* Domain error: y1(x<0). */ + __feraiseexcept (FE_INVALID); + __set_errno (EDOM); + return NAN; + } else if (x == 0) - /* Pole error: y1(0). */ - __set_errno (ERANGE); + { + /* Pole error: y1(0). */ + __feraiseexcept (FE_DIVBYZERO); + __set_errno (ERANGE); + return -INFINITY; + } } return M_SUF (__ieee754_y1) (x); }