From patchwork Wed Mar 27 19:40:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87736 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F37D3860005 for ; Wed, 27 Mar 2024 19:42:09 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id E7A613858D20 for ; Wed, 27 Mar 2024 19:40:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7A613858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E7A613858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568435; cv=none; b=H4jYGT4ExjmUTQ96RUO9lYZU37niedK53d1/EyITMhioR/uaUxrK8KdvCmtI0lakw07zOe9twJQJ54iltQWip0QPdq0L3i2WC0CJym4T1fkA+BT9qcIAXHx4yMN7Hy7ovguVPAOPaRYfGiZB7f7i08P7+Nz2jPX8oNILOpmAVd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568435; c=relaxed/simple; bh=TmwJdU86itK5iLqvFT7K3Lwmv+jwRtk0S1NFuax1vdY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ZCFf6OCPXzv07AB8f28VUv52anG8tkahfAHiLKoykuMjyt+GTpmSOh+jDiUHB4K9HPSrkMgR/JsHvc6SatD+NU70RXT8qq8j2Z82JCs0Rz8cU77tgiIpvjXwG+BbErEV4ZJsh4gZKMnRLmgNHc2Cm8ZCKOPgA7j/lw7i/8d9fSc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5dbd519bde6so94539a12.1 for ; Wed, 27 Mar 2024 12:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568431; x=1712173231; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xM0bEaL2ABl3Ls/8bCAVCkPzu+hbOKNXOxMT6+5zfns=; b=Eep8Z3biQiG0YrggbPX66XFsi0rL1/pD0HAYR+vWRs0qnx0fO7yGMi6cZcag4tv/An lj5Z95CbcTx6TE7xBLj14s723Xa7znFIjtvyXPNmh9HWZektgD7lK79GBPQGelJmS5LT lhp5rxqTv75VpPjOiy3+yCSTC+6hNCqxZga/DBnPHY924lxjY/ispk6agpyWxkKmyWIi L5xfnVD6sqU1KZwsCHz0qmS05E58fQ81y0jMp6xtDoEM0+Tu0GtL81XRLsHtEsIKZxCm 0CiJ6yO1S/QDWtBBadlybjT2iYmXbW/w3w5g4kR6j30lvUueQzrA6vkaiUDybShpnTjN NQgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568431; x=1712173231; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xM0bEaL2ABl3Ls/8bCAVCkPzu+hbOKNXOxMT6+5zfns=; b=oAV+fZBtqngcKAUcodsr4csYNmZYcjqP7Vn07O8aqwodzM0KwvTdgfa2GJmLfLnGNU C08ZbV43cHoAZdueeapwligH76lPF8NAxpZ57Syt6QnF8BMEQ6XzKi3q76BlprzUroJN 3wQ/pgrjIXoAvCkzPf68zUvCwqrxSn5qw6qKyKJpROYAmbkT0aeyQqobfMVUMBUxmVS5 DQ0/G97Nt23pA/UJGou9ifGbPmLoAcjFtW4pQECOhDRG2LTGdJ3apr/W1Jl1l7+Nk/gb MvD65O4xoPtkAkyAp4h/H/jCGKDtOnwWMZMhI9SHZNx/11clLnNtIMTvm5s7ibIPsxtf GNeA== X-Gm-Message-State: AOJu0YyVJ9TXk+l4ZtYrClKbZJsPlfDCT1bKfj3wgGBaCY+chahCaquo VU5xLXoaz25GlAuPmgMMNkf8F8eQslYcfWcmn60KLtVyI5/qdeqLsi03XRLwDzs/YBsal5GHM40 b X-Google-Smtp-Source: AGHT+IGccJSd8ux/4X7XUWFhz/KkopzfoiQfKLd5KtoS/UjFUD45XsZa1DuS4uJLOc72Z3G14vx6ug== X-Received: by 2002:a17:90a:9384:b0:29f:e0ef:4d8c with SMTP id q4-20020a17090a938400b0029fe0ef4d8cmr598774pjo.44.1711568431177; Wed, 27 Mar 2024 12:40:31 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:30 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 01/10] math: Add support for auto static math tests Date: Wed, 27 Mar 2024 16:40:15 -0300 Message-Id: <20240327194024.1409677-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org It basically copy the already in place rules for dynamic tests for auto-generated math functions for all support types. To avoid the need to duplicate .inc files, a .SECONDEXPANSION rules is adeed for the gen-libm-test.py generation. New tests should be added on the new rules 'libm-test-funcs-auto-static', 'libm-test-funcs-noauto-static', and 'libm-test-funcs-narrow-static'; similar to the non-static counterparts. --- math/Makefile | 103 +++++++++++++++++++++++++++++++++++- math/test-double-static.h | 1 + math/test-float-static.h | 1 + math/test-float128-static.h | 1 + math/test-float32-static.h | 1 + math/test-float32x-static.h | 1 + math/test-float64-static.h | 1 + math/test-float64x-static.h | 1 + math/test-ibm128-static.h | 1 + math/test-ldouble-static.h | 1 + 10 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 math/test-double-static.h create mode 100644 math/test-float-static.h create mode 100644 math/test-float128-static.h create mode 100644 math/test-float32-static.h create mode 100644 math/test-float32x-static.h create mode 100644 math/test-float64-static.h create mode 100644 math/test-float64x-static.h create mode 100644 math/test-ibm128-static.h create mode 100644 math/test-ldouble-static.h diff --git a/math/Makefile b/math/Makefile index 79ef4ebb65..fb537955fb 100644 --- a/math/Makefile +++ b/math/Makefile @@ -274,8 +274,10 @@ endif libm-vec-tests = $(addprefix test-,$(libmvec-tests)) libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t)) -test-extras += $(libm-test-support) -extra-test-objs += $(addsuffix .o, $(libm-test-support)) +libm-test-support-static = $(foreach t,$(test-types),libm-test-support-$(t)-static) +test-extras += $(libm-test-support) $(libm-test-support-static) +extra-test-objs += $(addsuffix .o, $(libm-test-support)) \ + $(addsuffix .o, $(libm-test-support-static)) libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests)) test-extras += $(libm-vec-test-wrappers) extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers)) @@ -364,6 +366,63 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ $(make-target-directory) $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ + +libm-test-funcs-auto-static = +libm-test-funcs-noauto-static = +libm-test-funcs-narrow-static = +libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) + +libm-test-c-auto-static = $(foreach f,$(libm-test-funcs-auto-static),libm-test-$(f)-static.c) +libm-test-c-noauto-static = $(foreach f,$(libm-test-funcs-noauto-static),libm-test-$(f)-static.c) +libm-test-c-narrow-static = $(foreach f,$(libm-test-funcs-narrow-static),\ + libm-test-narrow-$(f)-static.c) +generated += $(libm-test-c-auto-static) $(libm-test-c-noauto-static) $(libm-test-c-narrow-static) + +libm-tests-normal-static = $(foreach t,$(libm-tests-base-normal),\ + $(foreach f,$(libm-test-funcs-all-static),\ + $(t)-$(f)-static)) +libm-tests-narrow-static = $(foreach t,$(libm-tests-base-narrow-static),\ + $(foreach f,$(libm-test-funcs-narrow-static),\ + $(t)-$(f)-static)) +libm-tests-vector-static = $(foreach t,$(libmvec-tests-static),\ + $(foreach f,$($(t)-funcs),test-$(t)-$(f)-static)) +libm-tests-static = $(libm-tests-normal-static) $(libm-tests-narrow-static) $(libm-tests-vector-static) +libm-tests-for-type-static = $(foreach f,$(libm-test-funcs-all-static),\ + test-$(1)-$(f)-static test-i$(1)-$(f)-static) \ + $(filter test-$(1)-%,$(libm-tests-vector-static) \ + $(libm-tests-narrow-static)) + +libm-tests.o += $(addsuffix .o,$(libm-tests-static)) + +tests-static += $(libm-tests-static) +generated += $(addsuffix .c,$(libm-tests)) \ + $(foreach t,$(test-types),libm-test-support-$(t)-static.c) + +libm-test-c-auto-obj-static = $(addprefix $(objpfx),$(libm-test-c-auto-static)) +libm-test-c-noauto-obj-static = $(addprefix $(objpfx),$(libm-test-c-noauto-static)) +libm-test-c-narrow-obj-static = $(addprefix $(objpfx),$(libm-test-c-narrow-static)) + +# Use the same input test definitions for both dynamic and static tests. +.SECONDEXPANSION: +$(libm-test-c-noauto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a /dev/null -C $@ + +.SECONDEXPANSION: +$(libm-test-c-auto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + +.SECONDEXPANSION: +$(libm-test-c-narrow-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + # Tests for totalorder compat symbols reuse the table of tests as # processed by gen-libm-test.py, so add dependencies on the generated # .c files. @@ -505,6 +564,18 @@ $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c: echo "#include "; \ ) > $@ +$(foreach t,$(libm-tests-normal-static),$(objpfx)$(t).c): $(objpfx)test-%.c: + type_func=$*; \ + type=$${type_func%%-*}; \ + func=$${type_func#*-}; \ + ( \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + echo "#include "; \ + ) > $@ + $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c: type_pair_func=$*; \ type_pair=$${type_pair_func%-*}; \ @@ -539,6 +610,13 @@ $(foreach t,$(test-types),\ echo "#include "; \ ) > $@ +$(foreach t,$(test-types),\ + $(objpfx)libm-test-support-$(t)-static.c): $(objpfx)libm-test-support-%.c: + ( \ + echo "#include "; \ + echo "#include "; \ + ) > $@ + $(addprefix $(objpfx), $(libm-tests.o)): $(objpfx)libm-test-ulps.h define o-iterator-doit @@ -548,6 +626,13 @@ endef object-suffixes-left := $(libm-tests-base) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): $(objpfx)$(o)%.o: $(objpfx)libm-test%.c +endef +object-suffixes-left := $(libm-tests-base) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: \ @@ -563,6 +648,13 @@ endef object-suffixes-left := $(libm-tests-base-normal) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): CFLAGS += $(libm-test-no-inline-cflags) +endef +object-suffixes-left := $(libm-tests-base-normal) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) @@ -584,6 +676,13 @@ endef object-suffixes-left := $(test-types) include $(o-iterator) +define o-iterator-doit +$(addprefix $(objpfx),\ + $(call libm-tests-for-type-static,$(o))): $(objpfx)libm-test-support-$(o)-static.o +endef +object-suffixes-left := $(test-types) +include $(o-iterator) + define o-iterator-doit $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags) endef diff --git a/math/test-double-static.h b/math/test-double-static.h new file mode 100644 index 0000000000..d53f46819f --- /dev/null +++ b/math/test-double-static.h @@ -0,0 +1 @@ +#include "test-double.h" diff --git a/math/test-float-static.h b/math/test-float-static.h new file mode 100644 index 0000000000..7834c9e1f1 --- /dev/null +++ b/math/test-float-static.h @@ -0,0 +1 @@ +#include "test-float.h" diff --git a/math/test-float128-static.h b/math/test-float128-static.h new file mode 100644 index 0000000000..5f8206456a --- /dev/null +++ b/math/test-float128-static.h @@ -0,0 +1 @@ +#include "test-float128.h" diff --git a/math/test-float32-static.h b/math/test-float32-static.h new file mode 100644 index 0000000000..2df27d1ca0 --- /dev/null +++ b/math/test-float32-static.h @@ -0,0 +1 @@ +#include "test-float32.h" diff --git a/math/test-float32x-static.h b/math/test-float32x-static.h new file mode 100644 index 0000000000..62f78b49d8 --- /dev/null +++ b/math/test-float32x-static.h @@ -0,0 +1 @@ +#include "test-float32x.h" diff --git a/math/test-float64-static.h b/math/test-float64-static.h new file mode 100644 index 0000000000..807c174df1 --- /dev/null +++ b/math/test-float64-static.h @@ -0,0 +1 @@ +#include "test-float64.h" diff --git a/math/test-float64x-static.h b/math/test-float64x-static.h new file mode 100644 index 0000000000..a7801dbc10 --- /dev/null +++ b/math/test-float64x-static.h @@ -0,0 +1 @@ +#include "test-float64x.h" diff --git a/math/test-ibm128-static.h b/math/test-ibm128-static.h new file mode 100644 index 0000000000..b66a57050b --- /dev/null +++ b/math/test-ibm128-static.h @@ -0,0 +1 @@ +#include "test-ibm128.h" diff --git a/math/test-ldouble-static.h b/math/test-ldouble-static.h new file mode 100644 index 0000000000..beabedb817 --- /dev/null +++ b/math/test-ldouble-static.h @@ -0,0 +1 @@ +#include "test-ldouble.h" From patchwork Wed Mar 27 19:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87733 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08BE7385E45E for ; Wed, 27 Mar 2024 19:41:18 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 201BE385C6EE for ; Wed, 27 Mar 2024 19:40:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 201BE385C6EE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 201BE385C6EE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568437; cv=none; b=Ruqies5HXLjOihkhHWbdnshk+94ekZR0UwuoY2LER7295WGYP+lIveffidQSa2dfhj+7IsZP7Yx5k+Vq0hsAemAuInEnI4VpTu0XMbB9SkvDdM6SlOu7zsF0KDab+D36pjn7C/YyI0nZ0FTnxDXm6nnGwv61QSAgu2b+jD+SnB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568437; c=relaxed/simple; bh=4aR3m2SjWqChSXYKCt63Vv0Bjg6RMaEe6T3zRnV9swU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=iKehDdKyofpNJfSXSds61YegHDrVptuM6hHUuUtFR/n8af1kcK08Xdfg1eoVG5gfsGzAumRCF37kHSs4JNj+U61gNygW2KW6IK0qeJHkbvsuTicR1GenKlxgwsnorFxmQuTb52gFLZ6hLmQglShpXHkWt4lOgUdGCH4HKkX7Dhg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ea9a60f7f5so206521b3a.3 for ; Wed, 27 Mar 2024 12:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568433; x=1712173233; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=uSUd22tSooCT2c5ZE9NVI0wH1s+o4+3CzGMzzmvf987yO+HobbpTChxGIPYSJtWOe5 xRAhLYV8jGyzUvV/wJTzZGJKB/bDwkbwncP5PEHmpOZz/9pzKXPFOn+kv7dW09XRGNc3 1ldfYbQNjg6PE0FptPHQaXJXRHHvs8oov3p+rY5kdS0pniMglQJumnIt6I5F7SUfLVNb iJCf77YZmBO7AoMI4T6ZbnYfsVeApuivZ/fjUXAOwKbMpJoAviTAg19qzgP1NlOUlrfG sFAuOd3Fapzf25t3Ujujqs5jsbL0IdBLjfemmR7s66z4dVyd46bxXJ7t04UTnxYpv+9p wasg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568433; x=1712173233; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=aOG+RcUQ6yLzJEXTGE9FhD2l0azkldD98L1pZIC2T0huhfrUcmREsH9CQF56EWjf15 9nEunj95BDX6BkuFMhIRc5vtOWtTn3uvAo9lZe7geq+2VzR6K/lsrlpNMNF8dvWtbnvD qdY2yvpezdP1Ryi2wdvhwfbzSmUOCqqmWbiogYCk1Yd0NyE0i2Xg0VdiwW8WAnB+MN0H CzKvn4DRBZylXGwVMBGUF6ectabiFagLjdIiyONb19tcA1JBgfy0ShbGn1bvuvzBKFd+ 0IN7L32+H8F31FsrIFf8hVhfWLvvZsbniJpBeadPvB6r+9bZn40YXxLfu0oEhmN5sXIF fr4g== X-Gm-Message-State: AOJu0YxPcOZ8GkkIsxMMSpm5maE3YHAM9YLwI+xY4p/0sO1Br12FxSuR cn6Dm3nU94FaG9UJwMVpJIhsEATk0Kue4cWd8UY2X7ZxS9p21KnVB/sUnjfPSG40Eu9fMtyYQgV r X-Google-Smtp-Source: AGHT+IH8r14XG3/zaHmoqhlra5JCTb62wDzeiTnkv/NAC3mvAUkfTn10/zUMBhYdhMemAaVVG+V/SQ== X-Received: by 2002:a05:6a21:a585:b0:1a3:6dbb:f072 with SMTP id gd5-20020a056a21a58500b001a36dbbf072mr1174537pzc.8.1711568433464; Wed, 27 Mar 2024 12:40:33 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:32 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 02/10] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Wed, 27 Mar 2024 16:40:16 -0300 Message-Id: <20240327194024.1409677-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The commit 16439f419b removed the static fmod/fmodf on i386 and m68k with and empty w_fmod.c (required for the ABIs that uses the newly implementation). This patch fixes by adding the required symbols on the arch-specific w_fmod{f}_compat.c implementation. To statically build fmod fails on some ABI (alpha, s390, sparc) because it does not export the ldexpf128, this is also fixed by this patch. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. --- math/Makefile | 4 +++- sysdeps/i386/fpu/w_fmod_compat.c | 7 ++++--- sysdeps/i386/fpu/w_fmodf_compat.c | 7 ++++--- sysdeps/ieee754/ldbl-opt/s_ldexpl.c | 4 ++-- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +++-- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 ++++--- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/math/Makefile b/math/Makefile index fb537955fb..964bf2be71 100644 --- a/math/Makefile +++ b/math/Makefile @@ -368,7 +368,9 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = -libm-test-funcs-noauto-static = +libm-test-funcs-noauto-static = \ + fmod \ + # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c index 5ac9995ffd..528bfc2a13 100644 --- a/sysdeps/i386/fpu/w_fmod_compat.c +++ b/sysdeps/i386/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c index cc417e07d3..5a61693e51 100644 --- a/sysdeps/i386/fpu/w_fmodf_compat.c +++ b/sysdeps/i386/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c index 1afbe7d8ad..932cc4341c 100644 --- a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c +++ b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c @@ -17,13 +17,13 @@ License along with the GNU C Library; if not, see . */ -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # define declare_mgen_alias(f,t) #endif #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __ldexpl, ldexpl); long_double_symbol (libc, __wrap_scalbnl, scalbnl); #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c index 527d4fbed2..57f38091e6 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif #include -#ifdef SHARED libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c index 5043586b91..88db07f443 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif From patchwork Wed Mar 27 19:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87734 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7FF14385E45E for ; Wed, 27 Mar 2024 19:41:32 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 4147F385E446 for ; Wed, 27 Mar 2024 19:40:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4147F385E446 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4147F385E446 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568439; cv=none; b=lquwqjMD50ridGY73lmnCJuDIV0Tac0MPEOllbGQQqR2CtLJhDCDR1AXk5enftg+wBXX+EePlqBmUp96sYbUrfwGt4kvpo3f4QxQXcdZU3JA5Z5bH09+1pL5Dt4EsbYrJq92WP/7gBhKzgeVfuZmq2HoUb/4/9NettoAr+dMtQg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568439; c=relaxed/simple; bh=FWgJkfkwseYq7F5C+DGVquhkJLx5vPNk1M7TtjMJhC8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=t3Cj7A3IpakMsvW2WdGzfu2xK7H7uWQ+GzFSQklqJa7M6WYRy7SJ08ZTbgJ1plTBQ6Li6h1HUzX8NyVEENcsshF1IHRRgslxUTDd9C6jmeM6TmlENb1pvArOfltcM7zl1qsPenA4FpMW/iZVM2fKRiI32GR8Tt0hV+O4/G/fsU8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5dcc4076c13so176087a12.0 for ; Wed, 27 Mar 2024 12:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568435; x=1712173235; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dcR2ma1WvOPlvqy70XySXYoVacImk32cK9Z3i7CYpHc=; b=fpJjgSAzzjcpFDCJfbmqTzNXFIzcr27LAnvI7YOJptnc69Mnnxo6HcLUdEYJ+18XQX obrpoj+RGeCbEwO/RGw0GZDgidRAyrVisb3NiVdrowFnvkG/xJ8GAhrUOtRDJBNJu2Re op+fFYQnS9fCESFKTZdDHBGwV56gHeYGE5u3JpHFJanjXDKwbufiQwHV67Ii3r3xJQ2P ULc2REKWodqGQpw3x1YuUP+79/N5kOJv/1MM7c6PsLvvms2Xb81GnXKFcAJUEF82KffC K6wAALKkwZNodkj89OF9e2Cx29ipp1KbPwHT0Hj3o1c8lbck6zIP/YHJ7D5iBhXb48v/ S8Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568435; x=1712173235; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dcR2ma1WvOPlvqy70XySXYoVacImk32cK9Z3i7CYpHc=; b=pBxhF2HgmAgWrT9y61rzA8/yjFwCofA2dJUgko+k51N862CQgCLFF0xmWZR5442tT8 jFoUYuw/saMCJ3abVLW7cvyiwYBw3e58HmavN8UKqa8z7IoGtuyqCi61bfyHq8ZL1rt/ gIXj69UFPaHB3vIeZZB2Fn2ylux3BmsRxh99159dEG+69/zeSOw+7jMhiaXwAngtXQHI ItwVsucixjurxBWl/VEZIoT5xEZnr0mTU2doO77A78SZfZ5RSDTDUeL5Fwmx+ThZ0/2k ctrhh9UDqlkLuGyVzv1OPqVgSUWeCYinfw2oBTrThczjVqIPXGNF5Do1UnWhPeeVt3x7 ffVQ== X-Gm-Message-State: AOJu0YxRKtzURdQSjm5TIIjHf6z8LOL7Ie4uUrqWA8No2d+VX+ANfShi ViT1PgLxuWFXZg6DBOH5OgfVFzWpHoj5dytAZ2fDOHjYmK82EApCsyzUUrTalhw6Ipa0nkrEvhD 6 X-Google-Smtp-Source: AGHT+IHg61vXaYuRx9yfj90d4VtRd+xYSjn8zuaY6fzIdRas43AzJSFWzOOIqb+vmitXT909KeSHfg== X-Received: by 2002:a17:90b:1bc2:b0:2a1:f4ca:dfaa with SMTP id oa2-20020a17090b1bc200b002a1f4cadfaamr323501pjb.13.1711568435616; Wed, 27 Mar 2024 12:40:35 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:35 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 03/10] i386: Use generic fmod Date: Wed, 27 Mar 2024 16:40:17 -0300 Message-Id: <20240327194024.1409677-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The benchtest results shows a slight improvement (Ryzen 5900, gcc 13.2.1): * sysdeps/i386/fpu/e_fmod.S: "fmod": { "subnormals": { "duration": 3.68855e+09, "iterations": 2.12608e+08, "max": 62.012, "min": 16.798, "mean": 17.349 }, "normal": { "duration": 3.88459e+09, "iterations": 7.168e+06, "max": 2879.12, "min": 16.909, "mean": 541.934 }, "close-exponents": { "duration": 3.692e+09, "iterations": 1.96608e+08, "max": 66.452, "min": 16.835, "mean": 18.7785 } } * generic "fmod": { "subnormals": { "duration": 3.68645e+09, "iterations": 2.2848e+08, "max": 66.896, "min": 15.91, "mean": 16.1347 }, "normal": { "duration": 4.1455e+09, "iterations": 8.192e+06, "max": 3376.18, "min": 15.873, "mean": 506.043 }, "close-exponents": { "duration": 3.70197e+09, "iterations": 2.08896e+08, "max": 69.597, "min": 15.947, "mean": 17.7216 } } --- sysdeps/i386/fpu/Versions | 4 ++++ sysdeps/i386/fpu/e_fmod.S | 18 ------------------ sysdeps/i386/fpu/e_fmod.c | 2 ++ sysdeps/i386/fpu/math_err.c | 1 - sysdeps/i386/fpu/w_fmod_compat.c | 15 --------------- sysdeps/ieee754/dbl-64/e_fmod.c | 5 ++++- sysdeps/mach/hurd/i386/libm.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 8 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_fmod.S create mode 100644 sysdeps/i386/fpu/e_fmod.c delete mode 100644 sysdeps/i386/fpu/math_err.c delete mode 100644 sysdeps/i386/fpu/w_fmod_compat.c diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions index a2eec371f1..d37bc1eae6 100644 --- a/sysdeps/i386/fpu/Versions +++ b/sysdeps/i386/fpu/Versions @@ -3,4 +3,8 @@ libm { # functions used in inline functions or macros __expl; __expm1l; } + GLIBC_2.40 { + # No SVID compatible error handling. + fmod; + } } diff --git a/sysdeps/i386/fpu/e_fmod.S b/sysdeps/i386/fpu/e_fmod.S deleted file mode 100644 index 86ac1bcfaf..0000000000 --- a/sysdeps/i386/fpu/e_fmod.S +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Public domain. - */ - -#include -#include - -ENTRY(__ieee754_fmod) - fldl 12(%esp) - fldl 4(%esp) -1: fprem - fstsw %ax - sahf - jp 1b - fstp %st(1) - ret -END (__ieee754_fmod) -libm_alias_finite (__ieee754_fmod, __fmod) diff --git a/sysdeps/i386/fpu/e_fmod.c b/sysdeps/i386/fpu/e_fmod.c new file mode 100644 index 0000000000..3625758f97 --- /dev/null +++ b/sysdeps/i386/fpu/e_fmod.c @@ -0,0 +1,2 @@ +#define FMOD_VERSION GLIBC_2_40 +#include diff --git a/sysdeps/i386/fpu/math_err.c b/sysdeps/i386/fpu/math_err.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/i386/fpu/math_err.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c deleted file mode 100644 index 528bfc2a13..0000000000 --- a/sysdeps/i386/fpu/w_fmod_compat.c +++ /dev/null @@ -1,15 +0,0 @@ -/* i386 provides an optimized __ieee752_fmod. */ -#include -#ifdef SHARED -# undef SHLIB_COMPAT -# define SHLIB_COMPAT(a, b, c) 1 -# undef LIBM_SVID_COMPAT -# define LIBM_SVID_COMPAT 1 -# undef compat_symbol -# define compat_symbol(a, b, c, d) -# include -libm_alias_double (__fmod_compat, fmod) -#else -#include -#include -#endif diff --git a/sysdeps/ieee754/dbl-64/e_fmod.c b/sysdeps/ieee754/dbl-64/e_fmod.c index b33cfb1223..7651cd212a 100644 --- a/sysdeps/ieee754/dbl-64/e_fmod.c +++ b/sysdeps/ieee754/dbl-64/e_fmod.c @@ -175,7 +175,10 @@ __fmod (double x, double y) strong_alias (__fmod, __ieee754_fmod) libm_alias_finite (__ieee754_fmod, __fmod) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __fmod, fmod, GLIBC_2_38); +# ifndef FMOD_VERSION +# define FMOD_VERSION GLIBC_2_38 +# endif +versioned_symbol (libm, __fmod, fmod, FMOD_VERSION); libm_alias_double_other (__fmod, fmod) #else libm_alias_double (__fmod, fmod) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 8f40ddb150..30665f8b1a 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1181,3 +1181,4 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 fmod F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 5d89aaa08e..44932f111d 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1188,3 +1188,4 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 fmod F From patchwork Wed Mar 27 19:40:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87738 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21947385ED4F for ; Wed, 27 Mar 2024 19:42:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 8F30B385DC0F for ; Wed, 27 Mar 2024 19:40:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F30B385DC0F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F30B385DC0F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568442; cv=none; b=nElRzcrFwaxAEbJ0Kji/7GBVAVr4j0Moj8T+Fv3IYRXIwWEQZxmjXnqTJZrPqPsAfzaRF5beAKNSVJ6DPL8GGPz0zwQnFX0hsmbI7WBFQuoON6ZPSx5JesxWBsdPt34w7t9QTMqxaJfE1yHIWMpHP/Dv+Xrzt05r4tSUkMXok4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568442; c=relaxed/simple; bh=Lj4xaog2tdjPc2qDBaWYQmFkmaPXpB5xrXtcNLqjTv8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=MGJAdQ7dKsbhwY+XqHbPMmtGbvHbVd/PeJxDOP+erGVdv195PbWOM9ClyYIBkQlRI0k5Mw7pKixjR5YHtVcIJJF+bU8mqlfmtY+MBq0t0LbZZ9TAKuL9/zRF5TFXiGJL0xtlkhBYE6YIkGh0y4FnmC7mdV28lSIrAiECRI56rl4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5ce9555d42eso71945a12.2 for ; Wed, 27 Mar 2024 12:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568438; x=1712173238; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xxVrNOvOe0mPi/BVXSb7kTUlPxIfJx2Q3Oom6CeE+A8=; b=dgkNLtdmk5dChd/ogS32q/1rhlS4XoOFTBnaQayoEbcOJWKwYTErws/ubnmDYUzRXf Jhpp8PGz4OoeY+gdVvnBuDn3aR/tzp4ghRuhzjool/ldIaKlTX7Auak4kM/oHJ9VZBxa 2+dw1W9bQmrzWGriLB370A8//rk+ZEmk08I0GL0UNpjiy4tFwiDkxkE5lTPdYdmDLYb5 yQG5o1uE9jHlHiQ6dsOAmEdYvGM/Qcj3T1u1AcxqnOINe7yf9SaOLYx6Jtps/Sz/SNID eWZCGV+GJBAgtL3b+DS1MtIn5f99r6l0jtqHbFMt6afNk16Ntm/bFWI2BZxp+NI23owJ IvJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568438; x=1712173238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xxVrNOvOe0mPi/BVXSb7kTUlPxIfJx2Q3Oom6CeE+A8=; b=D1KbrLofB6iafR7Bs1JGqHIaWNhwbxn4BSLJ0mQUB5Hqf0aZY1NJWOiPPnemZ5l20n nOCL0+XALDf73h0IHe/WgGNB1qFKudOIT3bBznsoe0+AirmedjR8G20nxRV+GZ8+flTT IwCH/fEpnt+bV1dWy4SeAiEbtbpq8CENtjVraFoKgUqmVZAleo8/BAFhk83u2SEtyrBm hrVLzhg45hWxvc/Tgt8ogo3Au6N6t1HkwbFtltyghBJ4D4gDUjUCkji3YOh3/ASrz64n RBIdUrqf+F6WBUUCeWM8MPib29AMiUpb+No9vvVGyUadPeyMuJplAiLpZzoESlp/ncgh pruw== X-Gm-Message-State: AOJu0Yzt1qT3Q6aZY41U1h/O8r/Mik6lxSksD0OUQQ4arNeKDfrXOGxi McCyXsnE+w4GH6uGGNsiAkrjSSpTQyeTAXBwGBAkuCKMq++NB3HzKmey6X5yBNbFXbZ1tY+EV0f P X-Google-Smtp-Source: AGHT+IF8SeMuF9868/1ThbF3OgDOGfEnFdeMa1lkL1BNV9B+VvzjdXo7kN6k5QFj2Z0qKqqki4+JHw== X-Received: by 2002:a17:90a:df18:b0:29b:b28d:ac66 with SMTP id gp24-20020a17090adf1800b0029bb28dac66mr773158pjb.5.1711568437832; Wed, 27 Mar 2024 12:40:37 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:37 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 04/10] i386: Use generic fmodf Date: Wed, 27 Mar 2024 16:40:18 -0300 Message-Id: <20240327194024.1409677-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The resulting performance is similiar (Ryzen 5900, gcc 13.2.1): * sysdeps/i386/fpu/e_fmodf.S "fmodf": { "subnormals": { "duration": 3.68732e+09, "iterations": 2.2912e+08, "max": 71.447, "min": 15.836, "mean": 16.0934 }, "normal": { "duration": 3.75848e+09, "iterations": 5.5296e+07, "max": 273.208, "min": 15.725, "mean": 67.9702 }, "close-exponents": { "duration": 3.69035e+09, "iterations": 2.07872e+08, "max": 64.454, "min": 15.762, "mean": 17.753 } } * master "fmodf": { "subnormals": { "duration": 3.6863e+09, "iterations": 2.23616e+08, "max": 65.453, "min": 16.243, "mean": 16.485 }, "normal": { "duration": 3.71129e+09, "iterations": 5.3248e+07, "max": 281.57, "min": 16.169, "mean": 69.6983 }, "close-exponents": { "duration": 3.70274e+09, "iterations": 2.03776e+08, "max": 81.474, "min": 16.206, "mean": 18.1706 } } --- sysdeps/i386/fpu/Versions | 2 +- sysdeps/i386/fpu/e_fmodf.S | 18 ------------------ sysdeps/i386/fpu/e_fmodf.c | 2 ++ sysdeps/i386/fpu/w_fmodf_compat.c | 15 --------------- sysdeps/ieee754/flt-32/e_fmodf.c | 5 ++++- sysdeps/mach/hurd/i386/libm.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 7 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_fmodf.S create mode 100644 sysdeps/i386/fpu/e_fmodf.c delete mode 100644 sysdeps/i386/fpu/w_fmodf_compat.c diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions index d37bc1eae6..9509f9b7c7 100644 --- a/sysdeps/i386/fpu/Versions +++ b/sysdeps/i386/fpu/Versions @@ -5,6 +5,6 @@ libm { } GLIBC_2.40 { # No SVID compatible error handling. - fmod; + fmod; fmodf; } } diff --git a/sysdeps/i386/fpu/e_fmodf.S b/sysdeps/i386/fpu/e_fmodf.S deleted file mode 100644 index f73ce9da1e..0000000000 --- a/sysdeps/i386/fpu/e_fmodf.S +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Public domain. - */ - -#include -#include - -ENTRY(__ieee754_fmodf) - flds 8(%esp) - flds 4(%esp) -1: fprem - fstsw %ax - sahf - jp 1b - fstp %st(1) - ret -END(__ieee754_fmodf) -libm_alias_finite (__ieee754_fmodf, __fmodf) diff --git a/sysdeps/i386/fpu/e_fmodf.c b/sysdeps/i386/fpu/e_fmodf.c new file mode 100644 index 0000000000..15a0f960bf --- /dev/null +++ b/sysdeps/i386/fpu/e_fmodf.c @@ -0,0 +1,2 @@ +#define FMODF_VERSION GLIBC_2_40 +#include diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c deleted file mode 100644 index 5a61693e51..0000000000 --- a/sysdeps/i386/fpu/w_fmodf_compat.c +++ /dev/null @@ -1,15 +0,0 @@ -/* i386 provides an optimized __ieee752_fmodf. */ -#include -#ifdef SHARED -# undef SHLIB_COMPAT -# define SHLIB_COMPAT(a, b, c) 1 -# undef LIBM_SVID_COMPAT -# define LIBM_SVID_COMPAT 1 -# undef compat_symbol -# define compat_symbol(a, b, c, d) -# include -libm_alias_float (__fmod_compat, fmod) -#else -#include -#include -#endif diff --git a/sysdeps/ieee754/flt-32/e_fmodf.c b/sysdeps/ieee754/flt-32/e_fmodf.c index ef95c05800..78071df756 100644 --- a/sysdeps/ieee754/flt-32/e_fmodf.c +++ b/sysdeps/ieee754/flt-32/e_fmodf.c @@ -173,7 +173,10 @@ __fmodf (float x, float y) } strong_alias (__fmodf, __ieee754_fmodf) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __fmodf, fmodf, GLIBC_2_38); +# ifndef FMODF_VERSION +# define FMODF_VERSION GLIBC_2_38 +# endif +versioned_symbol (libm, __fmodf, fmodf, FMODF_VERSION); libm_alias_float_other (__fmod, fmod) #else libm_alias_float (__fmod, fmod) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 30665f8b1a..88e7538e51 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1182,3 +1182,4 @@ GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F GLIBC_2.40 fmod F +GLIBC_2.40 fmodf F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 44932f111d..c99c60161d 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1189,3 +1189,4 @@ GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F GLIBC_2.40 fmod F +GLIBC_2.40 fmodf F From patchwork Wed Mar 27 19:40:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87741 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B0164385843A for ; Wed, 27 Mar 2024 19:42:57 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id A3032385843A for ; Wed, 27 Mar 2024 19:40:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3032385843A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A3032385843A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568445; cv=none; b=Y5K0J1QYzlH+LZNay6MI2+2RJ+ZAjMh0MlGSKEdJyJv3IuLbqoaHWbh2JsGbS2R3dGm3NuibHWPMmKfzfLVIEzp4Ti6dFq+JTrXRstbX+2NpC/5aBxxpBrA+EJunm9Sbiaf5f3YSixeoZXYTYZUJ8vohZFyOTst8CrUOlrTI51c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568445; c=relaxed/simple; bh=wHbvmdicYImSDZMFciUEE4a81Gu6In5X3H4kMS5X25o=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=x/qWmQu5sU9UnvPHnF7pZQil2gmF4alfCQWM5fDh9EltJCow1zIjrXzO7nTgULpC2c62kTUru/cLeOcnPxbjT16ePS4F9f+7Eaeean5u55du/t2V7uuTwT/GeSHg7QSNcF3XfuyjYZTtA/lRuyp/K3DGuIvqzLsJOLIG2MMnQic= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-5cdbc4334edso73058a12.3 for ; Wed, 27 Mar 2024 12:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568440; x=1712173240; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DnjP5zBH6db4XAECtZPSD0FlQ9mZafYAi0YvzhHcxqE=; b=Xml/TaQx1qN4IaZ2Ypp5DTljZI0T2cTJnEyyMJI2DUAr74T7tIuQo63XaxmxibZJL2 66ZYdawo32+TC1VrZVR/H/7OMThaVbSUgFbsCC35GaU5O1g3D+9mT37Nv5rcBQqC39aU /xETC2/jXkvO6cJBNF78eEWemRDVuDdixRuHriHyXzV4yddd+sK5wyq84B6D10aaJvs5 KdbR/e0+BEQuLfInst8d4ZMgxAUCyLZ1y6uVq9MEbbWwmCxpYe5QdcLlM8DR1LS7j28B s0WT4QOrdnXSWA/RNRp/bscdFNHqhVPFwqcKrE2N8okWDvAqM3QMLobdC6H0nN9IQVcj rPPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568440; x=1712173240; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DnjP5zBH6db4XAECtZPSD0FlQ9mZafYAi0YvzhHcxqE=; b=S3H/tJkGJlf19OilhkovGsfA39NNFN4jTZU8DSGqZDkQeuSsaTG03hRDGvX7YBnSJl EazktXIwNCk3RnunPeeubvS3sVfu2RI6cN5ju/l3bZHgDHufqg/CAv6w+oyRKwov4ZRe fHZjvzqXiPuk50AqQw1wPOUmyG4ZoSYEaxtRpbv5ktfTQ3BZ5aFqG3dk6vUNjgA9Qfjg LMdlj2yxJ2qDps1fpryyB2vdjo6+FRi+IlMDFBKVmYnnHiCEEHsQuxvH3RkN5jd/D6wb 5qDTAESnkmptzHVmgTomrkgoBHdoPK+aDcgS35TRRLtPuZTUOUsvQQfaPfYXIqSGhlFW Ie0w== X-Gm-Message-State: AOJu0YxhIKeruK+kj4bq6ay3W17YmV3YO3UttMDI4kkLqq9bM0WQ6TMs pHVPD+ZLF+Vaa7bsedrGJuEvoPBDBiT1na+VIGkZusHIHDDRAHRFQKTufFtqhf9NkyRtDnP+VP6 K X-Google-Smtp-Source: AGHT+IH0oqffNyL0N+6isy728TEAYuW+2kllsE+Gw+csBDTy2wbSCO7swZg9o2Tkg8nSs7n9HbZ+dA== X-Received: by 2002:a17:90b:4001:b0:29b:aee2:cc8f with SMTP id ie1-20020a17090b400100b0029baee2cc8fmr726245pjb.9.1711568439973; Wed, 27 Mar 2024 12:40:39 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:39 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 05/10] math: Fix i386 and m68k exp10 on static build Date: Wed, 27 Mar 2024 16:40:19 -0300 Message-Id: <20240327194024.1409677-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The commit 08ddd26814 removed the static exp10 on i386 and m68k with an empty w_exp10.c (required for the ABIs that uses the newly implementation). This patch fixes by adding the required symbols on the arch-specific w_exp{f}_compat.c implementation. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. --- math/Makefile | 4 +++- sysdeps/i386/fpu/w_exp10_compat.c | 9 +++++++-- sysdeps/m68k/m680x0/fpu/w_exp10_compat.c | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/math/Makefile b/math/Makefile index 964bf2be71..f1d210797d 100644 --- a/math/Makefile +++ b/math/Makefile @@ -367,7 +367,9 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ -libm-test-funcs-auto-static = +libm-test-funcs-auto-static = \ + exp10 \ + # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ fmod \ # libm-test-funcs-noauto-static diff --git a/sysdeps/i386/fpu/w_exp10_compat.c b/sysdeps/i386/fpu/w_exp10_compat.c index b53455386e..49a0e03385 100644 --- a/sysdeps/i386/fpu/w_exp10_compat.c +++ b/sysdeps/i386/fpu/w_exp10_compat.c @@ -1,3 +1,8 @@ /* i386 provides an optimized __ieee754_exp10. */ -#define NO_COMPAT_NEEDED 1 -#include +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include +#else +# include +# include +#endif diff --git a/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c b/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c index 0d3e718626..350f2e4b4d 100644 --- a/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c @@ -1,3 +1,8 @@ /* m68k provides an optimized __ieee754_exp10. */ -#define NO_COMPAT_NEEDED 1 -#include +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include +#else +# include +# include +#endif From patchwork Wed Mar 27 19:40:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87735 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 112093860006 for ; Wed, 27 Mar 2024 19:42:01 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id D2A5E3858C31 for ; Wed, 27 Mar 2024 19:40:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2A5E3858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2A5E3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1029 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568447; cv=none; b=CPKIl+nnNpLBLlk/WL7dxFX9AdJQv/UyIfZP7xQh/04Q4DWfajzOu1zSRce4cvXSJ/eU5IHDKBjn+sBw/kMPTVApwboTfvYG8rzV7j4i3Ug6wjfnso0AUbbMOK356RCW5nczX6SoEBdkmCyMLvgcO4LL2qyURcyb9vPuKASJd4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568447; c=relaxed/simple; bh=7lsd+JEB6OXhLwzIRmgXKA+7kg76cGxq/9jNxZ2FcCw=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=uLMKTNDJBAZW9s9BZMQZ+6nKvX4wqFKHFTMQJCasclJqDWtfo30rb1c6cFsgIBmqKQxtJLlpPKBRsOuk+5hkBa9ZwE+gxGIjX3/m1LtmvA2KYtUBeuAHvM7WyRhNyuv2bIfKPJ3zqBwhlwwV69zEewruuzMRiTpy20AZ28Xl8N4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-29e0229d6b5so190473a91.3 for ; Wed, 27 Mar 2024 12:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568442; x=1712173242; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3gTSKqePJhhgVkKF2Oni/s3e8N6TubY4O/UTslyMKiM=; b=iUWOkDWAwntfN4m1j33YvcIzLJJ+drr9fZBRqCgrqDsigrTnUgWYBGcWzmblabFaGS YofY6Jlx3xgV7h5iOGrmg6BZ5vwol4L39GW5avj7C0sPcKp7MbhqvpGtLxLu6f7QLYFb XhsSbZciPowwIYiKzXi/N+/wHKYMj3OYONVmpKtOXjf18A23JQIskP1qbXTr0U/Is0HB MnW7zKyRXaAS7QZfcBUq6pAavHBta4XoZIM5wQLbIJcB8F+iJAEMCUD57vWbMxvET+AV TVcGt6eZnO3KSiCE46IfWZ2YOa50j2YA1prJL05ocDqx6a7oqzTnEroh6Lg0Woqiy+cx v56w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568442; x=1712173242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3gTSKqePJhhgVkKF2Oni/s3e8N6TubY4O/UTslyMKiM=; b=sG7vObilIhJxGEAirdt9bkD+ULq5lkkfgGlUDiC60+wkeQ+l6FMgOvnl1K3p4ibVJR xn7X/LbU4js8aB3UCZFAeQjdq5BBmPj44qbtqtA9kpOSyfahwSx8/T2fERSqH2WqCAC5 SVQSDl9It1fxqIF+poHqFLsraiVBk8H1iY+2QoJZxO+/fjfUYBtYjDhJcLYAiuThNtsN VPYPqBpeilD2P9B5Z4XHJ28IywQvreJssv6U5QCdpzekHBosW9Fh3vlLW7qNpZHpjQ1g CJNI0C4iIjzcbUXtFNniO7l5tToOTmjXEx7H8w2pQ4IPCwlCIZ+fIrZYQv1p8xfwNEF7 7Pcw== X-Gm-Message-State: AOJu0YwIW/gIz/vcy5ekr4+ZAopcMEoVYjdj8xdayHxHIfY3yHdsP6UK zVZY8gqi0XXwPhEIftfC/fAec/xgOjAXEPIhwECw9hZ50jmmulVAXjTspRAKFGOxzTk0iOwrsM2 S X-Google-Smtp-Source: AGHT+IEqY6fZIIwwl8My87CCRWuE13hZzBLIFzcotKhTy+UnRrarZPX12LMoY4mS6LNJJf68uI+XyA== X-Received: by 2002:a17:90b:4c0f:b0:2a0:6bca:960d with SMTP id na15-20020a17090b4c0f00b002a06bca960dmr662737pjb.2.1711568442476; Wed, 27 Mar 2024 12:40:42 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:41 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 06/10] i386: Use generic exp10 Date: Wed, 27 Mar 2024 16:40:20 -0300 Message-Id: <20240327194024.1409677-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The resulting performance is slight better (Ryzen 5900, gcc 13.2.1): * master "exp10": { "": { "duration": 3.70091e+09, "iterations": 5.8534e+07, "max": 91.279, "min": 62.6225, "mean": 63.2267 } } * patch "exp10": { "": { "duration": 3.70793e+09, "iterations": 6.328e+07, "max": 259.592, "min": 52.1145, "mean": 58.5957 } } Checked on i686-linux-gnu. --- sysdeps/i386/fpu/Versions | 1 + sysdeps/i386/fpu/e_exp10.S | 51 ----------------------- sysdeps/i386/fpu/e_exp10.c | 2 + sysdeps/i386/fpu/e_exp_data.c | 1 - sysdeps/i386/fpu/w_exp10_compat.c | 8 ---- sysdeps/ieee754/dbl-64/e_exp10.c | 7 +++- sysdeps/mach/hurd/i386/libm.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 + 8 files changed, 10 insertions(+), 62 deletions(-) delete mode 100644 sysdeps/i386/fpu/e_exp10.S create mode 100644 sysdeps/i386/fpu/e_exp10.c delete mode 100644 sysdeps/i386/fpu/e_exp_data.c delete mode 100644 sysdeps/i386/fpu/w_exp10_compat.c diff --git a/sysdeps/i386/fpu/Versions b/sysdeps/i386/fpu/Versions index 9509f9b7c7..7326f25583 100644 --- a/sysdeps/i386/fpu/Versions +++ b/sysdeps/i386/fpu/Versions @@ -5,6 +5,7 @@ libm { } GLIBC_2.40 { # No SVID compatible error handling. + exp10; fmod; fmodf; } } diff --git a/sysdeps/i386/fpu/e_exp10.S b/sysdeps/i386/fpu/e_exp10.S deleted file mode 100644 index 902f70b77f..0000000000 --- a/sysdeps/i386/fpu/e_exp10.S +++ /dev/null @@ -1,51 +0,0 @@ - -#include -#include -#include - -DEFINE_DBL_MIN - -#ifdef PIC -# define MO(op) op##@GOTOFF(%ecx) -#else -# define MO(op) op -#endif - - .text -/* 10^x = 2^(x * log2(10)) */ -ENTRY(__ieee754_exp10) -#ifdef PIC - LOAD_PIC_REG (cx) -#endif - fldl 4(%esp) -/* I added the following ugly construct because exp(+-Inf) resulted - in NaN. The ugliness results from the bright minds at Intel. - For the i686 the code can be written better. - -- drepper@cygnus.com. */ - fxam /* Is NaN or +-Inf? */ - fstsw %ax - movb $0x45, %dh - andb %ah, %dh - cmpb $0x05, %dh - je 1f /* Is +-Inf, jump. */ - fldl2t - fmulp /* x * log2(10) */ - fld %st - frndint /* int(x * log2(10)) */ - fsubr %st,%st(1) /* fract(x * log2(10)) */ - fxch - f2xm1 /* 2^(fract(x * log2(10))) - 1 */ - fld1 - faddp /* 2^(fract(x * log2(10))) */ - fscale /* e^x */ - fstp %st(1) - DBL_NARROW_EVAL_UFLOW_NONNEG_NAN - ret - -1: testl $0x200, %eax /* Test sign. */ - jz 2f /* If positive, jump. */ - fstp %st - fldz /* Set result to 0. */ -2: ret -END (__ieee754_exp10) -libm_alias_finite (__ieee754_exp10, __exp10) diff --git a/sysdeps/i386/fpu/e_exp10.c b/sysdeps/i386/fpu/e_exp10.c new file mode 100644 index 0000000000..340254fc6e --- /dev/null +++ b/sysdeps/i386/fpu/e_exp10.c @@ -0,0 +1,2 @@ +#define EXP10_VERSION GLIBC_2_40 +#include diff --git a/sysdeps/i386/fpu/e_exp_data.c b/sysdeps/i386/fpu/e_exp_data.c deleted file mode 100644 index 1cc8931700..0000000000 --- a/sysdeps/i386/fpu/e_exp_data.c +++ /dev/null @@ -1 +0,0 @@ -/* Not needed. */ diff --git a/sysdeps/i386/fpu/w_exp10_compat.c b/sysdeps/i386/fpu/w_exp10_compat.c deleted file mode 100644 index 49a0e03385..0000000000 --- a/sysdeps/i386/fpu/w_exp10_compat.c +++ /dev/null @@ -1,8 +0,0 @@ -/* i386 provides an optimized __ieee754_exp10. */ -#ifdef SHARED -# define NO_COMPAT_NEEDED 1 -# include -#else -# include -# include -#endif diff --git a/sysdeps/ieee754/dbl-64/e_exp10.c b/sysdeps/ieee754/dbl-64/e_exp10.c index 225fc74c4c..c63b852f72 100644 --- a/sysdeps/ieee754/dbl-64/e_exp10.c +++ b/sysdeps/ieee754/dbl-64/e_exp10.c @@ -99,7 +99,7 @@ __exp10 (double x) /* Reduce x: z = x * N / log10(2), k = round(z). */ double_t z = __exp_data.invlog10_2N * x; - double_t kd; + double kd; int64_t ki; #if TOINT_INTRINSICS kd = roundtoint (z); @@ -147,7 +147,10 @@ __exp10 (double x) strong_alias (__exp10, __ieee754_exp10) libm_alias_finite (__ieee754_exp10, __exp10) #if LIBM_SVID_COMPAT -versioned_symbol (libm, __exp10, exp10, GLIBC_2_39); +# ifndef EXP10_VERSION +# define EXP10_VERSION GLIBC_2_39 +# endif +versioned_symbol (libm, __exp10, exp10, EXP10_VERSION); libm_alias_double_other (__exp10, exp10) #else libm_alias_double (__exp10, exp10) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 88e7538e51..01c5633663 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1181,5 +1181,6 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 exp10 F GLIBC_2.40 fmod F GLIBC_2.40 fmodf F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index c99c60161d..3413cfdbe7 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1188,5 +1188,6 @@ GLIBC_2.35 fsqrt F GLIBC_2.35 fsqrtl F GLIBC_2.35 hypot F GLIBC_2.35 hypotf F +GLIBC_2.40 exp10 F GLIBC_2.40 fmod F GLIBC_2.40 fmodf F From patchwork Wed Mar 27 19:40:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87740 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BAD77385E82F for ; Wed, 27 Mar 2024 19:42:51 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 8F4DD3858427 for ; Wed, 27 Mar 2024 19:40:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F4DD3858427 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8F4DD3858427 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1036 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568448; cv=none; b=MAUo+ZGGhyZi6dGlIe93mP2Ym15IjIhsqnizoUCRLy3QQDf0S5fLNjWSTB6V4Wp3Xclk42nDvQNPAanW1coHw772ELZ/tThc565TPHVngckM1/AIudsX/b8p+7HlJZtGGAH+TT/8rFJkz+opBwLu0d0jjxfJow82SM8w+ly8S2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568448; c=relaxed/simple; bh=V2QOHmynST+A06BJ1vVs7hRXKEsIYCDGCjaalv4frLA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Y3j0iod9p/vbeHuLn/QS2/oWvxQY85zGJHeZkIBmuD2Affclpor0vtBhvVTIWJYlvImethCL18kmCao0NSfI8xSXLPtWp2ZR0bAr4c5aEPQ5md39hzmSMGz10M9aDBxgZriB12a2lWWA6r5kdyWBN2cYqDgfjHY6NbeSad6CbmQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-29dee60302fso956988a91.1 for ; Wed, 27 Mar 2024 12:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568445; x=1712173245; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b/uJsYX5TjTzzmu5D77iSjXX+egw1x7sUXQBSMn9NVQ=; b=ZFTOjJEo4puhIjIb8HbKVzPEGuq9v0PIkET+qdIcVA8d5Aoc11fq+VFzi5p2YPAb3A 856iw5idvrIcrxx1xGZ4B38eO6mpEIPQyux8JbKYlq7eYD2ZkaPOqj1GjyWGDhNLad+e 4HZMpTYm54ZVqlQUeLIM40uq3yl/+JvWJmVaELBYyVLcE2M6JdIS5nQEjnqSpMi9XNzV 0D684DaHZh22rPLPLmUpFhbbZ2t/3ofRLmbGXmJ9D8uPs7W03lRw3CWG5aD5dxnWkqDY a2iBti1Hq1P0z5i2cR4ZAbMYX56P0jf4rR79mVstyC5AXFUcSCpU5QDHSA3+FXO4DMOz Zd7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568445; x=1712173245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b/uJsYX5TjTzzmu5D77iSjXX+egw1x7sUXQBSMn9NVQ=; b=FOeNUGGAyFx6RwklDmLoTKFWOvnAJp9vh+zbEP5MteQ/gx9lqat3DutUW+ekNRhUzd Debd9Yexbj5EZ/ITc0xNZdHKhXe04q7iznZ1DmnTzBAQfPLB58ghNmXRdTK3MKd0Vsrr ZEQGI5+70HCNw4F+oFJj1UDVrbqB9izRt2LOB5oT73sWp4WwdCxlT652JAaKAE9YrrjF eNfz4AftIdREVTurrABfhC6ET8e7KTd3dSxM62tCOvTW/nVgEUkIc4SLEuk/9bLiT02B zgxJ2TKm2EiKN7Ca2dIUoHru68i+eoxuPk3EJ/kT3CcCDohK8UyBnD+GnTmwUl1sqlry JyRw== X-Gm-Message-State: AOJu0YwkGyvV/y98liSL3DT3RvVk+45vDvxAXiHCBQOt/pWsMJaJ8ISI ZD0beiTe2NIxTFdKltB2ZZFZjCnrtYp9Redf5CzEV3buaz22i3mE6pha+Ip1+JeVac7WeA4Xecf d X-Google-Smtp-Source: AGHT+IH1JAhnAfdGv4OBko0/VQNZk+M5JdnUhA5VBPXEBSeU3TggdGEhO0iA0MAEyrfDS0TTV2mmrw== X-Received: by 2002:a17:90a:990e:b0:2a0:4ef8:182a with SMTP id b14-20020a17090a990e00b002a04ef8182amr278626pjp.21.1711568444717; Wed, 27 Mar 2024 12:40:44 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:44 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 07/10] math: Fix isnanf128 static build Date: Wed, 27 Mar 2024 16:40:21 -0300 Message-Id: <20240327194024.1409677-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Some static implementation of float128 routines might call __isnanf128, which is not provided by the static object. Checked on x86_64-linux-gnu. --- math/Makefile | 1 + sysdeps/ieee754/float128/float128_private.h | 2 +- sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/math/Makefile b/math/Makefile index f1d210797d..516fa72a26 100644 --- a/math/Makefile +++ b/math/Makefile @@ -372,6 +372,7 @@ libm-test-funcs-auto-static = \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ fmod \ + isnan \ # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h index 38a8bdd0fe..672bf3cccf 100644 --- a/sysdeps/ieee754/float128/float128_private.h +++ b/sysdeps/ieee754/float128/float128_private.h @@ -352,7 +352,7 @@ #define frexpl frexpf128 #define getpayloadl getpayloadf128 #define isinfl isinff128_do_not_use -#define isnanl isnanf128_do_not_use +#define isnanl isnanf128 #define ldexpl ldexpf128 #define llrintl llrintf128 #define llroundl llroundf128 diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c index 59f71533ce..b73a4e80d7 100644 --- a/sysdeps/ieee754/float128/s_isnanf128.c +++ b/sysdeps/ieee754/float128/s_isnanf128.c @@ -11,7 +11,11 @@ #include "../ldbl-128/s_isnanl.c" #if !IS_IN (libm) #include +#ifdef SHARED hidden_ver (__isnanf128_impl, __isnanf128) +#else +strong_alias (__isnanf128_impl, __isnanf128) +#endif _weak_alias (__isnanf128_impl, isnanl) versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34); #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34)) From patchwork Wed Mar 27 19:40:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87739 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC5FB385E453 for ; Wed, 27 Mar 2024 19:42:31 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by sourceware.org (Postfix) with ESMTPS id 3084A385E037 for ; Wed, 27 Mar 2024 19:40:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3084A385E037 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3084A385E037 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568451; cv=none; b=B7N4M6lrkQR5au1rtAotXgX6WONeasC3ZLBwzpR6CtWmAPqsBtHj8PVgQ0ZIEGg+AnZx+c8Mj+V+94nzQsDnJ8uGT7Kb3I8OQw6kKiGkPeSar1uwJ1Z1/IYaOO94WeKFL5whbh3n3UH2G+s2P2PE1YfKCqdeHU933oez362zzo0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568451; c=relaxed/simple; bh=wX45uKGaEumacqHgV0XE5fPzRX3klc784/S2m/Ik2O4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=xvYxfyhvAk9tMj4oLQluLQT7PrkrkAeom5a8hXUGjp37Wqd9TueNC9Yz2I9txjLq9CIy7yrteopz30WMg2f18vmpGDBgc0TUM0V7ry6vgS5WQ3JKQcSxOC9VdnnPcwhWXrVK9BnIVfnSeBwAIFWAhx7ii5vZwuspKlidxyfHnI4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-29a8911d11cso195485a91.1 for ; Wed, 27 Mar 2024 12:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568447; x=1712173247; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mgzBHY8eIbS5Bsjmn6NMaIRe85fsSw17SEUeNUUQPqk=; b=KlsQkKHP59w9qgd+WmSETmF7Nyoshye0WrkNSnI144qK3X+M3NNBZ/YktlkJDBckG5 GUydthUjNxngoVhkZJb8HEjh1+ZgYUdYyAB6tsgr6ok4peuQPYAgL+TP44aRpTZ+k4g9 AGDURXDHnPyZcOCbvgtzFwdufUfKM5HKoczIleSoeEkw2PiHAYI0OHhJi3cYeFHKeE9X haMe972JULuf3WpwbaLVss9+7ZANMHL8I7Bpgfg0i+p7d7mMWBq+2f0kbJ6Lzu5mR1gr 3fBjs33YQcDy3eJxgQjJClYwdvytk80SlPsFfcLG7gHlJ47CLBjE/xXJCWnC60pZHJLH lSQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568447; x=1712173247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mgzBHY8eIbS5Bsjmn6NMaIRe85fsSw17SEUeNUUQPqk=; b=tTQvDS+DWCIlf8TRvD+51a6yWH2ngH7C5TGC+0uIiBDyI+IQTbALsz0AICrS6IvDmH rLQweW+23Ti5JnHk0RvvRkfvO+TyC3LStetfmeqbY8edL78rjyvWGSruq1KDOrEPfA1C ZCtTGsQCxGCE53MMQ/QpeYulE6+oplo00FGBg+ehHRUkeRSRV+2oJyDUHEbwcm0JkSBR 40SPY+i+avF374OKSAcF2fW/N4/DF3EMige5jzyVoBJ1kgPE6bGn9MKVmceUw97VFrOs KquvH5aA0IJ69D5wcwxnjeFZC5O0EidlRA+D/OiFI07t9IpBvBTW+Z8QDrXrA4azom3x 1OTQ== X-Gm-Message-State: AOJu0Yxf4ydgknyNU3zpskZEBM7sRAVXHckJrwvLa1dtMWCD+Ok9i3ML 24Y86sQNduFSuw3/gpIPRJ4nwOBi/2CtbqU1Az7f7vzLKMsacFVh+W9RBFRrwCMw3u7dF9+sNPF H X-Google-Smtp-Source: AGHT+IE5y2Ar03nkfKXdwa8nIrROnDM6W+gqZMaSrh0IzYkIXloABCuIKqwhBcG9pLK1+EHm0g1S4Q== X-Received: by 2002:a17:90a:7f98:b0:2a0:4008:2ac1 with SMTP id m24-20020a17090a7f9800b002a040082ac1mr679087pjl.26.1711568446801; Wed, 27 Mar 2024 12:40:46 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:46 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 08/10] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:22 -0300 Message-Id: <20240327194024.1409677-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Checked with a static build for the affected ABIs. --- math/Makefile | 1 + sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index 516fa72a26..61736159d1 100644 --- a/math/Makefile +++ b/math/Makefile @@ -371,6 +371,7 @@ libm-test-funcs-auto-static = \ exp10 \ # libm-test-funcs-auto-static libm-test-funcs-noauto-static = \ + copysign \ fmod \ isnan \ # libm-test-funcs-noauto-static diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c index 11b42d04ba..80137847d3 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c @@ -1,10 +1,10 @@ #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __copysignl, copysignl); #endif From patchwork Wed Mar 27 19:40:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87742 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE56A3858C98 for ; Wed, 27 Mar 2024 19:43:16 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 1AE903858C55 for ; Wed, 27 Mar 2024 19:40:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AE903858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1AE903858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568452; cv=none; b=GsBg5GQoGsSsBTou1pdPUfPZ8o3Daer8A9nhsKgsm+OvrEJaBOQqav1PeMBCIby9WcHAI+/dL1Nw5KYxitLvQTKw5iFkRkFNYNhk7dxZRCoIbZcdiwjnFl9rwpjFMZ3Qp2biJENwBNExITH7noN/4DnGFAkuv7jksVgWGtOmqgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568452; c=relaxed/simple; bh=zK0STUkqWkMaFV4Mjh7D4y4NBZjYZDhFN7KQsB6A7eI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=oywvRkm6ellQuXoZ0Fut01qv/Rrh8HJraU79cZwX9W2lMYJTeP49j+kmqEsaulFt+rRqVMiqY8ITtJknoYC0zvzWCo4QyCoNDmNRsN2QlqaBl3lN4mMd7CXQG+8a9UKnroQSZAa+F9MTZcJv35feLBGfN5v3yi+yDo8T+looXkc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5c229dabbb6so113146a12.0 for ; Wed, 27 Mar 2024 12:40:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568449; x=1712173249; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=arRKjEUA9fLaWUU6cs4FH4l0x0zrMQFWVGEvxXC82/M=; b=V0GffipUvQ0G6Gk3KDnKLqFgVeRLgYMU47l4Jm8Nh6d85Kmd7kz+xw3Mo5A1r2gQ2x F5b0baSIOxwxCNui4uvH3iuGnAz3vn37l6FfDow7P3qh0MozNEVvbn/4yogwillMyJJs vcldIjn4n/12mZsTMlFd1nhK8WtTgIAHO9OAk9af6LaiBoQ0b5MvDDHTbjEn5pHPq6Ju SR05nmj8xh3N0nHNBwGzDUbKJ0SZX27pFVplV0CKX3XcD3ORxA2Wb9FjGOmbeA4gPrZw 1vkhc3OqP2Wl9ArQjANyFUrvl1/+BAzcTQW6U5CqJUK8hGloABVl4p0bgrHxqODBhA6y Prpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568449; x=1712173249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=arRKjEUA9fLaWUU6cs4FH4l0x0zrMQFWVGEvxXC82/M=; b=GzpfG16ZknkkNVlsU5ZwMdDGGZmAU5hmSF+d3sgBCV7tm1blH8huPfwhAo9zBrvct2 G/lGLEvueeq+xh6HUfSFzVFN0XEYZvM3chkDydNv3lUdluhuBWCeDzZ0fpMWGnsH6tT0 twT8rflk3+aWxAgx1wzFqXN44JZlP9/RS6Ws6vYq/jxo2zETPKaQZtd53Bjm1QGcaDQj Vt82Fzwh3oU/rkuq4MbnRoZ+GWSkVxh/jZxFXRfiHT7d+CcTm8wxJKPZHp+axwr4m6rz eFSksFCVQJ8mMrX1J8itzBlrxfIz1VpYxo6MIFoxTqcAAsFWzrc/L+uiwAM3yTz1OqGV MEwQ== X-Gm-Message-State: AOJu0YyHXL9tOUS1ufLal1+XTmf+EtX16n/UosgpzomaTPH+B9cmxiYF n/3me33yvy5RV2WQubC3/PX5tQCKSdoNakpo/fhZxjaNsr3iq3m/mOBJl8/oLnUoTlmRG1kVcMQ L X-Google-Smtp-Source: AGHT+IHMmX3GY8dJIoDoDPbMn5hU9QW/DqqxFV0Gkse/MKKk/wauJzLXls+YAtGGB8iJIJpwQ2k5lQ== X-Received: by 2002:a17:90a:fa95:b0:29b:b478:b8fd with SMTP id cu21-20020a17090afa9500b0029bb478b8fdmr621625pjb.35.1711568448824; Wed, 27 Mar 2024 12:40:48 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:48 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 09/10] math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:23 -0300 Message-Id: <20240327194024.1409677-10-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org hecked with a build for the affected ABIs. --- math/Makefile | 1 + sysdeps/ieee754/ldbl-64-128/s_frexpl.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math/Makefile b/math/Makefile index 61736159d1..655f6ed4e3 100644 --- a/math/Makefile +++ b/math/Makefile @@ -373,6 +373,7 @@ libm-test-funcs-auto-static = \ libm-test-funcs-noauto-static = \ copysign \ fmod \ + frexp \ isnan \ # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c index 73ac41e40c..f5f7d349f7 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c @@ -1,10 +1,10 @@ #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __frexpl, frexpl); #endif From patchwork Wed Mar 27 19:40:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87737 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4080C3860760 for ; Wed, 27 Mar 2024 19:42:13 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id A1B37385E454 for ; Wed, 27 Mar 2024 19:40:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1B37385E454 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A1B37385E454 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568457; cv=none; b=opoGgJdcn99IkzkqDULicJPXfIujFpmr82AqfKzmJD/UTcMHRt5EsA07g5zmwigOWze5WZPlZf8Ff7ooUXw0CqUlRQp5jMMiUT0PCJ4YySUh5uYcMbXyw4a/Pn/vWwXJWom/e57eUE7vIAk8Uup7Z/uwk+natZvMP2/5GfqnRms= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568457; c=relaxed/simple; bh=/Xf7aJ0aBDDwls/BEo72jFQHS+OKW6FU016uLRxh+I0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=JH0wAd0RSrxoItWTvaAGiZ2fjdF9UarB5eEtESTyvXOCIIUHK0jatbxBZLP01dZ1cRT5fEHBPXZRLNES46e6ush8znup7ExLIGE/Bta3v6ZDnZAzczvqzSllNM6vPz/BT7FosK34vi//2WH7PK2Dw/MYGN8rtxRcVydTDaDQTYs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6e8f51d0bf0so238257b3a.3 for ; Wed, 27 Mar 2024 12:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568451; x=1712173251; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XEBGnvKMJc/FekL1l9x46E5WjtTLo3MX29wvCcbEgeE=; b=evRsfxQQkTuQcm0IyfiwMvKaQS+1GUSAELqJV6cxXY5Qbuz2Y8N9dvekWH1mqNJERB tLD/NFTN0WaUfVM8/+3b8TLIqEyaodaaX5vpF1sO/OoUNZhTMKlowJEi/RFqME8m4+Bi yW2FEhQgWEanuX6q051G0gzXfa8WgUsNnpe+Po+TzcObPOiClenjZv0BEOQDHVjRCzCx 9/abDzuJigDRKCDGhtjuln4ERh4MxeITmIwe1K45qPHMo1U543q7kBp03RmbxLF+Ry94 UD3EWIvpdUQIRkjfT13NB9QCw0VCJ7W5xRpS84BemZNwcKI5GDHAZGpEe2jlwVAE91ul SAcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568451; x=1712173251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEBGnvKMJc/FekL1l9x46E5WjtTLo3MX29wvCcbEgeE=; b=YLUGfCcWlGQR+vssUH/4ZWvTqd+G503EF/82ZefXgctBjWuOWGA37PjjqgdcNwYEy+ RNVlDtZeJgsITQ6XxBL/ORsbtOWBbRUawk12e+kDLkCP+ITYmAnwy74PwPkF7KtPcoCZ R3LnRq5rutvHJXi+EOet28i0mhttTiBdK4L/v74rRJC124hSuDajdHlc259y4BzhpE3a POadZ1z+mpUl65TzdLgRI/+RM778BAnP3ZStEmnZUHyh0Msgf20PK/NbYGQYQPg+dWAT 4jzFL9+iP/2vuXt5ynussClw7PIAM80oPJp6UARD498MZnwpOUbViPyv+GvMeVfxf6W6 uHUQ== X-Gm-Message-State: AOJu0YyfwgO9gIKYCD3tD6S8ShOKTZ4A9+lqEKORX4ElFFxdepXBAxQv 2RbPH27Tz6AQpptXVFQ8uozi2frHn++9978Z//Z3XNAjLIiN10u2aWvgGg7/y04bLov6xET8Qx3 / X-Google-Smtp-Source: AGHT+IFp6S60QJ1okW8P0QhMFQhlILPpYifessj7ApULrZXcKyiCP7Zg3E3UV2KOLPEgoLwARltu6A== X-Received: by 2002:a05:6a20:3d88:b0:1a3:56df:c9bc with SMTP id s8-20020a056a203d8800b001a356dfc9bcmr933631pzi.40.1711568450998; Wed, 27 Mar 2024 12:40:50 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:50 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 10/10] math: Provide modf128 for static libm on alpha, s390, and sparcv9 Date: Wed, 27 Mar 2024 16:40:24 -0300 Message-Id: <20240327194024.1409677-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> References: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.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