diff mbox series

[COMMITTED] x86: Remove fcopysign{f} implementation

Message ID 20220407152102.746831-1-adhemerval.zanella@linaro.org
State New
Headers show
Series [COMMITTED] x86: Remove fcopysign{f} implementation | expand

Commit Message

Adhemerval Zanella Netto April 7, 2022, 3:21 p.m. UTC
The builtin used by generic code generates similar code.

Checked on x86_64-linux-gnu and i686-linux-gnu.
---
 sysdeps/i386/fpu/s_copysign.S    | 20 -------------
 sysdeps/i386/fpu/s_copysignf.S   | 20 -------------
 sysdeps/i386/fpu/s_copysignl.S   | 20 -------------
 sysdeps/x86_64/fpu/s_copysign.S  | 50 --------------------------------
 sysdeps/x86_64/fpu/s_copysignf.S | 45 ----------------------------
 sysdeps/x86_64/fpu/s_copysignl.S | 20 -------------
 6 files changed, 175 deletions(-)
 delete mode 100644 sysdeps/i386/fpu/s_copysign.S
 delete mode 100644 sysdeps/i386/fpu/s_copysignf.S
 delete mode 100644 sysdeps/i386/fpu/s_copysignl.S
 delete mode 100644 sysdeps/x86_64/fpu/s_copysign.S
 delete mode 100644 sysdeps/x86_64/fpu/s_copysignf.S
 delete mode 100644 sysdeps/x86_64/fpu/s_copysignl.S
diff mbox series

Patch

diff --git a/sysdeps/i386/fpu/s_copysign.S b/sysdeps/i386/fpu/s_copysign.S
deleted file mode 100644
index a49d34e4b7..0000000000
--- a/sysdeps/i386/fpu/s_copysign.S
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/*
- * Public domain.
- */
-
-#include <machine/asm.h>
-#include <libm-alias-double.h>
-
-RCSID("$NetBSD: s_copysign.S,v 1.4 1995/05/08 23:53:02 jtc Exp $")
-
-ENTRY(__copysign)
-	movl	16(%esp),%edx
-	movl	8(%esp),%eax
-	andl	$0x80000000,%edx
-	andl	$0x7fffffff,%eax
-	orl	%edx,%eax
-	movl	%eax,8(%esp)
-	fldl	4(%esp)
-	ret
-END (__copysign)
-libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/i386/fpu/s_copysignf.S b/sysdeps/i386/fpu/s_copysignf.S
deleted file mode 100644
index edc540c4d6..0000000000
--- a/sysdeps/i386/fpu/s_copysignf.S
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/*
- * Public domain.
- */
-
-#include <machine/asm.h>
-#include <libm-alias-float.h>
-
-RCSID("$NetBSD: s_copysignf.S,v 1.3 1995/05/08 23:53:25 jtc Exp $")
-
-ENTRY(__copysignf)
-	movl	8(%esp),%edx
-	movl	4(%esp),%eax
-	andl	$0x80000000,%edx
-	andl	$0x7fffffff,%eax
-	orl	%edx,%eax
-	movl	%eax,4(%esp)
-	flds	4(%esp)
-	ret
-END (__copysignf)
-libm_alias_float (__copysign, copysign)
diff --git a/sysdeps/i386/fpu/s_copysignl.S b/sysdeps/i386/fpu/s_copysignl.S
deleted file mode 100644
index 9d9b273e94..0000000000
--- a/sysdeps/i386/fpu/s_copysignl.S
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/*
- * Public domain.
- */
-
-#include <libm-alias-ldouble.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: $")
-
-ENTRY(__copysignl)
-	movl	24(%esp),%edx
-	movl	12(%esp),%eax
-	andl	$0x8000,%edx
-	andl	$0x7fff,%eax
-	orl	%edx,%eax
-	movl	%eax,12(%esp)
-	fldt	4(%esp)
-	ret
-END (__copysignl)
-libm_alias_ldouble (__copysign, copysign)
diff --git a/sysdeps/x86_64/fpu/s_copysign.S b/sysdeps/x86_64/fpu/s_copysign.S
deleted file mode 100644
index 0787f68115..0000000000
--- a/sysdeps/x86_64/fpu/s_copysign.S
+++ /dev/null
@@ -1,50 +0,0 @@ 
-/* copy sign, double version.
-   Copyright (C) 2002-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 <machine/asm.h>
-#include <libm-alias-double.h>
-
-	.section .rodata.cst16,"aM",@progbits,16
-
-	.align ALIGNARG(4)
-	.type signmask,@object
-signmask:
-	.byte 0, 0, 0, 0, 0, 0, 0, 0x80
-	.byte 0, 0, 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(signmask)
-	.type othermask,@object
-othermask:
-	.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f
-	.byte 0, 0, 0, 0, 0, 0, 0, 0
-	ASM_SIZE_DIRECTIVE(othermask)
-
-#ifdef PIC
-#define MO(op) op##(%rip)
-#else
-#define MO(op) op
-#endif
-
-	.text
-ENTRY(__copysign)
-	andpd MO(othermask),%xmm0
-	andpd MO(signmask),%xmm1
-	orpd %xmm1,%xmm0
-	ret
-END (__copysign)
-
-libm_alias_double (__copysign, copysign)
diff --git a/sysdeps/x86_64/fpu/s_copysignf.S b/sysdeps/x86_64/fpu/s_copysignf.S
deleted file mode 100644
index b48af3f5ad..0000000000
--- a/sysdeps/x86_64/fpu/s_copysignf.S
+++ /dev/null
@@ -1,45 +0,0 @@ 
-/* copy sign, double version.
-   Copyright (C) 2002-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 <machine/asm.h>
-#include <libm-alias-float.h>
-
-	.section .rodata
-
-	.align ALIGNARG(4)
-	.type mask,@object
-mask:
-	.byte 0xff, 0xff, 0xff, 0x7f
-	ASM_SIZE_DIRECTIVE(mask)
-
-#ifdef PIC
-#define MO(op) op##(%rip)
-#else
-#define MO(op) op
-#endif
-
-	.text
-ENTRY(__copysignf)
-	movss	MO(mask),%xmm3
-	andps	%xmm3,%xmm0
-	andnps	%xmm1,%xmm3
-	orps	%xmm3,%xmm0
-	retq
-END (__copysignf)
-
-libm_alias_float (__copysign, copysign)
diff --git a/sysdeps/x86_64/fpu/s_copysignl.S b/sysdeps/x86_64/fpu/s_copysignl.S
deleted file mode 100644
index 3ec388a6ef..0000000000
--- a/sysdeps/x86_64/fpu/s_copysignl.S
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/*
- * Public domain.
- */
-
-#include <libm-alias-ldouble.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: $")
-
-ENTRY(__copysignl)
-	movl	32(%rsp),%edx
-	movl	16(%rsp),%eax
-	andl	$0x8000,%edx
-	andl	$0x7fff,%eax
-	orl	%edx,%eax
-	movl	%eax,16(%rsp)
-	fldt	8(%rsp)
-	ret
-END (__copysignl)
-libm_alias_ldouble (__copysign, copysign)