Remove sysdeps/sparc/sparc64/soft-fp directory.

As per <https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>,
there should not be separate sysdeps/<arch>/soft-fp directories when
those are used by all configurations that use sysdeps/<arch>, and,
more generally, should not be sysdeps/foo/Implies files pointing to a
subdirectory foo/bar.  This patch eliminates the
sysdeps/sparc/sparc64/soft-fp directory accordingly, merging its
contents into sysdeps/sparc/sparc64.  This completes removing the
unnecessary <arch>/soft-fp sysdeps directories.

sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c is removed rather than moved.
It was not in fact used previously - the ldbl-128 version of
e_ilogbl.c was used instead - and moving it into sysdeps/sparc/sparc64
results in it being used, but causing a build failure because of
FP_DECL_EX declaring an unused variable (as I noted in
<https://sourceware.org/ml/libc-alpha/2013-10/msg00457.html> that file
doesn't appear to use FP_DECL_EX).  Given that the file was previously
unused and so presumably not tested recently, removing it is the safe
way to avoid this patch changing what actually gets built into glibc
(if this file should turn out more efficient than the ldbl-128
e_ilogbl.c, it can always be added back in future with the build
failure fixed).

Tested with build-many-glibcs.py that installed stripped shared
libraries for sparc configurations are unchanged by this patch.

	* sysdeps/sparc/sparc64/Implies: Remove sparc/sparc64/soft-fp.
	* sysdeps/sparc/sparc64/Makefile [$(subdir) = soft-fp]
	(sparc64-quad-routines): New variable.  Moved from ....
	[$(subdir) = soft-fp] (sysdep_routines): Add
	$(sparc64-quad-routines).  Moved from ....
	[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp/.  Moved from ....
	* sysdeps/sparc/sparc64/soft-fp/Makefile: ... here.  Remove file.
	* sysdeps/sparc/sparc64/Versions (libc): Add GLIBC_2.2 symbols
	moved from ....
	* sysdeps/sparc/sparc64/soft-fp/Versions: ... here.  Remove file.
	* sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: Remove file.
	* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Move to ....
	* sysdeps/sparc/sparc64/qp_add.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Move to ....
	* sysdeps/sparc/sparc64/qp_cmp.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Move to ....
	* sysdeps/sparc/sparc64/qp_cmpe.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_div.c: Move to ....
	* sysdeps/sparc/sparc64/qp_div.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_dtoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_feq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Move to ....
	* sysdeps/sparc/sparc64/qp_fge.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Move to ....
	* sysdeps/sparc/sparc64/qp_fgt.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Move to ....
	* sysdeps/sparc/sparc64/qp_fle.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Move to ....
	* sysdeps/sparc/sparc64/qp_flt.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Move to ....
	* sysdeps/sparc/sparc64/qp_fne.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_itoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Move to ....
	* sysdeps/sparc/sparc64/qp_mul.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_neg.S: Move to ....
	* sysdeps/sparc/sparc64/qp_neg.S: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtod.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtoi.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtos.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtoui.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtoux.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Move to ....
	* sysdeps/sparc/sparc64/qp_qtox.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Move to ....
	* sysdeps/sparc/sparc64/qp_sqrt.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_stoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Move to ....
	* sysdeps/sparc/sparc64/qp_sub.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_uitoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_util.c: Move to ....
	* sysdeps/sparc/sparc64/qp_util.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_uxtoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Move to ....
	* sysdeps/sparc/sparc64/qp_xtoq.c: ... here.
	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Move to ....
	* sysdeps/sparc/sparc64/sfp-machine.h: ... here.
This commit is contained in:
Joseph Myers 2018-05-25 20:00:51 +00:00
parent 2c753f3e84
commit b5453d9f7a
35 changed files with 106 additions and 121 deletions

View File

@ -1,5 +1,73 @@
2018-05-25 Joseph Myers <joseph@codesourcery.com> 2018-05-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/sparc/sparc64/Implies: Remove sparc/sparc64/soft-fp.
* sysdeps/sparc/sparc64/Makefile [$(subdir) = soft-fp]
(sparc64-quad-routines): New variable. Moved from ....
[$(subdir) = soft-fp] (sysdep_routines): Add
$(sparc64-quad-routines). Moved from ....
[$(subdir) = math] (CPPFLAGS): Add -I../soft-fp/. Moved from ....
* sysdeps/sparc/sparc64/soft-fp/Makefile: ... here. Remove file.
* sysdeps/sparc/sparc64/Versions (libc): Add GLIBC_2.2 symbols
moved from ....
* sysdeps/sparc/sparc64/soft-fp/Versions: ... here. Remove file.
* sysdeps/sparc/sparc64/soft-fp/e_ilogbl.c: Remove file.
* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Move to ....
* sysdeps/sparc/sparc64/qp_add.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_cmp.c: Move to ....
* sysdeps/sparc/sparc64/qp_cmp.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_cmpe.c: Move to ....
* sysdeps/sparc/sparc64/qp_cmpe.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_div.c: Move to ....
* sysdeps/sparc/sparc64/qp_div.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_dtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_feq.c: Move to ....
* sysdeps/sparc/sparc64/qp_feq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fge.c: Move to ....
* sysdeps/sparc/sparc64/qp_fge.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fgt.c: Move to ....
* sysdeps/sparc/sparc64/qp_fgt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fle.c: Move to ....
* sysdeps/sparc/sparc64/qp_fle.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_flt.c: Move to ....
* sysdeps/sparc/sparc64/qp_flt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_fne.c: Move to ....
* sysdeps/sparc/sparc64/qp_fne.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_itoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_mul.c: Move to ....
* sysdeps/sparc/sparc64/qp_mul.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_neg.S: Move to ....
* sysdeps/sparc/sparc64/qp_neg.S: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtod.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoi.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtos.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoui.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtoux.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Move to ....
* sysdeps/sparc/sparc64/qp_qtox.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_sqrt.c: Move to ....
* sysdeps/sparc/sparc64/qp_sqrt.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_stoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Move to ....
* sysdeps/sparc/sparc64/qp_sub.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_uitoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_util.c: Move to ....
* sysdeps/sparc/sparc64/qp_util.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_uxtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Move to ....
* sysdeps/sparc/sparc64/qp_xtoq.c: ... here.
* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Move to ....
* sysdeps/sparc/sparc64/sfp-machine.h: ... here.
* sysdeps/sparc/sparc32/Implies: Remove sparc/sparc32/soft-fp. * sysdeps/sparc/sparc32/Implies: Remove sparc/sparc32/soft-fp.
* sysdeps/sparc/sparc32/Makefile [$(subdir) = soft-fp] * sysdeps/sparc/sparc32/Makefile [$(subdir) = soft-fp]
(sparc32-quad-routines): New variable. Moved from .... (sparc32-quad-routines): New variable. Moved from ....

View File

@ -4,4 +4,3 @@ ieee754/ldbl-128
ieee754/dbl-64/wordsize-64 ieee754/dbl-64/wordsize-64
ieee754/dbl-64 ieee754/dbl-64
ieee754/flt-32 ieee754/flt-32
sparc/sparc64/soft-fp

View File

@ -1,3 +1,23 @@
# Makefile for SPARC 64-bit.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jakub Jelinek (jj@ultra.linux.cz).
#
# 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
# <http://www.gnu.org/licenses/>.
sysdep-CFLAGS += -Wa,-Av9a -mvis sysdep-CFLAGS += -Wa,-Av9a -mvis
ifeq ($(subdir),string) ifeq ($(subdir),string)
@ -17,3 +37,15 @@ endif
ifeq ($(subdir),nptl) ifeq ($(subdir),nptl)
libpthread-routines += cpu_relax libpthread-routines += cpu_relax
endif endif
ifeq ($(subdir),soft-fp)
sparc64-quad-routines := qp_add qp_cmp qp_cmpe qp_div qp_dtoq qp_feq qp_fge \
qp_fgt qp_fle qp_flt qp_fne qp_itoq qp_mul qp_neg qp_qtod qp_qtoi \
qp_qtos qp_qtoui qp_qtoux qp_qtox qp_sqrt qp_stoq qp_sub qp_uitoq \
qp_uxtoq qp_xtoq qp_util
sysdep_routines += $(sparc64-quad-routines)
endif
ifeq ($(subdir),math)
CPPFLAGS += -I../soft-fp/
endif

View File

@ -4,6 +4,12 @@ libc {
__align_cpy_1; __align_cpy_2; __align_cpy_4; __align_cpy_1; __align_cpy_2; __align_cpy_4;
__align_cpy_8; __align_cpy_16; __align_cpy_8; __align_cpy_16;
} }
GLIBC_2.2 {
_Qp_add; _Qp_cmp; _Qp_cmpe; _Qp_div; _Qp_dtoq; _Qp_feq; _Qp_fge; _Qp_fgt;
_Qp_fle; _Qp_flt; _Qp_fne; _Qp_itoq; _Qp_mul; _Qp_neg; _Qp_qtod; _Qp_qtoi;
_Qp_qtos; _Qp_qtoui; _Qp_qtoux; _Qp_qtox; _Qp_sqrt; _Qp_stoq; _Qp_sub;
_Qp_uitoq; _Qp_uxtoq; _Qp_xtoq;
}
} }
libm { libm {
GLIBC_2.1 { GLIBC_2.1 {

View File

@ -1,33 +0,0 @@
# Software floating-point emulation.
# Makefile for SPARC v9 ABI mandated long double utility
# functions (_Qp_*).
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jakub Jelinek (jj@ultra.linux.cz).
#
# 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
# <http://www.gnu.org/licenses/>.
ifeq ($(subdir),soft-fp)
sparc64-quad-routines := qp_add qp_cmp qp_cmpe qp_div qp_dtoq qp_feq qp_fge \
qp_fgt qp_fle qp_flt qp_fne qp_itoq qp_mul qp_neg qp_qtod qp_qtoi \
qp_qtos qp_qtoui qp_qtoux qp_qtox qp_sqrt qp_stoq qp_sub qp_uitoq \
qp_uxtoq qp_xtoq qp_util
sysdep_routines += $(sparc64-quad-routines)
endif
ifeq ($(subdir),math)
CPPFLAGS += -I../soft-fp/
endif

View File

@ -1,8 +0,0 @@
libc {
GLIBC_2.2 {
_Qp_add; _Qp_cmp; _Qp_cmpe; _Qp_div; _Qp_dtoq; _Qp_feq; _Qp_fge; _Qp_fgt;
_Qp_fle; _Qp_flt; _Qp_fne; _Qp_itoq; _Qp_mul; _Qp_neg; _Qp_qtod; _Qp_qtoi;
_Qp_qtos; _Qp_qtoui; _Qp_qtoux; _Qp_qtox; _Qp_sqrt; _Qp_stoq; _Qp_sub;
_Qp_uitoq; _Qp_uxtoq; _Qp_xtoq;
}
}

View File

@ -1,79 +0,0 @@
/* Software floating-point emulation.
ilogbl(x, exp)
Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek (jj@ultra.linux.cz).
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
<http://www.gnu.org/licenses/>. */
/* ilogbl(long double x)
* return the binary exponent of non-zero x
* ilogbl(0) = 0x80000001
* ilogbl(inf/NaN) = 0x7fffffff (no signal is raised)
*/
#include "soft-fp.h"
#include "quad.h"
#include <math.h>
int __ieee754_ilogbl (long double x)
{
FP_DECL_EX;
FP_DECL_Q(X);
/*
FP_UNPACK_Q(X, x);
switch (X_c)
{
case FP_CLS_ZERO:
return FP_ILOGB0;
case FP_CLS_NAN:
case FP_CLS_INF:
return FP_ILOGBNAN;
default:
return X_e;
}
*/
FP_UNPACK_RAW_Q(X, x);
switch (X_e)
{
default:
return X_e - _FP_EXPBIAS_Q;
case 0:
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
if (_FP_FRAC_ZEROP_4(X))
return FP_ILOGB0;
else
{
_FP_I_TYPE shift;
_FP_FRAC_CLZ_4(shift, X);
shift -= _FP_FRACXBITS_Q;
return X_e - _FP_EXPBIAS_Q - 1 + shift;
}
#else
if (_FP_FRAC_ZEROP_2(X))
return FP_ILOGB0;
else
{
_FP_I_TYPE shift;
_FP_FRAC_CLZ_2(shift, X);
shift -= _FP_FRACXBITS_Q;
return X_e - _FP_EXPBIAS_Q - 1 + shift;
}
#endif
case _FP_EXPBIAS_Q:
return FP_ILOGBNAN;
}
}