mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Sparc optimized fmin{,f} and fmax{,f}.
* sysdeps/sparc/sparc64/fpu/s_fmax.S: New file. * sysdeps/sparc/sparc64/fpu/s_fmaxf.S: New file. * sysdeps/sparc/sparc64/fpu/s_fmin.S: New file. * sysdeps/sparc/sparc64/fpu/s_fminf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: New file. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: New file. * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new vis3 fmin/fmax sysdep routines. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
This commit is contained in:
parent
559398ab74
commit
f7062b9a6f
29
ChangeLog
29
ChangeLog
@ -1,3 +1,32 @@
|
||||
2012-03-15 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmax.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmaxf.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fmin.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/s_fminf.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S: New file.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S: New file.
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new vis3
|
||||
fmin/fmax sysdep routines.
|
||||
* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Likewise.
|
||||
|
||||
2012-03-14 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-vis3.S: New file.
|
||||
|
@ -3,7 +3,8 @@ ifeq ($(have-as-vis3),yes)
|
||||
libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3 s_ceilf-vis3 \
|
||||
s_ceil-vis3 s_fabs-vis3 s_fabsf-vis3 s_floor-vis3 \
|
||||
s_floorf-vis3 s_llrintf-vis3 s_llrint-vis3 \
|
||||
s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3
|
||||
s_rintf-vis3 s_rint-vis3 w_sqrt-vis3 w_sqrtf-vis3 \
|
||||
s_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3
|
||||
sysdep_routines += s_copysignf-vis3 s_copysign-vis3
|
||||
endif
|
||||
endif
|
||||
|
30
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
Normal file
30
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
Normal file
@ -0,0 +1,30 @@
|
||||
/* fmax function, sparc32 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
Normal file
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmax)
|
||||
.type __fmax, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmax_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmax_vis3), %o1
|
||||
# else
|
||||
set __fmax_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmax_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmax_generic), %o1
|
||||
# else
|
||||
set __fmax_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmax)
|
||||
weak_alias (__fmax, fmax)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmax __fmax_generic
|
||||
|
||||
#include "../s_fmax.S"
|
28
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
Normal file
28
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
Normal file
@ -0,0 +1,28 @@
|
||||
/* fmaxf function, sparc32 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
Normal file
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmaxf)
|
||||
.type __fmaxf, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmaxf_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmaxf_vis3), %o1
|
||||
# else
|
||||
set __fmaxf_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmaxf_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmaxf_generic), %o1
|
||||
# else
|
||||
set __fmaxf_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmaxf)
|
||||
weak_alias (__fmaxf, fmaxf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmaxf __fmaxf_generic
|
||||
|
||||
#include "../s_fmaxf.S"
|
30
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
Normal file
30
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
Normal file
@ -0,0 +1,30 @@
|
||||
/* fmin function, sparc32 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
Normal file
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmin)
|
||||
.type __fmin, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmin_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmin_vis3), %o1
|
||||
# else
|
||||
set __fmin_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmin_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmin_generic), %o1
|
||||
# else
|
||||
set __fmin_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmin)
|
||||
weak_alias (__fmin, fmin)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmin __fmin_generic
|
||||
|
||||
#include "../s_fmin.S"
|
28
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
Normal file
28
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
Normal file
@ -0,0 +1,28 @@
|
||||
/* fminf function, sparc32 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
Normal file
46
sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fminf)
|
||||
.type __fminf, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fminf_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fminf_vis3), %o1
|
||||
# else
|
||||
set __fminf_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fminf_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fminf_generic), %o1
|
||||
# else
|
||||
set __fminf_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fminf)
|
||||
weak_alias (__fminf, fminf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fminf __fminf_generic
|
||||
|
||||
#include "../s_fminf.S"
|
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
Normal file
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
Normal file
@ -0,0 +1,40 @@
|
||||
/* fmax function, sparc32 v9 version.
|
||||
Copyright (C) 2012 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)
|
||||
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)
|
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
Normal file
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
Normal file
@ -0,0 +1,40 @@
|
||||
/* fmaxf function, sparc32 v9 version.
|
||||
Copyright (C) 2012 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)
|
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
Normal file
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
Normal file
@ -0,0 +1,40 @@
|
||||
/* fmin function, sparc32 v9 version.
|
||||
Copyright (C) 2012 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)
|
||||
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)
|
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
Normal file
40
sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
Normal file
@ -0,0 +1,40 @@
|
||||
/* fminf function, sparc32 v9 version.
|
||||
Copyright (C) 2012 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)
|
@ -5,7 +5,8 @@ libm-sysdep_routines += m_signbitf-vis3 m_signbit-vis3 s_ceilf-vis3 \
|
||||
s_floorf-vis3 s_floor-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_rint-vis3 s_fminf-vis3 s_fmin-vis3 \
|
||||
s_fmaxf-vis3 s_fmax-vis3
|
||||
sysdep_routines += s_signbitf-vis3 s_signbit-vis3 s_finitef-vis3 \
|
||||
s_finite-vis3 s_isinff-vis3 s_isinf-vis3 \
|
||||
s_isnanf-vis3 s_isnan-vis3
|
||||
|
26
sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S
Normal file
26
sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S
Normal file
@ -0,0 +1,26 @@
|
||||
/* fmax function, sparc64 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
Normal file
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmax)
|
||||
.type __fmax, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmax_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmax_vis3), %o1
|
||||
# else
|
||||
set __fmax_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmax_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmax_generic), %o1
|
||||
# else
|
||||
set __fmax_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmax)
|
||||
weak_alias (__fmax, fmax)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmax __fmax_generic
|
||||
|
||||
#include "../s_fmax.S"
|
27
sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S
Normal file
27
sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S
Normal file
@ -0,0 +1,27 @@
|
||||
/* fmaxf function, sparc64 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
Normal file
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmaxf)
|
||||
.type __fmaxf, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmaxf_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmaxf_vis3), %o1
|
||||
# else
|
||||
set __fmaxf_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmaxf_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmaxf_generic), %o1
|
||||
# else
|
||||
set __fmaxf_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmaxf)
|
||||
weak_alias (__fmaxf, fmaxf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmaxf __fmaxf_generic
|
||||
|
||||
#include "../s_fmaxf.S"
|
26
sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S
Normal file
26
sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S
Normal file
@ -0,0 +1,26 @@
|
||||
/* fmin function, sparc64 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
Normal file
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmin)
|
||||
.type __fmin, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmin_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fmin_vis3), %o1
|
||||
# else
|
||||
set __fmin_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fmin_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fmin_generic), %o1
|
||||
# else
|
||||
set __fmin_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fmin)
|
||||
weak_alias (__fmin, fmin)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fmin __fmin_generic
|
||||
|
||||
#include "../s_fmin.S"
|
27
sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S
Normal file
27
sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S
Normal file
@ -0,0 +1,27 @@
|
||||
/* fminf function, sparc64 vis3 version.
|
||||
Copyright (C) 2012 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)
|
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
Normal file
46
sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
Normal file
@ -0,0 +1,46 @@
|
||||
#include <sysdep.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fminf)
|
||||
.type __fminf, @gnu_indirect_function
|
||||
# ifdef SHARED
|
||||
SETUP_PIC_REG_LEAF(o3, o5)
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
set HWCAP_SPARC_VIS3, %o1
|
||||
andcc %o0, %o1, %g0
|
||||
be 9f
|
||||
nop
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fminf_vis3), %o1
|
||||
xor %o1, %gdop_lox10(__fminf_vis3), %o1
|
||||
# else
|
||||
set __fminf_vis3, %o1
|
||||
# endif
|
||||
ba 10f
|
||||
nop
|
||||
9:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
sethi %gdop_hix22(__fminf_generic), %o1
|
||||
xor %o1, %gdop_lox10(__fminf_generic), %o1
|
||||
# else
|
||||
set __fminf_generic, %o1
|
||||
# endif
|
||||
# ifdef HAVE_AS_VIS3_SUPPORT
|
||||
10:
|
||||
# endif
|
||||
# ifdef SHARED
|
||||
add %o3, %o1, %o1
|
||||
# endif
|
||||
retl
|
||||
mov %o1, %o0
|
||||
END(__fminf)
|
||||
weak_alias (__fminf, fminf)
|
||||
|
||||
# undef weak_alias
|
||||
# define weak_alias(a, b)
|
||||
|
||||
#define __fminf __fminf_generic
|
||||
|
||||
#include "../s_fminf.S"
|
36
sysdeps/sparc/sparc64/fpu/s_fmax.S
Normal file
36
sysdeps/sparc/sparc64/fpu/s_fmax.S
Normal file
@ -0,0 +1,36 @@
|
||||
/* fmax function, sparc64 version.
|
||||
Copyright (C) 2012 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)
|
36
sysdeps/sparc/sparc64/fpu/s_fmaxf.S
Normal file
36
sysdeps/sparc/sparc64/fpu/s_fmaxf.S
Normal file
@ -0,0 +1,36 @@
|
||||
/* fmaxf function, sparc64 version.
|
||||
Copyright (C) 2012 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)
|
36
sysdeps/sparc/sparc64/fpu/s_fmin.S
Normal file
36
sysdeps/sparc/sparc64/fpu/s_fmin.S
Normal file
@ -0,0 +1,36 @@
|
||||
/* fmin function, sparc64 version.
|
||||
Copyright (C) 2012 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)
|
36
sysdeps/sparc/sparc64/fpu/s_fminf.S
Normal file
36
sysdeps/sparc/sparc64/fpu/s_fminf.S
Normal file
@ -0,0 +1,36 @@
|
||||
/* fminf function, sparc64 version.
|
||||
Copyright (C) 2012 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