public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] sparc64: Remove fcopysign{f} implementation
Date: Thu,  7 Apr 2022 18:15:15 +0000 (GMT)	[thread overview]
Message-ID: <20220407181515.E2D023857811@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4f2146c4f41c409d92441d6365dc3aceaf70c7fe

commit 4f2146c4f41c409d92441d6365dc3aceaf70c7fe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Apr 5 11:03:42 2022 -0300

    sparc64: Remove fcopysign{f} implementation
    
    The builtin from generic code generates similar compliant sequence.
    
    Checked on sparc64-linux-gnu.

Diff:
---
 sysdeps/sparc/sparc32/fpu/s_copysign.S             | 35 ----------------------
 sysdeps/sparc/sparc32/fpu/s_copysignf.S            | 31 -------------------
 .../sparcv9/fpu/multiarch/s_copysign-generic.S     |  8 -----
 .../sparcv9/fpu/multiarch/s_copysign-generic.c     |  5 ++++
 ...s_copysignf-generic.S => s_copysignf-generic.c} |  2 +-
 sysdeps/sparc/sparc64/fpu/s_copysign.S             | 30 -------------------
 sysdeps/sparc/sparc64/fpu/s_copysignf.S            | 30 -------------------
 7 files changed, 6 insertions(+), 135 deletions(-)

diff --git a/sysdeps/sparc/sparc32/fpu/s_copysign.S b/sysdeps/sparc/sparc32/fpu/s_copysign.S
deleted file mode 100644
index 54191b5391..0000000000
--- a/sysdeps/sparc/sparc32/fpu/s_copysign.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/* copysign function, sparc32 version.
-   Copyright (C) 2012-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 (__copysign)
-	sethi	%hi(0x80000000), %g1
-	and	%o2, %g1, %o4
-	andn	%o0, %g1, %o0
-	or	%o0, %o4, %o0
-	std	%o0, [%sp + 72]
-	retl
-	 ldd	[%sp + 72], %f0
-END (__copysign)
-libm_alias_double (__copysign, copysign)
-#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
-compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
-#endif
diff --git a/sysdeps/sparc/sparc32/fpu/s_copysignf.S b/sysdeps/sparc/sparc32/fpu/s_copysignf.S
deleted file mode 100644
index ce1acfdb1b..0000000000
--- a/sysdeps/sparc/sparc32/fpu/s_copysignf.S
+++ /dev/null
@@ -1,31 +0,0 @@
-/* float copysign function, sparc32 version.
-   Copyright (C) 2012-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 (__copysignf)
-	sethi	%hi(0x80000000), %g1
-	and	%o1, %g1, %o4
-	andn	%o0, %g1, %o0
-	or	%o0, %o4, %o0
-	st	%o0, [%sp + 68]
-	retl
-	 ld	[%sp + 68], %f0
-END (__copysignf)
-libm_alias_float (__copysign, copysign)
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S
deleted file mode 100644
index 9aa3486277..0000000000
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.S
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <math_ldbl_opt.h>
-#include <libm-alias-double.h>
-#define __copysign __copysign_generic
-#undef libm_alias_double
-#define libm_alias_double(a, b)
-#undef compat_symbol
-#define compat_symbol(a, b, c, d)
-#include <sysdeps/sparc/sparc32/fpu/s_copysign.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.c b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.c
new file mode 100644
index 0000000000..3f8cb8d920
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-generic.c
@@ -0,0 +1,5 @@
+#include <libm-alias-double.h>
+#define __copysign __copysign_generic
+#undef libm_alias_double
+#define libm_alias_double(a, b)
+#include <sysdeps/ieee754/dbl-64/s_copysign.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.c
similarity index 71%
rename from sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S
rename to sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.c
index 685027500a..117dbaf088 100644
--- a/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.S
+++ b/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-generic.c
@@ -2,4 +2,4 @@
 #define __copysignf __copysignf_generic
 #undef libm_alias_float
 #define libm_alias_float(a, b)
-#include <sysdeps/sparc/sparc32/fpu/s_copysignf.S>
+#include <sysdeps/ieee754/flt-32/s_copysignf.c>
diff --git a/sysdeps/sparc/sparc64/fpu/s_copysign.S b/sysdeps/sparc/sparc64/fpu/s_copysign.S
deleted file mode 100644
index 221dbd9286..0000000000
--- a/sysdeps/sparc/sparc64/fpu/s_copysign.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* copysign function, sparc64 version.
-   Copyright (C) 2012-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-double.h>
-
-ENTRY (__copysign)
-	fzeros	%f7
-	fnegs	%f7, %f7
-	fands	%f2, %f7, %f9
-	fandnot2s %f0, %f7, %f0
-	retl
-	 fors	%f0, %f9, %f0
-END (__copysign)
-libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/sparc/sparc64/fpu/s_copysignf.S b/sysdeps/sparc/sparc64/fpu/s_copysignf.S
deleted file mode 100644
index 6ca6ccf8af..0000000000
--- a/sysdeps/sparc/sparc64/fpu/s_copysignf.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* float copysign function, sparc64 version.
-   Copyright (C) 2012-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 (__copysignf)
-	fzeros	%f7
-	fnegs	%f7, %f7
-	fands	%f3, %f7, %f9
-	fandnot2s %f1, %f7, %f1
-	retl
-	 fors	%f1, %f9, %f0
-END (__copysignf)
-libm_alias_float (__copysign, copysign)


                 reply	other threads:[~2022-04-07 18:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220407181515.E2D023857811@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@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).