From patchwork Tue Dec 7 19:03:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 48605 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 2091C3858435 for ; Tue, 7 Dec 2021 19:11:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2091C3858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1638904300; bh=1z6Rjpu/HDhjTJn7qSTnpmaYjfyM1bYvo3x4hT8WDhA=; 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=xQu2TsmHC/hRiD39luiTXGazGB/0WXK9NSpXU7ICElKynSuPaonWuBaP52Z8UhAOT nJVKK9Pdcb9AcWVwma7A5DFgmMb8thh7SfliCNvLG/gFCVqC6Z1ZRkJFynxEqtEHyZ 1m+o7rvG/8uyrez0nLa2gPvaIPEi7dW9k+vFdlsQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) by sourceware.org (Postfix) with ESMTPS id 4C0693858439 for ; Tue, 7 Dec 2021 19:04:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C0693858439 Received: by mail-ua1-x936.google.com with SMTP id ay21so256468uab.12 for ; Tue, 07 Dec 2021 11:04:40 -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=1z6Rjpu/HDhjTJn7qSTnpmaYjfyM1bYvo3x4hT8WDhA=; b=V80QT7KBCR8uF+366Ze8aSzK95DBkgYyzX/7kF2IZrLJz7sSCFmfsFdeXf/I3BIItf d7MkDfBNbPTe4ItIcBKMfipjYkqvsS5QzAr+mJnQ/EzuwNRN9eJB8vWv1PtQdWkIASAQ du2qZHE4NGTnSpYX2XHdCQfeV6kP3SAWW1BBkSfIWF6Cq05gBP88OFxSoqMAsiRZANdj ubSksoV3N6Lus36RQMJQ8ihRur8IDlsiJQ95dvU+nH5hvQaE+KKK17mMLa/c9o8Q46IL w5MrWN1pSSdqRiw05gzrPo5hcbXkw4t5cp+V0d5AbMsAAh0+ooeK+HOdjAqmZxijzDUE 6bgA== X-Gm-Message-State: AOAM531bCwBGqZXlovzAYgCoVbo6kAjXwrSWM6nqzkBlTC9X9wlmuIkK kx2dgOpvHnNXq+DRROUC8/mIvzn/F6DlFQ== X-Google-Smtp-Source: ABdhPJz2aIiVwdljlmZU458YE69ZhOKS0zJKGb2i6gKnPmVQ3Cjw7l1LkYqlCnrX/P+ILXHcxo3xqQ== X-Received: by 2002:a67:d583:: with SMTP id m3mr46295774vsj.16.1638903879637; Tue, 07 Dec 2021 11:04:39 -0800 (PST) Received: from birita.. ([2804:431:c7ca:a776:246c:70fd:1377:eec7]) by smtp.gmail.com with ESMTPSA id l190sm312904vsc.26.2021.12.07.11.04.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 11:04:39 -0800 (PST) To: libc-alpha@sourceware.org, Paul Zimmermann , Wilco Dijkstra Subject: [PATCH v5 10/12] aarch64: Add math-use-builtins-f{max,min}.h Date: Tue, 7 Dec 2021 16:03:51 -0300 Message-Id: <20211207190353.3282666-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211207190353.3282666-1-adhemerval.zanella@linaro.org> References: <20211207190353.3282666-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 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..3ba31c8f83 --- /dev/null +++ b/sysdeps/aarch64/fpu/math-use-builtins-fmax.h @@ -0,0 +1,4 @@ +#define USE_FMAX_BUILTIN 1 +#define USE_FMAXF_BUILTIN 1 +#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)