[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r17602 - in /fsf/trunk/libc: ./ math/ sysdeps/generic/ sysdeps/i386/fpu/ sysdeps/ieee754/dbl-64/ sysdeps/powerpc/fpu/ sysdep...



Author: eglibc
Date: Fri Mar 16 00:01:45 2012
New Revision: 17602

Log:
Import glibc-mainline for 2012-03-16

Added:
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmaxf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fminf.S
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/unix/
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finite-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floor-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmaxf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_fminf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rint-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf-vis3.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_fmax.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_fmaxf.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_fmin.S
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_fminf.S
Removed:
    fsf/trunk/libc/sysdeps/i386/fpu/branred.c
    fsf/trunk/libc/sysdeps/i386/fpu/dosincos.c
    fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2f.c
    fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2f.c
    fsf/trunk/libc/sysdeps/i386/fpu/mpa.c
    fsf/trunk/libc/sysdeps/i386/fpu/s_cos.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_cosf.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_sin.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_sincos.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_sincosf.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_sinf.S
    fsf/trunk/libc/sysdeps/i386/fpu/s_tanf.S
    fsf/trunk/libc/sysdeps/i386/fpu/sincos32.c
    fsf/trunk/libc/sysdeps/x86_64/fpu/s_sincos.S
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/sysdeps/generic/math_private.h
    fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/i386/fpu/math_private.h
    fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_sin.c
    fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c
    fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
    fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
    fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Mar 16 00:01:45 2012
@@ -1,4 +1,168 @@
+2012-03-15  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/e_hypotf.c: Use double precision instead of
+	scaling.
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2012-03-15  Andreas Jaeger  <aj@xxxxxxx>
+
+	[BZ #13852]
+	* sysdeps/i386/fpu/e_rem_pio2f.c: Delete so that i386 uses the
+	ieee754/flt-32 implementation for sin, cos and sincos.
+	* sysdeps/i386/fpu/k_rem_pio2f.c: Likewise.
+	* sysdeps/i386/fpu/s_cosf.S: Likewise.
+	* sysdeps/i386/fpu/s_sincosf.S: Likewise.
+	* sysdeps/i386/fpu/s_sinf.S: Likewise.
+	* sysdeps/i386/fpu/s_tanf.S: Delete so that i386 uses the
+	ieee754/flt-32 implementation for tan.
+
+	* math/libm-test.inc (cos_test): Enable some large input tests for
+	float as well
+	(sin_test): Likewise.
+	(sincos_test): Likewise.
+	(tan_test): Add tests for large input.
+
+	* sysdeps/i386/fpu/libm-test-ulps: Update.
+
+2012-03-15  Andreas Jaeger  <aj@xxxxxxx>
+
+	[BZ #13658]
+	* math/libm-test.inc (cos_test): Add more test cases.
+	(sin_test): Likewise.
+	(sincos_test): Likewise.
+
+2012-03-15  Andreas Jaeger  <aj@xxxxxxx>
+
+	[BZ #13837]
+	* math/libm-test.inc (cos_test): Add a test case for large input
+	value.
+	(sin_test): Likewise.
+	(sincos_test): Likewise.
+
+2012-03-15  Andreas Jaeger  <aj@xxxxxxx>,
+	Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #13658]
+	* sysdeps/x86_64/fpu/s_sincos.S: Delete files so that
+	x86-64 and i386 use the iee754/dbl-64 sin and cos implementation.
+	* sysdeps/i386/fpu/branred.c: Likewise.
+	* sysdeps/i386/fpu/dosincos.c: Likewise.
+	* sysdeps/i386/fpu/mpa.c: Likewise.
+	* sysdeps/i386/fpu/s_cos.S: Likewise.
+	* sysdeps/i386/fpu/s_sin.S: Likewise.
+	* sysdeps/i386/fpu/s_sincos.S: Likewise.
+	* sysdeps/i386/fpu/sincos32.c: Likewise.
+
+	* sysdeps/generic/math_private.h (libc_feholdexcept_setround_53bit):
+	Define.
+	(libc_feupdateenv_53bit): Define.
+	* sysdeps/i386/fpu/math_private.h (libc_feholdexcept_setround_53bit):
+	Define.
+	(libc_feupdateenv_53bit): Define.
+
+	* sysdeps/ieee754/dbl-64/s_sin.c (__sin): Do double arithmetic in
+	53 bit (without extend i386 double precision).
+
+	* math/libm-test.inc (sincos_test): Add tests for large input.
+	(sin): Likewise.
+	(cos): Likewise.
+
+	* sysdeps/i386/fpu/libm-test-ulps: Update ULPs.
+
+2012-03-15  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2012-03-15  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* 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@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_ceil-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_ceil.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_ceilf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_finite-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_finite.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_finitef-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_finitef.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_floor-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_floor.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_floorf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_floorf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isinf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isinff.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isnan-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isnan.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_isnanf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_lrint-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_lrint.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_lrintf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_rint-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_rint.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_rintf-vis3.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/s_rintf.S: New file.
+	* sysdeps/sparc/sparc64/fpu/multiarch/Makefile: Add new VIS3 routines.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S: New file.
+	* sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: Add new VIS3 routines.
+
+	* sysdeps/sparc/sparc32/sparcv9/fpu/unix/sysv/linux/multiarch/Implies:
+	New file.
+
+	* sysdeps/sparc/fpu/libm-test-ulps: Update.
 
 	* sysdeps/sparc/configure.in: New file.
 	* sysdeps/sparc/configure: Generate.

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Fri Mar 16 00:01:45 2012
@@ -13,9 +13,9 @@
   5077, 5461, 5805, 5993, 6884, 6907, 6911, 9739, 9902, 10110, 10135, 10140,
   10210, 10545, 10716, 11174, 11322, 11365, 11494, 12047, 13058, 13525,
   13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
-  13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13673,
-  13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840, 13841,
-  13846
+  13552, 13553, 13555, 13559, 13566, 13583, 13618, 13637, 13656, 13658,
+  13673, 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840,
+  13841, 13846, 13852
 
 * ISO C11 support:
 

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Fri Mar 16 00:01:45 2012
@@ -2112,8 +2112,16 @@
 
   TEST_f_f (cos, 0.75L, 0.731688868873820886311838753000084544L);
 
+#ifndef TEST_LDOUBLE
+  /* Enable for long double once x86 and x86-64 implementations are fixed.  */
+  TEST_f_f (cos, 0x1p65, 0.99888622066058013610642172179340364209972L);
+  TEST_f_f (cos, -0x1p65, 0.99888622066058013610642172179340364209972L);
+#endif
+
 #ifdef TEST_DOUBLE
   TEST_f_f (cos, 0.80190127184058835, 0.69534156199418473);
+  TEST_f_f (cos, 1e22, 0.5232147853951389454975944733847);
+  TEST_f_f (cos, 0x1p1023, -0.8263698346141479945007856808117);
 #endif
 
   END (cos);
@@ -6387,9 +6395,18 @@
   TEST_f_f (sin, -M_PI_2l, -1);
   TEST_f_f (sin, 0.75L, 0.681638760023334166733241952779893935L);
 
+#ifndef TEST_LDOUBLE
+
+  /* Enable for long double once x86 and x86-64 implementations are fixed.  */
+  TEST_f_f (sin, 0x1p65, -0.047183876212354673805106149805700013943218L);
+  TEST_f_f (sin, -0x1p65, 0.047183876212354673805106149805700013943218L);
+#endif
+
 #ifdef TEST_DOUBLE
   TEST_f_f (sin, 0.80190127184058835, 0.71867942238767868);
   TEST_f_f (sin, 2.522464e-1, 2.4957989804940911e-1);
+  TEST_f_f (sin, 1e22, -0.8522008497671888017727058937530);
+  TEST_f_f (sin, 0x1p1023, 0.5631277798508840248814522055909);
 #endif
 
   END (sin);
@@ -6559,8 +6576,16 @@
   TEST_extra (sincos, M_PI_6l*2.0, 0.86602540378443864676372317075293616L, 0.5);
   TEST_extra (sincos, 0.75L, 0.681638760023334166733241952779893935L, 0.731688868873820886311838753000084544L);
 
+#ifndef TEST_LDOUBLE
+  /* Enable for long double once x86 and x86-64 implementations are fixed.  */
+  TEST_extra (sincos, 0x1p65, -0.047183876212354673805106149805700013943218L, 0.99888622066058013610642172179340364209972L);
+  TEST_extra (sincos, -0x1p65, 0.047183876212354673805106149805700013943218L, 0.99888622066058013610642172179340364209972L);
+#endif
+
 #ifdef TEST_DOUBLE
   TEST_extra (sincos, 0.80190127184058835, 0.71867942238767868, 0.69534156199418473);
+  TEST_extra (sincos, 1e22, -0.8522008497671888017727058937530, 0.5232147853951389454975944733847);
+  TEST_extra (sincos, 0x1p1023, 0.5631277798508840248814522055909, -0.8263698346141479945007856808117);
 #endif
 
   END (sincos);
@@ -6759,6 +6784,13 @@
 
   TEST_f_f (tan, M_PI_4l, 1);
   TEST_f_f (tan, 0.75L, 0.931596459944072461165202756573936428L);
+
+#ifdef TEST_FLOAT
+  /* Enable for double and long double once x86 and x86-64
+     implementations are fixed.  */
+  TEST_f_f (tan, 0x1p65, -0.0472364872359047946798414219288370688827L);
+  TEST_f_f (tan, -0x1p65, 0.0472364872359047946798414219288370688827L);
+#endif
 
   END (tan);
 }

Modified: fsf/trunk/libc/sysdeps/generic/math_private.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/math_private.h (original)
+++ fsf/trunk/libc/sysdeps/generic/math_private.h Fri Mar 16 00:01:45 2012
@@ -370,6 +370,9 @@
 #define libc_feholdexcept_setroundl(e, r) \
   do { feholdexcept (e); fesetround (r); } while (0)
 
+#define libc_feholdexcept_setround_53bit(e, r) \
+  libc_feholdexcept_setround (e, r)
+
 #define libc_fetestexcept(e) fetestexcept (e)
 #define libc_fetestexceptf(e) fetestexcept (e)
 #define libc_fetestexceptl(e) fetestexcept (e)
@@ -381,6 +384,8 @@
 #define libc_feupdateenv(e) (void) feupdateenv (e)
 #define libc_feupdateenvf(e) (void) feupdateenv (e)
 #define libc_feupdateenvl(e) (void) feupdateenv (e)
+
+#define libc_feupdateenv_53bit(e) libc_feupdateenv (e)
 
 #define __nan(str) \
   (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))

Removed: fsf/trunk/libc/sysdeps/i386/fpu/branred.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/branred.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/branred.c (removed)
@@ -1,1 +1,0 @@
-/* Not needed.  */

Removed: fsf/trunk/libc/sysdeps/i386/fpu/dosincos.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/dosincos.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/dosincos.c (removed)
@@ -1,1 +1,0 @@
-/* Not needed.  */

Removed: fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2f.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2f.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/e_rem_pio2f.c (removed)
@@ -1,3 +1,0 @@
-/* Empty.  This file is only meant to avoid compiling the file with the
-   same name in the libm-ieee754 directory.  The code is not used since
-   there is an assembler version for all users of this file.  */

Removed: fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2f.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2f.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/k_rem_pio2f.c (removed)
@@ -1,3 +1,0 @@
-/* Empty.  This file is only meant to avoid compiling the file with the
-   same name in the libm-ieee754 directory.  The code is not used since
-   there is an assembler version for all users of this file.  */

Modified: fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps Fri Mar 16 00:01:45 2012
@@ -559,7 +559,9 @@
 # cos_downward
 Test "cos_downward (1) == 0.5403023058681397174009366074429766037323":
 double: 1
-idouble: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 Test "cos_downward (10) == -0.8390715290764524522588639478240648345199":
@@ -567,6 +569,9 @@
 float: 1
 idouble: 1
 ifloat: 1
+Test "cos_downward (2) == -0.4161468365471423869975682295007621897660":
+float: 1
+ifloat: 1
 Test "cos_downward (3) == -0.9899924966004454572715727947312613023937":
 double: 1
 idouble: 1
@@ -584,6 +589,8 @@
 ildouble: 1
 ldouble: 1
 Test "cos_downward (8) == -0.1455000338086135258688413818311946826093":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "cos_downward (9) == -0.9111302618846769883682947111811653112463":
@@ -595,6 +602,9 @@
 ldouble: 1
 
 # cos_tonearest
+Test "cos_tonearest (2) == -0.4161468365471423869975682295007621897660":
+float: 1
+ifloat: 1
 Test "cos_tonearest (8) == -0.1455000338086135258688413818311946826093":
 ildouble: 1
 ldouble: 1
@@ -774,6 +784,9 @@
 ldouble: 1
 
 # csin
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
+float: 1
+ifloat: 1
 Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
 float: 1
 ifloat: 1
@@ -1029,9 +1042,9 @@
 double: 1
 idouble: 1
 Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
-double: 1
-float: 1
-idouble: 1
+double: 2
+float: 1
+idouble: 2
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -1078,9 +1091,9 @@
 double: 1
 idouble: 1
 Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
-double: 1
-float: 1
-idouble: 1
+double: 2
+float: 1
+idouble: 2
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -1268,19 +1281,31 @@
 ildouble: 1
 ldouble: 1
 
+# sin
+Test "sin (-0x1p65) == 0.047183876212354673805106149805700013943218":
+float: 1
+ifloat: 1
+Test "sin (0x1p65) == -0.047183876212354673805106149805700013943218":
+float: 1
+ifloat: 1
+
 # sin_downward
 Test "sin_downward (1) == 0.8414709848078965066525023216302989996226":
 ildouble: 1
 ldouble: 1
 Test "sin_downward (10) == -0.5440211108893698134047476618513772816836":
 double: 1
-idouble: 1
+float: 1
+idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "sin_downward (2) == 0.9092974268256816953960198659117448427023":
 double: 1
 idouble: 1
 Test "sin_downward (3) == 0.1411200080598672221007448028081102798469":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "sin_downward (4) == -0.7568024953079282513726390945118290941359":
@@ -1315,6 +1340,9 @@
 ldouble: 1
 
 # sin_tonearest
+Test "sin_tonearest (1) == 0.8414709848078965066525023216302989996226":
+float: 1
+ifloat: 1
 Test "sin_tonearest (10) == -0.5440211108893698134047476618513772816836":
 ildouble: 1
 ldouble: 1
@@ -1399,8 +1427,17 @@
 Test "sin_upward (8) == 0.9893582466233817778081235982452886721164":
 float: 1
 ifloat: 1
+Test "sin_upward (9) == 0.4121184852417565697562725663524351793439":
+float: 1
+ifloat: 1
 
 # sincos
+Test "sincos (-0x1p65, &sin_res, &cos_res) puts 0.047183876212354673805106149805700013943218 in sin_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p65, &sin_res, &cos_res) puts -0.047183876212354673805106149805700013943218 in sin_res":
+float: 1
+ifloat: 1
 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
 double: 1
 float: 1
@@ -1481,14 +1518,16 @@
 # tan
 Test "tan (pi/4) == 1":
 double: 1
-idouble: 1
+float: 1
+idouble: 1
+ifloat: 1
 
 # tan_downward
 Test "tan_downward (1) == 1.5574077246549022305069748074583601730873":
 double: 1
-float: 1
-idouble: 1
-ifloat: 1
+float: 2
+idouble: 1
+ifloat: 2
 Test "tan_downward (10) == 0.6483608274590866712591249330098086768169":
 float: 1
 ifloat: 1
@@ -1532,6 +1571,8 @@
 ildouble: 1
 ldouble: 1
 Test "tan_tonearest (2) == -2.1850398632615189916433061023136825434320":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "tan_tonearest (6) == -0.2910061913847491570536995888681755428312":
@@ -1592,6 +1633,8 @@
 
 # tan_upward
 Test "tan_upward (1) == 1.5574077246549022305069748074583601730873":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 Test "tan_upward (10) == 0.6483608274590866712591249330098086768169":
@@ -1797,9 +1840,9 @@
 idouble: 1
 ifloat: 2
 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
-double: 1
+double: 2
 float: 3
-idouble: 1
+idouble: 2
 ifloat: 3
 Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
 double: 2
@@ -1986,13 +2029,15 @@
 
 Function: "cos_downward":
 double: 1
-float: 1
-idouble: 1
-ifloat: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
 Function: "cos_tonearest":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
@@ -2168,9 +2213,9 @@
 ldouble: 1
 
 Function: "j1":
-double: 1
-float: 1
-idouble: 1
+double: 2
+float: 1
+idouble: 2
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -2225,6 +2270,10 @@
 ildouble: 1
 ldouble: 1
 
+Function: "sin":
+float: 1
+ifloat: 1
+
 Function: "sin_downward":
 double: 1
 float: 1
@@ -2234,6 +2283,8 @@
 ldouble: 1
 
 Function: "sin_tonearest":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
@@ -2289,17 +2340,21 @@
 
 Function: "tan":
 double: 1
-idouble: 1
+float: 1
+idouble: 1
+ifloat: 1
 
 Function: "tan_downward":
 double: 1
-float: 1
-idouble: 1
-ifloat: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
 Function: "tan_tonearest":
+float: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 

Modified: fsf/trunk/libc/sysdeps/i386/fpu/math_private.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/math_private.h (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/math_private.h Fri Mar 16 00:01:45 2012
@@ -16,4 +16,33 @@
 while (0)
 
 #include_next <math_private.h>
+
+#include <fpu_control.h>
+
+#undef libc_feholdexcept_setround_53bit
+#define libc_feholdexcept_setround_53bit(e, r)	\
+  do						\
+    {						\
+      fpu_control_t cw;				\
+      libc_feholdexcept_setround (e, r);	\
+      _FPU_GETCW (cw);				\
+      cw &= ~(fpu_control_t) _FPU_EXTENDED;	\
+      cw |= _FPU_DOUBLE;			\
+      _FPU_SETCW (cw);				\
+    }						\
+  while (0)
+
+#undef libc_feupdateenv_53bit
+#define libc_feupdateenv_53bit(e)		\
+  do						\
+    {						\
+      fpu_control_t cw;				\
+      libc_feupdateenv (e);			\
+      _FPU_GETCW (cw);				\
+      cw &= ~(fpu_control_t) _FPU_EXTENDED;	\
+      cw |= _FPU_EXTENDED;			\
+      _FPU_SETCW (cw);				\
+    }						\
+  while (0)
+
 #endif

Removed: fsf/trunk/libc/sysdeps/i386/fpu/mpa.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/mpa.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/mpa.c (removed)
@@ -1,1 +1,0 @@
-/* Not needed.  */

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cos.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cos.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cos.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_cos.S,v 1.5 1995/05/08 23:54:00 jtc Exp $")
-
-ENTRY(__cos)
-	fldl	4(%esp)
-	fxam
-	fstsw	%ax
-	movb	$0x45, %dh
-	andb	%ah, %dh
-	cmpb	$0x05, %dh
-	je	3f
-4:	fcos
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	ret
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fcos
-	ret
-3:
-#ifdef PIC
-	pushl	%ebx
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (ebx, 0)
-	LOAD_PIC_REG (bx)
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-	popl	%ebx
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (ebx)
-#else
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-#endif
-	jmp	4b
-END (__cos)
-weak_alias (__cos, cos)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_cosf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_cosf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_cosf.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_cosf.S,v 1.3 1995/05/08 23:55:16 jtc Exp $")
-
-ENTRY(__cosf)
-	flds	4(%esp)
-	fxam
-	fstsw	%ax
-	movb	$0x45, %dh
-	andb	%ah, %dh
-	cmpb	$0x05, %dh
-	je	3f
-4:	fcos
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	ret
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fcos
-	ret
-3:
-#ifdef PIC
-	pushl	%ebx
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (ebx, 0)
-	LOAD_PIC_REG (bx)
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-	popl	%ebx
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (ebx)
-#else
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-#endif
-	jmp	4b
-END (__cosf)
-weak_alias (__cosf, cosf)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sin.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sin.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sin.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_sin.S,v 1.5 1995/05/09 00:25:54 jtc Exp $")
-
-ENTRY(__sin)
-	fldl	4(%esp)
-	fxam
-	fstsw	%ax
-	movb	$0x45, %dh
-	andb	%ah, %dh
-	cmpb	$0x05, %dh
-	je	3f
-4:	fsin
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	ret
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fsin
-	ret
-3:
-#ifdef PIC
-	pushl	%ebx
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (ebx, 0)
-	LOAD_PIC_REG (bx)
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-	popl	%ebx
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (ebx)
-#else
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-#endif
-	jmp	4b
-END (__sin)
-weak_alias (__sin, sin)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sincos.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sincos.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sincos.S (removed)
@@ -1,64 +1,0 @@
-/* Compute sine and cosine of argument.
-   Copyright (C) 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
-   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 <machine/asm.h>
-#include "bp-sym.h"
-#include "bp-asm.h"
-
-#define PARMS	LINKAGE		/* no space for saved regs */
-#define ANGLE	PARMS
-#define SINP	ANGLE+8
-#define COSP	SINP+PTR_SIZE
-
-	.text
-ENTRY (BP_SYM (__sincos))
-	ENTER
-
-	fldl	ANGLE(%esp)
-	fsincos
-	movl	SINP(%esp), %ecx
-	CHECK_BOUNDS_BOTH_WIDE (%ecx, SINP(%esp), $8)
-	movl	COSP(%esp), %edx
-	CHECK_BOUNDS_BOTH_WIDE (%edx, COSP(%esp), $8)
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	fstpl	(%edx)
-	fstpl	(%ecx)
-
-	LEAVE
-	ret
-
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fsincos
-	fstpl	(%edx)
-	fstpl	(%ecx)
-
-	LEAVE
-	ret
-END (BP_SYM (__sincos))
-weak_alias (BP_SYM (__sincos), BP_SYM (sincos))

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sincosf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sincosf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sincosf.S (removed)
@@ -1,64 +1,0 @@
-/* Compute sine and cosine of argument.
-   Copyright (C) 1997, 2000 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
-
-   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 <machine/asm.h>
-#include "bp-sym.h"
-#include "bp-asm.h"
-
-#define PARMS	LINKAGE		/* no space for saved regs */
-#define ANGLE	PARMS
-#define SINP	ANGLE+4
-#define COSP	SINP+PTR_SIZE
-
-	.text
-ENTRY (BP_SYM (__sincosf))
-	ENTER
-
-	flds	ANGLE(%esp)
-	fsincos
-	movl	SINP(%esp), %ecx
-	CHECK_BOUNDS_BOTH_WIDE (%ecx, SINP(%esp), $4)
-	movl	COSP(%esp), %edx
-	CHECK_BOUNDS_BOTH_WIDE (%edx, COSP(%esp), $4)
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	fstps	(%edx)
-	fstps	(%ecx)
-
-	LEAVE
-	ret
-
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fsincos
-	fstps	(%edx)
-	fstps	(%ecx)
-
-	LEAVE
-	ret
-END (BP_SYM (__sincosf))
-weak_alias (BP_SYM (__sincosf), BP_SYM (sincosf))

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_sinf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_sinf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_sinf.S (removed)
@@ -1,54 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_sinf.S,v 1.3 1995/05/09 00:27:53 jtc Exp $")
-
-ENTRY(__sinf)
-	flds	4(%esp)
-	fxam
-	fstsw	%ax
-	movb	$0x45, %dh
-	andb	%ah, %dh
-	cmpb	$0x05, %dh
-	je	3f
-4:	fsin
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	ret
-	.align ALIGNARG(4)
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fsin
-	ret
-3:
-#ifdef PIC
-	pushl	%ebx
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (ebx, 0)
-	LOAD_PIC_REG (bx)
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-	popl	%ebx
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (ebx)
-#else
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-#endif
-	jmp	4b
-END (__sinf)
-weak_alias (__sinf, sinf)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/s_tanf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/s_tanf.S (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/s_tanf.S (removed)
@@ -1,55 +1,0 @@
-/*
- * Written by J.T. Conklin <jtc@xxxxxxxxxx>.
- * Fixed errno handling by Ulrich Drepper <drepper@xxxxxxxxxx>.
- * Public domain.
- */
-
-#define __need_Emath
-#include <bits/errno.h>
-#include <machine/asm.h>
-
-RCSID("$NetBSD: s_tanf.S,v 1.3 1995/05/09 00:31:09 jtc Exp $")
-
-ENTRY(__tanf)
-	flds	4(%esp)
-	fxam
-	fstsw	%ax
-	movb	$0x45, %dh
-	andb	%ah, %dh
-	cmpb	$0x05, %dh
-	je	3f
-4:	fptan
-	fnstsw	%ax
-	testl	$0x400,%eax
-	jnz	1f
-	fstp	%st(0)
-	ret
-1:	fldpi
-	fadd	%st(0)
-	fxch	%st(1)
-2:	fprem1
-	fstsw	%ax
-	testl	$0x400,%eax
-	jnz	2b
-	fstp	%st(1)
-	fptan
-	fstp	%st(0)
-	ret
-3:
-#ifdef PIC
-	pushl	%ebx
-	cfi_adjust_cfa_offset (4)
-	cfi_rel_offset (ebx, 0)
-	LOAD_PIC_REG (bx)
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-	popl	%ebx
-	cfi_adjust_cfa_offset (-4)
-	cfi_restore (ebx)
-#else
-	call	__errno_location@PLT
-	movl	$EDOM, (%eax)
-#endif
-	jmp	4b
-END (__tanf)
-weak_alias (__tanf, tanf)

Removed: fsf/trunk/libc/sysdeps/i386/fpu/sincos32.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/sincos32.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/sincos32.c (removed)
@@ -1,1 +1,0 @@
-/* Not needed.  */

Modified: fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_sin.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_sin.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/dbl-64/s_sin.c Fri Mar 16 00:01:45 2012
@@ -1,7 +1,7 @@
 /*
  * IBM Accurate Mathematical Library
  * written by International Business Machines Corp.
- * Copyright (C) 2001, 2009, 2011 Free Software Foundation
+ * Copyright (C) 2001-2012 Free Software Foundation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -111,7 +111,7 @@
 	fenv_t env;
 	double retval = 0;
 
-	libc_feholdexcept_setround (&env, FE_TONEAREST);
+	libc_feholdexcept_setround_53bit (&env, FE_TONEAREST);
 
 	u.x = x;
 	m = u.i[HIGH_HALF];
@@ -365,7 +365,7 @@
 	}
 
  ret:
-	libc_feupdateenv (&env);
+	libc_feupdateenv_53bit (&env);
 	return retval;
 }
 
@@ -386,7 +386,7 @@
   fenv_t env;
   double retval = 0;
 
-  libc_feholdexcept_setround (&env, FE_TONEAREST);
+  libc_feholdexcept_setround_53bit (&env, FE_TONEAREST);
 
   u.x = x;
   m = u.i[HIGH_HALF];
@@ -635,7 +635,7 @@
   }
 
  ret:
-  libc_feupdateenv (&env);
+  libc_feupdateenv_53bit (&env);
   return retval;
 }
 

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/e_hypotf.c Fri Mar 16 00:01:45 2012
@@ -1,5 +1,5 @@
 /* Pythagorean addition using floats
-   Copyright (C) 2011 Free Software Foundation, Inc.
+   Copyright (C) 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Adhemerval Zanella <azanella@xxxxxxxxxx>, 2011
 
@@ -22,21 +22,13 @@
 
 
 static const float two30  = 1.0737418e09;
-static const float two50  = 1.1259000e15;
-static const float two60  = 1.1529221e18;
-static const float two126 = 8.5070592e+37;
-static const float twoM50 = 8.8817842e-16;
-static const float twoM60 = 6.7762644e-21;
-static const float pdnum  = 1.1754939e-38;
-
 
 /* __ieee754_hypotf(x,y)
- *
- * This a FP only version without any FP->INT conversion.
- * It is similar to default C version, making appropriates
- * overflow and underflows checks as well scaling when it
- * is needed.
- */
+
+   This a FP only version without any FP->INT conversion.
+   It is similar to default C version, making appropriates
+   overflow and underflows checks as using double precision
+   instead of scaling.  */
 
 #ifdef _ARCH_PWR7
 /* POWER7 isinf and isnan optimizations are fast. */
@@ -92,27 +84,7 @@
     {
       return x + y;
     }
-  if (x > two50)
-    {
-      x *= twoM60;
-      y *= twoM60;
-      return __ieee754_sqrtf (x * x + y * y) / twoM60;
-    }
-  if (y < twoM50)
-    {
-      if (y <= pdnum)
-	{
-	  x *= two126;
-	  y *= two126;
-	  return __ieee754_sqrtf (x * x + y * y) / two126;
-	}
-      else
-	{
-	  x *= two60;
-	  y *= two60;
-	  return __ieee754_sqrtf (x * x + y * y) / two60;
-	}
-    }
-  return __ieee754_sqrtf (x * x + y * y);
+
+  return __ieee754_sqrt ((double) x * x + (double) y * y);
 }
 strong_alias (__ieee754_hypotf, __hypotf_finite)

Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Fri Mar 16 00:01:45 2012
@@ -918,6 +918,42 @@
 Test "Imaginary part of: csqrt (0 - 1 i) == M_SQRT_2_2 - M_SQRT_2_2 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csqrt (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i":
+double: 1
+idouble: 1
+Test "Real part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i":
+double: 1
+idouble: 1
+Test "Real part of: csqrt (0x1p-149 + 0x1p-149 i) == 4.112805464342778798097003462770175200803e-23 + 1.703579802732953750368659735601389709551e-23 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: csqrt (0x1p-149 + 0x1p-149 i) == 4.112805464342778798097003462770175200803e-23 + 1.703579802732953750368659735601389709551e-23 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
 
 # ctan
 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
@@ -1081,6 +1117,9 @@
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "hypot (0x1.234566p-126, 0x1.234566p-126) == 1.891441686191081936598531534017449451173e-38":
+double: 1
+idouble: 1
 Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
 double: 1
 float: 1
@@ -2101,17 +2140,17 @@
 
 Function: Real part of "csqrt":
 double: 1
-float: 1
-idouble: 1
-ifloat: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "csqrt":
 double: 1
-float: 1
-idouble: 1
-ifloat: 1
+float: 2
+idouble: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 

Modified: fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps Fri Mar 16 00:01:45 2012
@@ -921,6 +921,34 @@
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 1.473094556905565378990473658199034571917e+154 + 6.101757441282702188537080005372547713595e+153 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i) == 1.179514222452201722651836720466795901016e+2466 + 4.885707879516577666702435054303191575148e+2465 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1p+16383 i) == 1.106698967236475180613254276996359485630e+2466 + 2.687568007603946993388538156299100955642e+2465 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-16440 + 0x1p-16441 i) == 3.514690655930285351254618340783294558136e-2475 + 8.297059146828716918029689466551384219370e-2476 i":
 ildouble: 1
 ldouble: 1
 
@@ -2079,12 +2107,18 @@
 ifloat: 1
 
 Function: Real part of "csqrt":
-float: 1
+double: 1
+float: 1
+idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: Imaginary part of "csqrt":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 

Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile Fri Mar 16 00:01:45 2012
@@ -1,9 +1,10 @@
 ifeq ($(subdir),math)
 ifeq ($(have-as-vis3),yes)
-libm-sysdep_routines += m_copysignf-vis3 m_copysign-vis3
+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_fminf-vis3 s_fmin-vis3 s_fmaxf-vis3 s_fmax-vis3
 sysdep_routines += s_copysignf-vis3 s_copysign-vis3
-
-CFLAGS-s_copysignf-vis3.S = -Wa,-Av9d
-CFLAGS-s_copysign-vis3.S = -Wa,-Av9d
 endif
-endif
+endif

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,78 @@
+/* ceil function, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   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 ONE_DOT_ZERO	0x3ff00000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceil_vis3)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	or	%o0, %o1, %o0
+	movxtod	%o0, %f0
+	sllx	%o2, 32, %o2
+	fzero	ZERO
+	sllx	%o3, 32, %o3
+
+	fnegd	ZERO, SIGN_BIT
+
+	movxtod	%o2, %f16
+	fabsd	%f0, %f14
+
+	fcmpd	%fcc3, %f14, %f16
+
+	fmovduge %fcc3, ZERO, %f16
+	fand	%f0, SIGN_BIT, SIGN_BIT
+
+	for	%f16, SIGN_BIT, %f16
+	faddd	%f0, %f16, %f18
+	fsubd	%f18, %f16, %f18
+	fcmpd	%fcc2, %f18, %f0
+	movxtod	%o3, %f20
+
+	fmovduge %fcc2, ZERO, %f20
+	faddd	%f18, %f20, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__ceil_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceil.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__ceil)
+	.type	__ceil, @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(__ceil_vis3), %o1
+	xor	%o1, %gdop_lox10(__ceil_vis3), %o1
+#  else
+	set	__ceil_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__ceil_generic), %o1
+	xor	%o1, %gdop_lox10(__ceil_generic), %o1
+# else
+	set	__ceil_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__ceil)
+weak_alias (__ceil, ceil)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __ceil __ceil_generic
+
+#include "../s_ceil.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,74 @@
+/* Float ceil function, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+#define ONE_DOT_ZERO	0x3f800000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__ceilf_vis3)
+	movwtos	%o0, %f0
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+
+	movwtos	%o2, %f16
+	fabss	%f0, %f14
+
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f0, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f0, %f16, %f1
+	fsubs	%f1, %f16, %f1
+	fcmps	%fcc2, %f1, %f0
+	movwtos	%o3, %f9
+
+	fmovsuge %fcc2, ZERO, %f9
+	fadds	%f1, %f9, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__ceilf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_ceilf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__ceilf)
+	.type	__ceilf, @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(__ceilf_vis3), %o1
+	xor	%o1, %gdop_lox10(__ceilf_vis3), %o1
+#  else
+	set	__ceilf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__ceilf_generic), %o1
+	xor	%o1, %gdop_lox10(__ceilf_generic), %o1
+# else
+	set	__ceilf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__ceilf)
+weak_alias (__ceilf, ceilf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __ceilf __ceilf_generic
+
+#include "../s_ceilf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,26 @@
+/* Float absolute value, sparc32+v9 vis3 version.
+   Copyright (C) 2011 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
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+ENTRY (__fabs_vis3)
+	movwtos	%o0, %f0
+	movwtos	%o1, %f1
+	retl
+	 fabsd	%f0, %f0
+END (__fabs_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabs.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__fabs)
+	.type	__fabs, @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(__fabs_vis3), %o1
+	xor	%o1, %gdop_lox10(__fabs_vis3), %o1
+#  else
+	set	__fabs_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__fabs_generic), %o1
+	xor	%o1, %gdop_lox10(__fabs_generic), %o1
+# else
+	set	__fabs_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__fabs)
+weak_alias (__fabs, fabs)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __fabs __fabs_generic
+
+#include "../s_fabs.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,26 @@
+/* Float absolute value, sparc32 vis3 version.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 2006.
+
+   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 (__fabsf_vis3)
+	movwtos	%o0, %f0
+	retl
+	 fabss	%f0, %f0
+END (__fabsf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fabsf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__fabsf)
+	.type	__fabsf, @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(__fabsf_vis3), %o1
+	xor	%o1, %gdop_lox10(__fabsf_vis3), %o1
+#  else
+	set	__fabsf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__fabsf_generic), %o1
+	xor	%o1, %gdop_lox10(__fabsf_generic), %o1
+# else
+	set	__fabsf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__fabsf)
+weak_alias (__fabsf, fabsf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __fabsf __fabsf_generic
+
+#include "../../../fpu/s_fabsf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,79 @@
+/* floor function, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   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 ONE_DOT_ZERO	0x3ff00000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__floor_vis3)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	or	%o0, %o1, %o0
+	movxtod	%o0, %f0
+	sllx	%o2, 32, %o2
+	fzero	ZERO
+	sllx	%o3, 32, %o3
+
+	fnegd	ZERO, SIGN_BIT
+
+	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, %f18
+	fsubd	%f18, %f16, %f18
+	fcmpd	%fcc2, %f18, %f0
+	movxtod	%o3, %f20
+
+	fmovdule %fcc2, ZERO, %f20
+	fsubd	%f18, %f20, %f0
+	fabsd	%f0, %f0
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__floor_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floor.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__floor)
+	.type	__floor, @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(__floor_vis3), %o1
+	xor	%o1, %gdop_lox10(__floor_vis3), %o1
+#  else
+	set	__floor_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__floor_generic), %o1
+	xor	%o1, %gdop_lox10(__floor_generic), %o1
+# else
+	set	__floor_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__floor)
+weak_alias (__floor, floor)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __floor __floor_generic
+
+#include "../s_floor.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,74 @@
+/* Float floor function, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* Since changing the rounding mode is extremely expensive, we
+	   try to round up using a method that is rounding mode
+	   agnostic.
+
+	   We add then subtract (or subtract than add if the initial
+	   value was negative) 2**23 to the value, then subtract it
+	   back out.
+
+	   This will clear out the fractional portion of the value.
+	   One of two things will happen for non-whole initial values.
+	   Either the rounding mode will round it up, or it will be
+	   rounded down.  If the value started out whole, it will be
+	   equal after the addition and subtraction.  This means we
+	   can accurately detect with one test whether we need to add
+	   another 1.0 to round it up properly.
+
+	   VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+#define ONE_DOT_ZERO	0x3f800000		/* 1.0 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__floorf_vis3)
+	movwtos	%o0, %f0
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	sethi	%hi(ONE_DOT_ZERO), %o3
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+
+	movwtos	%o2, %f16
+	fabss	%f0, %f14
+
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f0, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f0, %f16, %f1
+	fsubs	%f1, %f16, %f1
+	fcmps	%fcc2, %f1, %f0
+	movwtos	%o3, %f9
+
+	fmovsule %fcc2, ZERO, %f9
+	fsubs	%f1, %f9, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__floorf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_floorf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__floorf)
+	.type	__floorf, @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(__floorf_vis3), %o1
+	xor	%o1, %gdop_lox10(__floorf_vis3), %o1
+#  else
+	set	__floorf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__floorf_generic), %o1
+	xor	%o1, %gdop_lox10(__floorf_generic), %o1
+# else
+	set	__floorf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__floorf)
+weak_alias (__floorf, floorf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __floorf __floorf_generic
+
+#include "../s_floorf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,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@xxxxxxxxxxxxx>, 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)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmax.S Fri Mar 16 00:01:45 2012
@@ -1,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"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,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@xxxxxxxxxxxxx>, 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)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmaxf.S Fri Mar 16 00:01:45 2012
@@ -1,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"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,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@xxxxxxxxxxxxx>, 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)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fmin.S Fri Mar 16 00:01:45 2012
@@ -1,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"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,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@xxxxxxxxxxxxx>, 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)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fminf.S Fri Mar 16 00:01:45 2012
@@ -1,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"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,58 @@
+/* llrint(), sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* 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 (__llrint_vis3)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+
+	or	%o0, %o1, %o0
+	fzero	ZERO
+
+	movxtod	%o0, %f0
+	sllx	%o2, 32, %o2
+	fnegd	ZERO, SIGN_BIT
+
+	movxtod	%o2, %f16
+	fabsd	%f0, %f14
+
+	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
+	fdtox	%f0, %f4
+	movstouw %f4, %o0
+	retl
+	 movstouw %f5, %o1
+END (__llrint_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrint.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,51 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__llrint)
+	.type	__llrint, @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(__llrint_vis3), %o1
+	xor	%o1, %gdop_lox10(__llrint_vis3), %o1
+#  else
+	set	__llrint_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__llrint_generic), %o1
+	xor	%o1, %gdop_lox10(__llrint_generic), %o1
+# else
+	set	__llrint_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__llrint)
+weak_alias (__llrint, llrint)
+
+strong_alias (__llrint, __lllrint)
+weak_alias (__lllrint, lllrint)
+
+# undef weak_alias
+# define weak_alias(a, b)
+# undef strong_alias
+# define strong_alias(a, b)
+
+#define __llrint __llrint_generic
+
+#include "../s_llrint.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,54 @@
+/* llrintf(), sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__llrintf_vis3)
+	movwtos	%o0, %f1
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+
+	movwtos	%o2, %f16
+	fabss	%f1, %f14
+
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f1, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f1, %f16, %f5
+	fsubs	%f5, %f16, %f0
+	fabss	%f0, %f0
+	fors	%f0, SIGN_BIT, %f0
+	fstox	%f0, %f4
+	movstouw %f4, %o0
+	retl
+	 movstouw %f5, %o1
+END (__llrintf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_llrintf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,51 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__llrintf)
+	.type	__llrintf, @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(__llrintf_vis3), %o1
+	xor	%o1, %gdop_lox10(__llrintf_vis3), %o1
+#  else
+	set	__llrintf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__llrintf_generic), %o1
+	xor	%o1, %gdop_lox10(__llrintf_generic), %o1
+# else
+	set	__llrintf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__llrintf)
+weak_alias (__llrintf, llrintf)
+
+strong_alias (__llrintf, __lllrintf)
+weak_alias (__lllrintf, lllrintf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+# undef strong_alias
+# define strong_alias(a, b)
+
+#define __llrintf __llrintf_generic
+
+#include "../s_llrintf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,55 @@
+/* Round float to int floating-point values, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* 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 (__rint_vis3)
+	sethi	%hi(TWO_FIFTYTWO), %o2
+	sllx	%o0, 32, %o0
+
+	or	%o0, %o1, %o0
+	fzero	ZERO
+
+	movxtod	%o0, %f0
+	sllx	%o2, 32, %o2
+	fnegd	ZERO, SIGN_BIT
+
+	movxtod	%o2, %f16
+	fabsd	%f0, %f14
+
+	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
+	retl
+	 for	%f0, SIGN_BIT, %f0
+END (__rint_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rint.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__rint)
+	.type	__rint, @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(__rint_vis3), %o1
+	xor	%o1, %gdop_lox10(__rint_vis3), %o1
+#  else
+	set	__rint_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__rint_generic), %o1
+	xor	%o1, %gdop_lox10(__rint_generic), %o1
+# else
+	set	__rint_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__rint)
+weak_alias (__rint, rint)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __rint __rint_generic
+
+#include "../s_rint.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,51 @@
+/* Round float to int floating-point values, sparc32 v9 vis3 version.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by David S. Miller <davem@xxxxxxxxxxxxx>, 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>
+
+	/* VIS instructions are used to facilitate the formation of
+	   easier constants, and the propagation of the sign bit.  */
+
+#define TWO_TWENTYTHREE	0x4b000000		/* 2**23 */
+
+#define ZERO		%f10			/* 0.0 */
+#define SIGN_BIT	%f12			/* -0.0 */
+
+ENTRY (__rintf_vis3)
+	movwtos	%o0, %f1
+	sethi	%hi(TWO_TWENTYTHREE), %o2
+	fzeros	ZERO
+
+	fnegs	ZERO, SIGN_BIT
+
+	movwtos	%o2, %f16
+	fabss	%f1, %f14
+
+	fcmps	%fcc3, %f14, %f16
+
+	fmovsuge %fcc3, ZERO, %f16
+	fands	%f1, SIGN_BIT, SIGN_BIT
+
+	fors	%f16, SIGN_BIT, %f16
+	fadds	%f1, %f16, %f5
+	fsubs	%f5, %f16, %f0
+	fabss	%f0, %f0
+	retl
+	 fors	%f0, SIGN_BIT, %f0
+END (__rintf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_rintf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__rintf)
+	.type	__rintf, @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(__rintf_vis3), %o1
+	xor	%o1, %gdop_lox10(__rintf_vis3), %o1
+#  else
+	set	__rintf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__rintf_generic), %o1
+	xor	%o1, %gdop_lox10(__rintf_generic), %o1
+# else
+	set	__rintf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__rintf)
+weak_alias (__rintf, rintf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __rintf __rintf_generic
+
+#include "../s_rintf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,49 @@
+/* sqrt function.  sparc32 v9 vis3 version.
+   Copyright (C) 2012 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
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+ENTRY (__sqrt_vis3)
+	movwtos	%o0, %f0
+	fzero	%f8
+	movwtos	%o1, %f1
+	fcmpd	%f0, %f8
+	fbl	1f
+	 nop
+8:	retl
+	 fsqrtd	%f0, %f0
+1:
+#ifdef SHARED
+	SETUP_PIC_REG_LEAF(o5, g1)
+	sethi	%gdop_hix22(_LIB_VERSION), %g1
+	xor	%g1, %gdop_lox10(_LIB_VERSION), %g1
+	ld	[%o5 + %g1], %g1, %gdop(_LIB_VERSION)
+#else
+	sethi	%hi(_LIB_VERSION), %g1
+	or	%g1, %lo(_LIB_VERSION), %g1
+#endif
+	ld	[%g1], %g1
+	cmp	%g1, -1
+	be	8b
+	 mov	%o0, %o2
+	mov	%o1, %o3
+	mov	26, %o4
+	mov	%o7, %g1
+	call	__kernel_standard
+	 mov	%g1, %o7
+END (__sqrt_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrt.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__sqrt)
+	.type	__sqrt, @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(__sqrt_vis3), %o1
+	xor	%o1, %gdop_lox10(__sqrt_vis3), %o1
+#  else
+	set	__sqrt_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__sqrt_generic), %o1
+	xor	%o1, %gdop_lox10(__sqrt_generic), %o1
+# else
+	set	__sqrt_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__sqrt)
+weak_alias (__sqrt, sqrt)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __sqrt __sqrt_generic
+
+#include "../w_sqrt.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf-vis3.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,47 @@
+/* sqrtf function.  sparc32 v9 vis3 version.
+   Copyright (C) 2012 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
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep.h>
+
+ENTRY (__sqrtf_vis3)
+	movwtos	%o0, %f0
+	fzeros	%f8
+	fcmps	%f0, %f8
+	fbl	1f
+	 nop
+8:	retl
+	 fsqrts	%f0, %f0
+1:
+#ifdef SHARED
+	SETUP_PIC_REG_LEAF(o5, g1)
+	sethi	%gdop_hix22(_LIB_VERSION), %g1
+	xor	%g1, %gdop_lox10(_LIB_VERSION), %g1
+	ld	[%o5 + %g1], %g1, %gdop(_LIB_VERSION)
+#else
+	sethi	%hi(_LIB_VERSION), %g1
+	or	%g1, %lo(_LIB_VERSION), %g1
+#endif
+	ld	[%g1], %g1
+	cmp	%g1, -1
+	be	8b
+	 mov	%o0, %o1
+	mov	126, %o2
+	mov	%o7, %g1
+	call	__kernel_standard_f
+	 mov	%g1, %o7
+END (__sqrtf_vis3)

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/w_sqrtf.S Fri Mar 16 00:01:45 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+	.text
+ENTRY(__sqrtf)
+	.type	__sqrtf, @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(__sqrtf_vis3), %o1
+	xor	%o1, %gdop_lox10(__sqrtf_vis3), %o1
+#  else
+	set	__sqrtf_vis3, %o1
+#  endif
+	ba	10f
+	 nop
+9:
+# endif
+# ifdef SHARED
+	sethi	%gdop_hix22(__sqrtf_generic), %o1
+	xor	%o1, %gdop_lox10(__sqrtf_generic), %o1
+# else
+	set	__sqrtf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+	add	%o3, %o1, %o1
+# endif
+	retl
+	 mov	%o1, %o0
+END(__sqrtf)
+weak_alias (__sqrtf, sqrtf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __sqrtf __sqrtf_generic
+
+#include "../w_sqrtf.S"

Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/s_fmax.S Fri Mar 16 00:01:45 2012
@@ -1,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@xxxxxxxxxxxxx>, 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

[... 2266 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits