public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH] sparc: Remove s_abs implementations
Date: Mon,  4 Apr 2022 16:54:04 -0300	[thread overview]
Message-ID: <20220404195404.3621416-1-adhemerval.zanella@linaro.org> (raw)

For sparc64 is the same as the generic implementation, while for
sparc32 the builtin generates the same code.

Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
---
 sysdeps/sparc/sparc32/fpu/s_fabs.S            | 30 -------------------
 sysdeps/sparc/sparc32/fpu/s_fabsf.S           | 28 -----------------
 .../{s_fabs-generic.S => s_fabs-generic.c}    |  2 +-
 .../{s_fabsf-generic.S => s_fabsf-generic.c}  |  2 +-
 sysdeps/sparc/sparc64/fpu/s_fabs.c            |  7 -----
 sysdeps/sparc/sparc64/fpu/s_fabsf.c           |  7 -----
 6 files changed, 2 insertions(+), 74 deletions(-)
 delete mode 100644 sysdeps/sparc/sparc32/fpu/s_fabs.S
 delete mode 100644 sysdeps/sparc/sparc32/fpu/s_fabsf.S
 rename sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/{s_fabs-generic.S => s_fabs-generic.c} (71%)
 rename sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/{s_fabsf-generic.S => s_fabsf-generic.c} (71%)
 delete mode 100644 sysdeps/sparc/sparc64/fpu/s_fabs.c
 delete mode 100644 sysdeps/sparc/sparc64/fpu/s_fabsf.c

diff --git a/sysdeps/sparc/sparc32/fpu/s_fabs.S b/sysdeps/sparc/sparc32/fpu/s_fabs.S
deleted file mode 100644
index a03c9822d9..0000000000
--- a/sysdeps/sparc/sparc32/fpu/s_fabs.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Float absolute value, sparc32 version.
-   Copyright (C) 2011-2022 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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-#include <libm-alias-double.h>
-
-ENTRY (__fabs)
-	st	%o0, [%sp+72]
-	st	%o1, [%sp+76]
-	ldd	[%sp+72], %f0
-	retl
-	 fabss	%f0, %f0
-END (__fabs)
-libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc32/fpu/s_fabsf.S b/sysdeps/sparc/sparc32/fpu/s_fabsf.S
deleted file mode 100644
index 45bc46112c..0000000000
--- a/sysdeps/sparc/sparc32/fpu/s_fabsf.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Float absolute value, sparc32 version.
-   Copyright (C) 2006-2022 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
-   <https://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <libm-alias-float.h>
-
-ENTRY (__fabsf)
-	st	%o0, [%sp+68]
-	ld	[%sp+68], %f0
-	retl
-	 fabss	%f0, %f0
-END (__fabsf)
-libm_alias_float (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.c
similarity index 71%
rename from sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S
rename to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.c
index 267dbd2352..b928e3db33 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-generic.c
@@ -2,4 +2,4 @@
 #define __fabs __fabs_generic
 #undef libm_alias_double
 #define libm_alias_double(a, b)
-#include <sysdeps/sparc/sparc32/fpu/s_fabs.S>
+#include <sysdeps/ieee754/dbl-64/s_fabs.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.c
similarity index 71%
rename from sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S
rename to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.c
index b6fb38f34c..14883adcef 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-generic.c
@@ -2,4 +2,4 @@
 #define __fabsf __fabsf_generic
 #undef libm_alias_float
 #define libm_alias_float(a, b)
-#include <sysdeps/sparc/sparc32/fpu/s_fabsf.S>
+#include <sysdeps/ieee754/flt-32/s_fabsf.c>
diff --git a/sysdeps/sparc/sparc64/fpu/s_fabs.c b/sysdeps/sparc/sparc64/fpu/s_fabs.c
deleted file mode 100644
index 7862290da3..0000000000
--- a/sysdeps/sparc/sparc64/fpu/s_fabs.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <libm-alias-double.h>
-
-double __fabs (double x)
-{
-  return __builtin_fabs (x);
-}
-libm_alias_double (__fabs, fabs)
diff --git a/sysdeps/sparc/sparc64/fpu/s_fabsf.c b/sysdeps/sparc/sparc64/fpu/s_fabsf.c
deleted file mode 100644
index 5f54f80bf5..0000000000
--- a/sysdeps/sparc/sparc64/fpu/s_fabsf.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <libm-alias-float.h>
-
-float __fabsf (float x)
-{
-  return __builtin_fabsf (x);
-}
-libm_alias_float (__fabs, fabs)
-- 
2.32.0


             reply	other threads:[~2022-04-04 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 19:54 Adhemerval Zanella [this message]
2022-04-04 20:00 ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220404195404.3621416-1-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).