From patchwork Fri Dec 3 00:01:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 48447 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 E5D473858010 for ; Fri, 3 Dec 2021 00:08:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5D473858010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638490135; bh=HQV+ruWsLkqyXdgfSyKVpNK3zquR2dRrIm4jEQSY96Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fd6zUKKLd9m/IYlbwFWwFDci1kU78p0qxGI3swWm/QU+Om80eIJSwNN3REfPjkAfJ eiOJX/jqXJXa70/FN0mGu2t1vtWhod7lgFPz+Pifzq199rjsEoSxHFxQZIFJb+Oagn du4L6NlDPFK43jvfA/dpEsd5/Tc1QBSMbRPITrpg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by sourceware.org (Postfix) with ESMTPS id 8E22A385BF86 for ; Fri, 3 Dec 2021 00:01:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E22A385BF86 Received: by mail-qt1-x836.google.com with SMTP id 8so1578909qtx.5 for ; Thu, 02 Dec 2021 16:01:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HQV+ruWsLkqyXdgfSyKVpNK3zquR2dRrIm4jEQSY96Q=; b=v3eLwIEELtJGTCQHHJDVdPQoI8ejwEKRqutpRFO/L9UYvFD7ZOdE9srAkTMuV9LzMu 4fNkCLQEy32btLHlcBRlU4oRQg0VD6ByvUZhvsoPhMhBGbTk2NMWpmqlVOTFZRSLPgRu jBtyX8yPyYBbRcBND3lDUJOuqLZoYKUBp40ATPwWgQU8WzfWpa1H6vuKF6qd5dqpFuYk EK5SlHHcu7ErgfNgwfNUNqNlHgbtRpyfHMTdXvbq8Yv7z53yPfyELQI2gsbtiWZuVG5n orHdYETk8e2DrCOP4BB5EO8GL02aMbFC8jh8Wc6HJFTbpTI5jyShzAsSwhxvp4SPff9r KJ8A== X-Gm-Message-State: AOAM530TvEdgPwyZ/tKXPfFWykdZN/v3SPTfPligZPJ43o81uIxz9ssw 6YAJVD67NeGFcfSTxnQz2YXJoIWej8mqxQ== X-Google-Smtp-Source: ABdhPJzjtqMm0d08rt4DZSy9nyxRK6PC/0FtttnNaCqZ6iIoph4czgVgOREf/kGcFF03T2xVrYwX5w== X-Received: by 2002:ac8:4e56:: with SMTP id e22mr17694058qtw.72.1638489683923; Thu, 02 Dec 2021 16:01:23 -0800 (PST) Received: from birita.. ([2804:431:c7cb:30f8:3030:59d3:d31c:ed39]) by smtp.gmail.com with ESMTPSA id m9sm938714qkn.59.2021.12.02.16.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 16:01:23 -0800 (PST) To: libc-alpha@sourceware.org, Paul Zimmermann , Wilco Dijkstra Subject: [PATCH v4 10/12] aarch64: Add math-use-builtins-f{max,min}.h Date: Thu, 2 Dec 2021 21:01:01 -0300 Message-Id: <20211203000103.737833-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211203000103.737833-1-adhemerval.zanella@linaro.org> References: <20211203000103.737833-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" It allows to remove the arch-specific implementations. --- sysdeps/aarch64/fpu/math-use-builtins-fmax.h | 4 +++ sysdeps/aarch64/fpu/math-use-builtins-fmin.h | 4 +++ sysdeps/aarch64/fpu/s_fmax.c | 28 -------------------- sysdeps/aarch64/fpu/s_fmaxf.c | 28 -------------------- sysdeps/aarch64/fpu/s_fmin.c | 28 -------------------- sysdeps/aarch64/fpu/s_fminf.c | 28 -------------------- 6 files changed, 8 insertions(+), 112 deletions(-) create mode 100644 sysdeps/aarch64/fpu/math-use-builtins-fmax.h create mode 100644 sysdeps/aarch64/fpu/math-use-builtins-fmin.h delete mode 100644 sysdeps/aarch64/fpu/s_fmax.c delete mode 100644 sysdeps/aarch64/fpu/s_fmaxf.c delete mode 100644 sysdeps/aarch64/fpu/s_fmin.c delete mode 100644 sysdeps/aarch64/fpu/s_fminf.c diff --git a/sysdeps/aarch64/fpu/math-use-builtins-fmax.h b/sysdeps/aarch64/fpu/math-use-builtins-fmax.h new file mode 100644 index 0000000000..6b9e7b7692 --- /dev/null +++ b/sysdeps/aarch64/fpu/math-use-builtins-fmax.h @@ -0,0 +1,4 @@ +#define USE_FMAX_BUILTIN 1 +#define USE_FMAXF_BUILTIN 10 +#define USE_FMAXL_BUILTIN 0 +#define USE_FMAXF128_BUILTIN 0 diff --git a/sysdeps/aarch64/fpu/math-use-builtins-fmin.h b/sysdeps/aarch64/fpu/math-use-builtins-fmin.h new file mode 100644 index 0000000000..7fd6b45fce --- /dev/null +++ b/sysdeps/aarch64/fpu/math-use-builtins-fmin.h @@ -0,0 +1,4 @@ +#define USE_FMIN_BUILTIN 1 +#define USE_FMINF_BUILTIN 1 +#define USE_FMINL_BUILTIN 0 +#define USE_FMINF128_BUILTIN 0 diff --git a/sysdeps/aarch64/fpu/s_fmax.c b/sysdeps/aarch64/fpu/s_fmax.c deleted file mode 100644 index 7e3593fbda..0000000000 --- a/sysdeps/aarch64/fpu/s_fmax.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2011-2021 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -double -__fmax (double x, double y) -{ - return __builtin_fmax (x, y); -} - -libm_alias_double (__fmax, fmax) diff --git a/sysdeps/aarch64/fpu/s_fmaxf.c b/sysdeps/aarch64/fpu/s_fmaxf.c deleted file mode 100644 index eb4c469ef8..0000000000 --- a/sysdeps/aarch64/fpu/s_fmaxf.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2011-2021 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -float -__fmaxf (float x, float y) -{ - return __builtin_fmaxf (x, y); -} - -libm_alias_float (__fmax, fmax) diff --git a/sysdeps/aarch64/fpu/s_fmin.c b/sysdeps/aarch64/fpu/s_fmin.c deleted file mode 100644 index efdee1ed39..0000000000 --- a/sysdeps/aarch64/fpu/s_fmin.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1996-2021 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -double -__fmin (double x, double y) -{ - return __builtin_fmin (x, y); -} - -libm_alias_double (__fmin, fmin) diff --git a/sysdeps/aarch64/fpu/s_fminf.c b/sysdeps/aarch64/fpu/s_fminf.c deleted file mode 100644 index 3665fabb6b..0000000000 --- a/sysdeps/aarch64/fpu/s_fminf.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2011-2021 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -float -__fminf (float x, float y) -{ - return __builtin_fminf (x, y); -} - -libm_alias_float (__fmin, fmin)