mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
sparc: Remove optimized math routines which cause testsuite failures.
famx{,f}/fmin{,f} and 32-bit lrint cause math testsuite failures either because they generate incorrect results or they fail to signal the proper exceptions. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S: Remove file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: Likewise. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile (libm-sysdep_routines): Update. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: Remove file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fmax.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fmin.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fminf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (libm-sysdep_routines): Update.
This commit is contained in:
parent
6fab532b47
commit
33d7e138ca
36
ChangeLog
36
ChangeLog
@ -1,3 +1,39 @@
|
||||
2017-02-03 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S: Remove file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile
|
||||
(libm-sysdep_routines): Update.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: Remove file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_lrint.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmax.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmaxf.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmin.S: Likewise.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fminf.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S:
|
||||
Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S:
|
||||
Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S:
|
||||
Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S:
|
||||
Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: Likewise.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
|
||||
(libm-sysdep_routines): Update.
|
||||
|
||||
2017-02-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/i386/dl-machine.h (elf_machine_rel): Replace
|
||||
|
@ -4,7 +4,6 @@ libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_fabs-vis3 \
|
||||
s_fabsf-vis3 s_llrintf-vis3 s_llrint-vis3 \
|
||||
s_rintf-vis3 s_rint-vis3 \
|
||||
w_sqrt_compat-vis3 w_sqrtf_compat-vis3 \
|
||||
s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3 \
|
||||
s_fmaf-vis3 s_fma-vis3 s_nearbyint-vis3 \
|
||||
s_nearbyintf-vis3 s_fdimf-vis3 s_fdim-vis3
|
||||
sysdep_routines += s_copysignf-vis3 s_copysign-vis3
|
||||
|
@ -1,30 +0,0 @@
|
||||
/* fmax function, sparc32 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmax_vis3)
|
||||
movwtos %o0, %f0
|
||||
movwtos %o1, %f1
|
||||
movwtos %o2, %f2
|
||||
movwtos %o3, %f3
|
||||
flcmpd %fcc1, %f0, %f2
|
||||
retl
|
||||
fmovdlg %fcc1, %f2, %f0
|
||||
END (__fmax_vis3)
|
@ -1,19 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmax)
|
||||
|
||||
weak_alias (__fmax, fmax)
|
||||
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
|
||||
#endif
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
# undef compat_symbol
|
||||
# define compat_symbol(a, b, c, d)
|
||||
|
||||
#define __fmax __fmax_generic
|
||||
|
||||
#include "../s_fmax.S"
|
@ -1,28 +0,0 @@
|
||||
/* fmaxf function, sparc32 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmaxf_vis3)
|
||||
movwtos %o0, %f0
|
||||
movwtos %o1, %f1
|
||||
flcmps %fcc1, %f0, %f1
|
||||
retl
|
||||
fmovslg %fcc1, %f1, %f0
|
||||
END (__fmaxf_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmaxf)
|
||||
|
||||
weak_alias (__fmaxf, fmaxf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmaxf __fmaxf_generic
|
||||
|
||||
#include "../s_fmaxf.S"
|
@ -1,30 +0,0 @@
|
||||
/* fmin function, sparc32 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmin_vis3)
|
||||
movwtos %o0, %f0
|
||||
movwtos %o1, %f1
|
||||
movwtos %o2, %f2
|
||||
movwtos %o3, %f3
|
||||
flcmpd %fcc1, %f0, %f2
|
||||
retl
|
||||
fmovdge %fcc1, %f2, %f0
|
||||
END (__fmin_vis3)
|
@ -1,19 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmin)
|
||||
|
||||
weak_alias (__fmin, fmin)
|
||||
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
|
||||
#endif
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
# undef compat_symbol
|
||||
# define compat_symbol(a, b, c, d)
|
||||
|
||||
#define __fmin __fmin_generic
|
||||
|
||||
#include "../s_fmin.S"
|
@ -1,28 +0,0 @@
|
||||
/* fminf function, sparc32 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fminf_vis3)
|
||||
movwtos %o0, %f0
|
||||
movwtos %o1, %f1
|
||||
flcmps %fcc1, %f0, %f1
|
||||
retl
|
||||
fmovsge %fcc1, %f1, %f0
|
||||
END (__fminf_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fminf)
|
||||
|
||||
weak_alias (__fminf, fminf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fminf __fminf_generic
|
||||
|
||||
#include "../s_fminf.S"
|
@ -1,45 +0,0 @@
|
||||
/* fmax function, sparc32 v9 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmax)
|
||||
std %o0, [%sp + 72]
|
||||
std %o2, [%sp + 80]
|
||||
ldd [%sp + 72], %f0
|
||||
ldd [%sp + 80], %f2
|
||||
fcmpd %fcc1, %f2, %f2
|
||||
fzero SIGN_BIT
|
||||
fmovdu %fcc1, %f0, %f2
|
||||
fnegd SIGN_BIT, SIGN_BIT
|
||||
fcmpd %fcc2, %f0, %f2
|
||||
fmovdul %fcc2, %f2, %f0
|
||||
fand %f0, %f2, %f4
|
||||
fandnot2 SIGN_BIT, %f4, %f4
|
||||
retl
|
||||
fandnot2 %f0, %f4, %f0
|
||||
END (__fmax)
|
||||
weak_alias (__fmax, fmax)
|
||||
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/* fmaxf function, sparc32 v9 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmaxf)
|
||||
st %o0, [%sp + 72]
|
||||
st %o1, [%sp + 76]
|
||||
ld [%sp + 72], %f1
|
||||
ld [%sp + 76], %f3
|
||||
fcmps %fcc1, %f3, %f3
|
||||
fzeros SIGN_BIT
|
||||
fmovsu %fcc1, %f1, %f3
|
||||
fnegs SIGN_BIT, SIGN_BIT
|
||||
fcmps %fcc2, %f1, %f3
|
||||
fmovsul %fcc2, %f3, %f1
|
||||
fands %f1, %f3, %f4
|
||||
fandnot2s SIGN_BIT, %f4, %f4
|
||||
retl
|
||||
fandnot2s %f1, %f4, %f0
|
||||
END (__fmaxf)
|
||||
weak_alias (__fmaxf, fmaxf)
|
@ -1,45 +0,0 @@
|
||||
/* fmin function, sparc32 v9 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmin)
|
||||
std %o0, [%sp + 72]
|
||||
std %o2, [%sp + 80]
|
||||
ldd [%sp + 72], %f0
|
||||
ldd [%sp + 80], %f2
|
||||
fcmpd %fcc1, %f2, %f2
|
||||
fzero SIGN_BIT
|
||||
fmovdu %fcc1, %f0, %f2
|
||||
fnegd SIGN_BIT, SIGN_BIT
|
||||
fcmpd %fcc2, %f0, %f2
|
||||
fmovdug %fcc2, %f2, %f0
|
||||
for %f0, %f2, %f4
|
||||
fand %f4, SIGN_BIT, %f4
|
||||
retl
|
||||
for %f0, %f4, %f0
|
||||
END (__fmin)
|
||||
weak_alias (__fmin, fmin)
|
||||
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
|
||||
#endif
|
@ -1,40 +0,0 @@
|
||||
/* fminf function, sparc32 v9 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fminf)
|
||||
st %o0, [%sp + 72]
|
||||
st %o1, [%sp + 76]
|
||||
ld [%sp + 72], %f1
|
||||
ld [%sp + 76], %f3
|
||||
fcmps %fcc1, %f3, %f3
|
||||
fzeros SIGN_BIT
|
||||
fmovsu %fcc1, %f1, %f3
|
||||
fnegs SIGN_BIT, SIGN_BIT
|
||||
fcmps %fcc2, %f1, %f3
|
||||
fmovsug %fcc2, %f3, %f1
|
||||
fors %f1, %f3, %f4
|
||||
fands %f4, SIGN_BIT, %f4
|
||||
retl
|
||||
fors %f1, %f4, %f0
|
||||
END (__fminf)
|
||||
weak_alias (__fminf, fminf)
|
@ -1,72 +0,0 @@
|
||||
/* lrint(), sparc32 v9 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <math_ldbl_opt.h>
|
||||
|
||||
/* We pop constants into the FPU registers using the incoming
|
||||
argument stack slots, since this avoid having to use any PIC
|
||||
references. We also thus avoid having to allocate a register
|
||||
window.
|
||||
|
||||
VIS instructions are used to facilitate the formation of
|
||||
easier constants, and the propagation of the sign bit. */
|
||||
|
||||
#define TWO_FIFTYTWO 0x43300000 /* 2**52 */
|
||||
|
||||
#define ZERO %f10 /* 0.0 */
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__lrint)
|
||||
sethi %hi(TWO_FIFTYTWO), %o2
|
||||
sllx %o0, 32, %o0
|
||||
|
||||
or %o0, %o1, %o0
|
||||
fzero ZERO
|
||||
|
||||
stx %o0, [%sp + 72]
|
||||
sllx %o2, 32, %o2
|
||||
fnegd ZERO, SIGN_BIT
|
||||
|
||||
ldd [%sp + 72], %f0
|
||||
|
||||
stx %o2, [%sp + 72]
|
||||
fabsd %f0, %f14
|
||||
|
||||
ldd [%sp + 72], %f16
|
||||
fcmpd %fcc3, %f14, %f16
|
||||
|
||||
fmovduge %fcc3, ZERO, %f16
|
||||
fand %f0, SIGN_BIT, SIGN_BIT
|
||||
|
||||
for %f16, SIGN_BIT, %f16
|
||||
faddd %f0, %f16, %f6
|
||||
fsubd %f6, %f16, %f0
|
||||
fabsd %f0, %f0
|
||||
for %f0, SIGN_BIT, %f0
|
||||
fdtoi %f0, %f3
|
||||
st %f3, [%sp + 72]
|
||||
retl
|
||||
ld [%sp + 72], %o0
|
||||
END (__lrint)
|
||||
weak_alias (__lrint, lrint)
|
||||
|
||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __lrint, lrintl, GLIBC_2_1)
|
||||
#endif
|
@ -4,8 +4,7 @@ libm-sysdep_routines += m_signbitf-vis3 m_signbit-vis3 m_finitef-vis3 \
|
||||
m_finite-vis3 m_isinff-vis3 m_isinf-vis3 \
|
||||
m_isnanf-vis3 m_isnan-vis3 s_lrintf-vis3 \
|
||||
s_lrint-vis3 s_rintf-vis3 s_rint-vis3 \
|
||||
s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 \
|
||||
s_fmax-vis3 s_fmaf-vis3 s_fma-vis3 \
|
||||
s_fmaf-vis3 s_fma-vis3 \
|
||||
s_nearbyint-vis3 s_nearbyintf-vis3 \
|
||||
s_ceilf-vis3 s_ceil-vis3 s_floorf-vis3 \
|
||||
s_floor-vis3 s_truncf-vis3 s_trunc-vis3
|
||||
|
@ -1,26 +0,0 @@
|
||||
/* fmax function, sparc64 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmax_vis3)
|
||||
flcmpd %fcc1, %f0, %f2
|
||||
retl
|
||||
fmovdlg %fcc1, %f2, %f0
|
||||
END (__fmax_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmax)
|
||||
|
||||
weak_alias (__fmax, fmax)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmax __fmax_generic
|
||||
|
||||
#include "../s_fmax.S"
|
@ -1,27 +0,0 @@
|
||||
/* fmaxf function, sparc64 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmaxf_vis3)
|
||||
flcmps %fcc1, %f1, %f3
|
||||
fmovs %f1, %f0
|
||||
retl
|
||||
fmovslg %fcc1, %f3, %f0
|
||||
END (__fmaxf_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmaxf)
|
||||
|
||||
weak_alias (__fmaxf, fmaxf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmaxf __fmaxf_generic
|
||||
|
||||
#include "../s_fmaxf.S"
|
@ -1,26 +0,0 @@
|
||||
/* fmin function, sparc64 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fmin_vis3)
|
||||
flcmpd %fcc1, %f0, %f2
|
||||
retl
|
||||
fmovdge %fcc1, %f2, %f0
|
||||
END (__fmin_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fmin)
|
||||
|
||||
weak_alias (__fmin, fmin)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmin __fmin_generic
|
||||
|
||||
#include "../s_fmin.S"
|
@ -1,27 +0,0 @@
|
||||
/* fminf function, sparc64 vis3 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
ENTRY (__fminf_vis3)
|
||||
flcmps %fcc1, %f1, %f3
|
||||
fmovs %f1, %f0
|
||||
retl
|
||||
fmovsge %fcc1, %f3, %f0
|
||||
END (__fminf_vis3)
|
@ -1,12 +0,0 @@
|
||||
#include <sparc-ifunc.h>
|
||||
|
||||
SPARC_ASM_VIS3_IFUNC(fminf)
|
||||
|
||||
weak_alias (__fminf, fminf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fminf __fminf_generic
|
||||
|
||||
#include "../s_fminf.S"
|
@ -1,36 +0,0 @@
|
||||
/* fmax function, sparc64 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmax)
|
||||
fcmpd %fcc1, %f2, %f2
|
||||
fzero SIGN_BIT
|
||||
fmovdu %fcc1, %f0, %f2
|
||||
fnegd SIGN_BIT, SIGN_BIT
|
||||
fcmpd %fcc2, %f0, %f2
|
||||
fmovdul %fcc2, %f2, %f0
|
||||
fand %f0, %f2, %f4
|
||||
fandnot2 SIGN_BIT, %f4, %f4
|
||||
retl
|
||||
fandnot2 %f0, %f4, %f0
|
||||
END (__fmax)
|
||||
weak_alias (__fmax, fmax)
|
@ -1,36 +0,0 @@
|
||||
/* fmaxf function, sparc64 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmaxf)
|
||||
fcmps %fcc1, %f3, %f3
|
||||
fzeros SIGN_BIT
|
||||
fmovsu %fcc1, %f1, %f3
|
||||
fnegs SIGN_BIT, SIGN_BIT
|
||||
fcmps %fcc2, %f1, %f3
|
||||
fmovsul %fcc2, %f3, %f1
|
||||
fands %f1, %f3, %f4
|
||||
fandnot2s SIGN_BIT, %f4, %f4
|
||||
retl
|
||||
fandnot2s %f1, %f4, %f0
|
||||
END (__fmaxf)
|
||||
weak_alias (__fmaxf, fmaxf)
|
@ -1,36 +0,0 @@
|
||||
/* fmin function, sparc64 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fmin)
|
||||
fcmpd %fcc1, %f2, %f2
|
||||
fzero SIGN_BIT
|
||||
fmovdu %fcc1, %f0, %f2
|
||||
fnegd SIGN_BIT, SIGN_BIT
|
||||
fcmpd %fcc2, %f0, %f2
|
||||
fmovdug %fcc2, %f2, %f0
|
||||
for %f0, %f2, %f4
|
||||
fand %f4, SIGN_BIT, %f4
|
||||
retl
|
||||
for %f0, %f4, %f0
|
||||
END (__fmin)
|
||||
weak_alias (__fmin, fmin)
|
@ -1,36 +0,0 @@
|
||||
/* fminf function, sparc64 version.
|
||||
Copyright (C) 2012-2017 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by David S. Miller <davem@davemloft.net>, 2012.
|
||||
|
||||
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/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#define SIGN_BIT %f12 /* -0.0 */
|
||||
|
||||
ENTRY (__fminf)
|
||||
fcmps %fcc1, %f3, %f3
|
||||
fzeros SIGN_BIT
|
||||
fmovsu %fcc1, %f1, %f3
|
||||
fnegs SIGN_BIT, SIGN_BIT
|
||||
fcmps %fcc2, %f1, %f3
|
||||
fmovsug %fcc2, %f3, %f1
|
||||
fors %f1, %f3, %f4
|
||||
fands %f4, SIGN_BIT, %f4
|
||||
retl
|
||||
fors %f1, %f4, %f0
|
||||
END (__fminf)
|
||||
weak_alias (__fminf, fminf)
|
Loading…
Reference in New Issue
Block a user