[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17588 - in /fsf/trunk/libc: ./ manual/ math/ sysdeps/i386/fpu/ sysdeps/ieee754/flt-32/ sysdeps/sparc/ sysdeps/sparc/sparc32...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17588 - in /fsf/trunk/libc: ./ manual/ math/ sysdeps/i386/fpu/ sysdeps/ieee754/flt-32/ sysdeps/sparc/ sysdeps/sparc/sparc32...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 15 Mar 2012 00:02:34 -0000
Author: eglibc
Date: Thu Mar 15 00:02:32 2012
New Revision: 17588
Log:
Import glibc-mainline for 2012-03-15
Added:
fsf/trunk/libc/sysdeps/sparc/configure
fsf/trunk/libc/sysdeps/sparc/configure.in
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/config.h.in
fsf/trunk/libc/config.make.in
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/manual/llio.texi
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/math/s_csqrt.c
fsf/trunk/libc/math/s_csqrtf.c
fsf/trunk/libc/math/s_csqrtl.c
fsf/trunk/libc/sysdeps/i386/fpu/libm-test-ulps
fsf/trunk/libc/sysdeps/ieee754/flt-32/e_hypotf.c
fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysign.S
fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysignf.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Mar 15 00:02:32 2012
@@ -1,3 +1,66 @@
+2012-03-14 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ * sysdeps/sparc/configure.in: New file.
+ * sysdeps/sparc/configure: Generate.
+ * configure.in (libc_cv_sparc_as_vis3): Substitute.
+ * configure: Regenerate.
+ * config.h.in (HAVE_AS_VIS3_SUPPORT): New.
+ * config.make.in (have-as-vis3): New.
+ * sysdeps/sparc/sparc32/sparcv9/Makefile (ASFLAGS-*): If VIS3 is
+ available use -Av9d instead of -Av9a.
+ * sysdeps/sparc/sparc64/Makefile: Likewise.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/Makefile: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S: New file.
+ * sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S: New file.
+
+ * sysdeps/sparc/sparc64/fpu/s_copysign.S (__copysign): Use fzeros/fnegs
+ to load 0x80000000 into a float register instead of using the stack.
+ * sysdeps/sparc/sparc64/fpu/s_copysignf.S (__copysignf): Likewise.
+
+2012-03-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/syscall.h.
+ ($(objpfx)syscall-%.h): Rename rule to $(objpfx)bits/syscall%h.
+ ($(objpfx)syscall-%.d): Rename rule to $(objpfx)bits/syscall%d.
+ ($(inst_includedir)/bits/syscall.h): Remove rule.
+ ($(objpfx)bits/syscall.d): Include instead of
+ $(objpfx)syscall-list.d.
+ (generated): Change syscall-list.h and syscall-list.d to
+ bits/syscall.h and bits/syscall.d.
+
+2012-03-14 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ [BZ #13846]
+ * manual/llio.texi (Memory-mapped I/O): Fix wrong function name.
+
+2012-03-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13841]
+ * math/s_csqrt.c: Include <float.h>.
+ (__csqrt): Scale large or subnormal inputs.
+ * math/s_csqrtf.c: Likewise.
+ * math/s_csqrtl.c: Likewise.
+ * math/libm-test.inc (csqrt_test): Add more tests.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+ [BZ #13840]
+ * math/libm-test.inc (hypot_test): Add more tests.
+
+2012-03-13 David S. Miller <davem@xxxxxxxxxxxxx>
+
+ [BZ #13840]
+ * sysdeps/ieee754/flt-32/e_hypotf.c (__ieee754_hypotf): Rewrite to use
+ double-precision for the calculation instead of scaling.
+
2012-03-13 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Do not
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Mar 15 00:02:32 2012
@@ -14,7 +14,8 @@
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
+ 13695, 13704, 13706, 13726, 13738, 13786, 13792, 13806, 13840, 13841,
+ 13846
* ISO C11 support:
Modified: fsf/trunk/libc/config.h.in
==============================================================================
--- fsf/trunk/libc/config.h.in (original)
+++ fsf/trunk/libc/config.h.in Thu Mar 15 00:02:32 2012
@@ -89,6 +89,9 @@
/* Defined on SPARC if GCC emits GOTDATA relocations. */
#undef HAVE_GCC_GOTDATA
+
+/* Define on SPARC if AS supports VIS3 instructions. */
+#undef HAVE_AS_VIS3_SUPPORT
/* Define if the linker supports the -z combreloc option. */
#undef HAVE_Z_COMBRELOC
Modified: fsf/trunk/libc/config.make.in
==============================================================================
--- fsf/trunk/libc/config.make.in (original)
+++ fsf/trunk/libc/config.make.in Thu Mar 15 00:02:32 2012
@@ -58,6 +58,7 @@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
have-mfma4 = @libc_cv_cc_fma4@
+have-as-vis3 = @libc_cv_sparc_as_vis3@
gnu89-inline-CFLAGS = @gnu89_inline@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Thu Mar 15 00:02:32 2012
@@ -616,6 +616,7 @@
static
ldd_rewrite_script
use_ldconfig
+libc_cv_sparc_as_vis3
libc_cv_as_i686
libc_cv_cc_fma4
libc_cv_cc_novzeroupper
@@ -7647,6 +7648,7 @@
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is default" >&5
$as_echo_n "checking whether -fPIC is default... " >&6; }
if ${libc_cv_pic_default+:} false; then :
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Thu Mar 15 00:02:32 2012
@@ -2151,6 +2151,7 @@
AC_SUBST(libc_cv_cc_novzeroupper)
AC_SUBST(libc_cv_cc_fma4)
AC_SUBST(libc_cv_as_i686)
+AC_SUBST(libc_cv_sparc_as_vis3)
AC_SUBST(use_ldconfig)
AC_SUBST(ldd_rewrite_script)
Modified: fsf/trunk/libc/manual/llio.texi
==============================================================================
--- fsf/trunk/libc/manual/llio.texi (original)
+++ fsf/trunk/libc/manual/llio.texi Thu Mar 15 00:02:32 2012
@@ -1458,7 +1458,7 @@
@end table
-@code{msync} returns @math{0} for success and @math{-1} for
+@code{madvise} returns @math{0} for success and @math{-1} for
error. Errors include:
@table @code
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Thu Mar 15 00:02:32 2012
@@ -2656,6 +2656,24 @@
/* Principal square root should be returned (i.e., non-negative real
part). */
TEST_c_c (csqrt, 0, -1, M_SQRT_2_2, -M_SQRT_2_2);
+
+ TEST_c_c (csqrt, 0x1.fffffep+127L, 0x1.fffffep+127L, 2.026714405498316804978751017492482558075e+19L, 8.394925938143272988211878516208015586281e+18L);
+ TEST_c_c (csqrt, 0x1.fffffep+127L, 1.0L, 1.844674352395372953599975585936590505260e+19L, 2.710505511993121390769065968615872097053e-20L);
+ TEST_c_c (csqrt, 0x1p-149L, 0x1p-149L, 4.112805464342778798097003462770175200803e-23L, 1.703579802732953750368659735601389709551e-23L);
+ TEST_c_c (csqrt, 0x1p-147L, 0x1p-147L, 8.225610928685557596194006925540350401606e-23L, 3.407159605465907500737319471202779419102e-23L);
+
+#ifndef TEST_FLOAT
+ TEST_c_c (csqrt, 0x1.fffffffffffffp+1023L, 0x1.fffffffffffffp+1023L, 1.473094556905565378990473658199034571917e+154L, 6.101757441282702188537080005372547713595e+153L);
+ TEST_c_c (csqrt, 0x1.fffffffffffffp+1023L, 0x1p+1023L, 1.379778091031440685006200821918878702861e+154L, 3.257214233483129514781233066898042490248e+153L);
+ TEST_c_c (csqrt, 0x1p-1074L, 0x1p-1074L, 2.442109726130830256743814843868934877597e-162L, 1.011554969366634726113090867589031782487e-162L);
+ TEST_c_c (csqrt, 0x1p-1073L, 0x1p-1073L, 3.453664695497464982856905711457966660085e-162L, 1.430554756764195530630723976279903095110e-162L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
+ TEST_c_c (csqrt, 0x1.fp+16383L, 0x1.fp+16383L, 1.179514222452201722651836720466795901016e+2466L, 4.885707879516577666702435054303191575148e+2465L);
+ TEST_c_c (csqrt, 0x1.fp+16383L, 0x1p+16383L, 1.106698967236475180613254276996359485630e+2466L, 2.687568007603946993388538156299100955642e+2465L);
+ TEST_c_c (csqrt, 0x1p-16440L, 0x1p-16441L, 3.514690655930285351254618340783294558136e-2475L, 8.297059146828716918029689466551384219370e-2476L);
+#endif
END (csqrt, complex);
}
@@ -3556,6 +3574,19 @@
TEST_ff_f (hypot, -5.7e7, 0, 5.7e7L);
TEST_ff_f (hypot, 0.75L, 1.25L, 1.45773797371132511771853821938639577L);
+
+#if !(defined TEST_FLOAT && defined TEST_INLINE)
+ TEST_ff_f (hypot, 0x3p125L, 0x4p125L, 0x5p125L);
+ TEST_ff_f (hypot, 0x1.234566p-126L, 0x1.234566p-126L, 1.891441686191081936598531534017449451173e-38L);
+#endif
+
+#ifndef TEST_FLOAT
+ TEST_ff_f (hypot, 0x3p1021L, 0x4p1021L, 0x5p1021L);
+#endif
+
+#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 && !defined TEST_INLINE
+ TEST_ff_f (hypot, 0x3p16381L, 0x4p16381L, 0x5p16381L);
+#endif
END (hypot);
}
Modified: fsf/trunk/libc/math/s_csqrt.c
==============================================================================
--- fsf/trunk/libc/math/s_csqrt.c (original)
+++ fsf/trunk/libc/math/s_csqrt.c Thu Mar 15 00:02:32 2012
@@ -1,5 +1,5 @@
/* Complex square root of double value.
- Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@xxxxxxxxxxxxx>.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -21,7 +21,7 @@
#include <complex.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ double
__csqrt (__complex__ double x)
@@ -83,6 +83,22 @@
else
{
double d, r, s;
+ int scale = 0;
+
+ if (fabs (__real__ x) > DBL_MAX / 2.0
+ || fabs (__imag__ x) > DBL_MAX / 2.0)
+ {
+ scale = 1;
+ __real__ x = __scalbn (__real__ x, -2 * scale);
+ __imag__ x = __scalbn (__imag__ x, -2 * scale);
+ }
+ else if (fabs (__real__ x) < DBL_MIN
+ && fabs (__imag__ x) < DBL_MIN)
+ {
+ scale = -(DBL_MANT_DIG / 2);
+ __real__ x = __scalbn (__real__ x, -2 * scale);
+ __imag__ x = __scalbn (__imag__ x, -2 * scale);
+ }
d = __ieee754_hypot (__real__ x, __imag__ x);
/* Use the identity 2 Re res Im res = Im x
@@ -98,6 +114,12 @@
r = fabs ((0.5 * __imag__ x) / s);
}
+ if (scale)
+ {
+ r = __scalbn (r, scale);
+ s = __scalbn (s, scale);
+ }
+
__real__ res = r;
__imag__ res = __copysign (s, __imag__ x);
}
Modified: fsf/trunk/libc/math/s_csqrtf.c
==============================================================================
--- fsf/trunk/libc/math/s_csqrtf.c (original)
+++ fsf/trunk/libc/math/s_csqrtf.c Thu Mar 15 00:02:32 2012
@@ -1,5 +1,5 @@
/* Complex square root of float value.
- Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@xxxxxxxxxxxxx>.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -21,7 +21,7 @@
#include <complex.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ float
__csqrtf (__complex__ float x)
@@ -83,6 +83,22 @@
else
{
float d, r, s;
+ int scale = 0;
+
+ if (fabsf (__real__ x) > FLT_MAX / 2.0f
+ || fabsf (__imag__ x) > FLT_MAX / 2.0f)
+ {
+ scale = 1;
+ __real__ x = __scalbnf (__real__ x, -2 * scale);
+ __imag__ x = __scalbnf (__imag__ x, -2 * scale);
+ }
+ else if (fabsf (__real__ x) < FLT_MIN
+ && fabsf (__imag__ x) < FLT_MIN)
+ {
+ scale = -(FLT_MANT_DIG / 2);
+ __real__ x = __scalbnf (__real__ x, -2 * scale);
+ __imag__ x = __scalbnf (__imag__ x, -2 * scale);
+ }
d = __ieee754_hypotf (__real__ x, __imag__ x);
/* Use the identity 2 Re res Im res = Im x
@@ -98,6 +114,12 @@
r = fabsf ((0.5f * __imag__ x) / s);
}
+ if (scale)
+ {
+ r = __scalbnf (r, scale);
+ s = __scalbnf (s, scale);
+ }
+
__real__ res = r;
__imag__ res = __copysignf (s, __imag__ x);
}
Modified: fsf/trunk/libc/math/s_csqrtl.c
==============================================================================
--- fsf/trunk/libc/math/s_csqrtl.c (original)
+++ fsf/trunk/libc/math/s_csqrtl.c Thu Mar 15 00:02:32 2012
@@ -1,5 +1,5 @@
/* Complex square root of long double value.
- Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@xxxxxxxxxxxxx>.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -21,7 +21,7 @@
#include <complex.h>
#include <math.h>
#include <math_private.h>
-
+#include <float.h>
__complex__ long double
__csqrtl (__complex__ long double x)
@@ -83,6 +83,22 @@
else
{
long double d, r, s;
+ int scale = 0;
+
+ if (fabsl (__real__ x) > LDBL_MAX / 2.0L
+ || fabsl (__imag__ x) > LDBL_MAX / 2.0L)
+ {
+ scale = 1;
+ __real__ x = __scalbnl (__real__ x, -2 * scale);
+ __imag__ x = __scalbnl (__imag__ x, -2 * scale);
+ }
+ else if (fabsl (__real__ x) < LDBL_MIN
+ && fabsl (__imag__ x) < LDBL_MIN)
+ {
+ scale = -(LDBL_MANT_DIG / 2);
+ __real__ x = __scalbnl (__real__ x, -2 * scale);
+ __imag__ x = __scalbnl (__imag__ x, -2 * scale);
+ }
d = __ieee754_hypotl (__real__ x, __imag__ x);
/* Use the identity 2 Re res Im res = Im x
@@ -98,6 +114,12 @@
r = fabsl ((0.5L * __imag__ x) / s);
}
+ if (scale)
+ {
+ r = __scalbnl (r, scale);
+ s = __scalbnl (s, scale);
+ }
+
__real__ res = r;
__imag__ res = __copysignl (s, __imag__ x);
}
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 Thu Mar 15 00:02:32 2012
@@ -805,6 +805,26 @@
float: 1
ifloat: 1
+# csqrt
+Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 1.379778091031440685006200821918878702861e+154 + 3.257214233483129514781233066898042490248e+153 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 (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-1074 + 0x1p-1074 i) == 2.442109726130830256743814843868934877597e-162 + 1.011554969366634726113090867589031782487e-162 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-149 + 0x1p-149 i) == 4.112805464342778798097003462770175200803e-23 + 1.703579802732953750368659735601389709551e-23 i":
+ildouble: 1
+ldouble: 1
+
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
@@ -2054,6 +2074,10 @@
ildouble: 2
ldouble: 2
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "ctan":
double: 1
idouble: 1
Modified: fsf/trunk/libc/sysdeps/ieee754/flt-32/e_hypotf.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/flt-32/e_hypotf.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/flt-32/e_hypotf.c Thu Mar 15 00:02:32 2012
@@ -19,62 +19,35 @@
float
__ieee754_hypotf(float x, float y)
{
- float a,b,t1,t2,y1,y2,w;
- int32_t j,k,ha,hb;
+ double d_x, d_y;
+ int32_t ha, hb;
GET_FLOAT_WORD(ha,x);
ha &= 0x7fffffff;
GET_FLOAT_WORD(hb,y);
hb &= 0x7fffffff;
- if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
- SET_FLOAT_WORD(a,ha); /* a <- |a| */
- SET_FLOAT_WORD(b,hb); /* b <- |b| */
- if((ha-hb)>0xf000000) {return a+b;} /* x/y > 2**30 */
- k=0;
- if(__builtin_expect(ha > 0x58800000, 0)) { /* a>2**50 */
- if(ha >= 0x7f800000) { /* Inf or NaN */
- w = a+b; /* for sNaN */
- if(ha == 0x7f800000) w = a;
- if(hb == 0x7f800000) w = b;
- return w;
- }
- /* scale a and b by 2**-60 */
- ha -= 0x1e000000; hb -= 0x1e000000; k += 60;
- SET_FLOAT_WORD(a,ha);
- SET_FLOAT_WORD(b,hb);
- }
- if(__builtin_expect(hb < 0x26800000, 0)) { /* b < 2**-50 */
- if(hb <= 0x007fffff) { /* subnormal b or 0 */
- if(hb==0) return a;
- SET_FLOAT_WORD(t1,0x7e800000); /* t1=2^126 */
- b *= t1;
- a *= t1;
- k -= 126;
- } else { /* scale a and b by 2^60 */
- ha += 0x1e000000; /* a *= 2^60 */
- hb += 0x1e000000; /* b *= 2^60 */
- k -= 60;
- SET_FLOAT_WORD(a,ha);
- SET_FLOAT_WORD(b,hb);
- }
- }
- /* medium size a and b */
- w = a-b;
- if (w>b) {
- SET_FLOAT_WORD(t1,ha&0xfffff000);
- t2 = a-t1;
- w = __ieee754_sqrtf(t1*t1-(b*(-b)-t2*(a+t1)));
- } else {
- a = a+a;
- SET_FLOAT_WORD(y1,hb&0xfffff000);
- y2 = b - y1;
- SET_FLOAT_WORD(t1,ha+0x00800000);
- t2 = a - t1;
- w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b)));
- }
- if(k!=0) {
- SET_FLOAT_WORD(t1,0x3f800000+(k<<23));
- return t1*w;
- } else return w;
+ if (ha == 0x7f800000)
+ {
+ if (x == y)
+ return fabsf(y);
+ return fabsf(x);
+ }
+ else if (hb == 0x7f800000)
+ {
+ if (x == y)
+ return fabsf(x);
+ return fabsf(y);
+ }
+ else if (ha > 0x7f800000 || hb > 0x7f800000)
+ return fabsf(x) * fabsf(y);
+ else if (ha == 0)
+ return fabsf(y);
+ else if (hb == 0)
+ return fabsf(x);
+
+ d_x = (double) x;
+ d_y = (double) y;
+
+ return (float) __ieee754_sqrt(d_x * d_x + d_y * d_y);
}
strong_alias (__ieee754_hypotf, __hypotf_finite)
Added: fsf/trunk/libc/sysdeps/sparc/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/configure (added)
+++ fsf/trunk/libc/sysdeps/sparc/configure Thu Mar 15 00:02:32 2012
@@ -1,0 +1,124 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/sparc.
+
+# Check for support of VIS3 et al. instructions in the assembler.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc assembler VIS3 support" >&5
+$as_echo_n "checking for sparc assembler VIS3 support... " >&6; }
+if ${libc_cv_sparc_as_vis3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.S <<\EOF
+ .text
+foo: fmadds %f1, %f2, %f3, %f5
+ fmaddd %f2, %f4, %f8, %f10
+ fhadds %f2, %f3, %f5
+ fhaddd %f4, %f8, %f10
+ pdistn %f2, %f4, %g1
+ movdtox %f10, %o0
+ movstouw %f9, %o1
+ movstosw %f7, %o2
+ movxtod %o3, %f18
+ movwtos %o4, %f15
+ flcmps %fcc0, %f3, %f5
+ flcmpd %fcc1, %f4, %f6
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_sparc_as_vis3=yes
+else
+ libc_cv_sparc_as_vis3=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparc_as_vis3" >&5
+$as_echo "$libc_cv_sparc_as_vis3" >&6; }
+if test $libc_cv_sparc_as_vis3 = yes; then
+ $as_echo "#define HAVE_AS_VIS3_SUPPORT 1" >>confdefs.h
+
+fi
Added: fsf/trunk/libc/sysdeps/sparc/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/configure.in (added)
+++ fsf/trunk/libc/sysdeps/sparc/configure.in Thu Mar 15 00:02:32 2012
@@ -1,0 +1,30 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/sparc.
+
+# Check for support of VIS3 et al. instructions in the assembler.
+AC_CACHE_CHECK(for sparc assembler VIS3 support, libc_cv_sparc_as_vis3, [dnl
+cat > conftest.S <<\EOF
+ .text
+foo: fmadds %f1, %f2, %f3, %f5
+ fmaddd %f2, %f4, %f8, %f10
+ fhadds %f2, %f3, %f5
+ fhaddd %f4, %f8, %f10
+ pdistn %f2, %f4, %g1
+ movdtox %f10, %o0
+ movstouw %f9, %o1
+ movstosw %f7, %o2
+ movxtod %o3, %f18
+ movwtos %o4, %f15
+ flcmps %fcc0, %f3, %f5
+ flcmpd %fcc1, %f4, %f6
+EOF
+dnl
+if AC_TRY_COMMAND([${CC-cc} -c $CFLAGS -Wa,-Av9d conftest.S]); then
+ libc_cv_sparc_as_vis3=yes
+else
+ libc_cv_sparc_as_vis3=no
+fi
+rm -f conftest*])
+if test $libc_cv_sparc_as_vis3 = yes; then
+ AC_DEFINE(HAVE_AS_VIS3_SUPPORT)
+fi
Modified: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/Makefile Thu Mar 15 00:02:32 2012
@@ -5,9 +5,18 @@
elide-routines.os += hp-timing
endif
+ifeq ($(have-as-vis3),yes)
+ASFLAGS-.o += -Wa,-Av9d
+ASFLAGS-.os += -Wa,-Av9d
+ASFLAGS-.op += -Wa,-Av9d
+ASFLAGS-.og += -Wa,-Av9d
+ASFLAGS-.ob += -Wa,-Av9d
+ASFLAGS-.oS += -Wa,-Av9d
+else
ASFLAGS-.o += -Wa,-Av9a
ASFLAGS-.os += -Wa,-Av9a
ASFLAGS-.op += -Wa,-Av9a
ASFLAGS-.og += -Wa,-Av9a
ASFLAGS-.ob += -Wa,-Av9a
ASFLAGS-.oS += -Wa,-Av9a
+endif
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile Thu Mar 15 00:02:32 2012
@@ -1,0 +1,9 @@
+ifeq ($(subdir),math)
+ifeq ($(have-as-vis3),yes)
+libm-sysdep_routines += m_copysignf-vis3 m_copysign-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
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign-vis3.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,30 @@
+/* copysign 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 (__copysign_vis3)
+ sethi %hi(0x80000000), %g1
+ and %o2, %g1, %o4
+ andn %o0, %g1, %o0
+ or %o0, %o4, %o0
+ movwtos %o0, %f0
+ retl
+ movwtos %o1, %f1
+END (__copysign_vis3)
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysign.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+ .text
+ENTRY(__copysign)
+ .type __copysign, @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(__copysign_vis3), %o1
+ xor %o1, %gdop_lox10(__copysign_vis3), %o1
+# else
+ set __copysign_vis3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# endif
+# ifdef SHARED
+ sethi %gdop_hix22(__copysign_generic), %o1
+ xor %o1, %gdop_lox10(__copysign_generic), %o1
+# else
+ set __copysign_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__copysign)
+weak_alias (__copysign, copysign)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __copysign __copysign_generic
+
+#include "../../../fpu/s_copysign.S"
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf-vis3.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,29 @@
+/* float copysign 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 (__copysignf_vis3)
+ sethi %hi(0x80000000), %g1
+ and %o1, %g1, %o4
+ andn %o0, %g1, %o0
+ or %o0, %o4, %o0
+ retl
+ movwtos %o0, %f0
+END (__copysignf_vis3)
Added: fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_copysignf.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+ .text
+ENTRY(__copysignf)
+ .type __copysignf, @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(__copysignf_vis3), %o1
+ xor %o1, %gdop_lox10(__copysignf_vis3), %o1
+# else
+ set __copysignf_vis3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# endif
+# ifdef SHARED
+ sethi %gdop_hix22(__copysignf_generic), %o1
+ xor %o1, %gdop_lox10(__copysignf_generic), %o1
+# else
+ set __copysignf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__copysignf)
+weak_alias (__copysignf, copysignf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __copysignf __copysignf_generic
+
+#include "../../../fpu/s_copysignf.S"
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/Makefile Thu Mar 15 00:02:32 2012
@@ -6,3 +6,12 @@
ifeq ($(subdir),string)
sysdep_routines += align-cpy
endif
+
+ifeq ($(have-as-vis3),yes)
+ASFLAGS-.o += -Wa,-Av9d
+ASFLAGS-.os += -Wa,-Av9d
+ASFLAGS-.op += -Wa,-Av9d
+ASFLAGS-.og += -Wa,-Av9d
+ASFLAGS-.ob += -Wa,-Av9d
+ASFLAGS-.oS += -Wa,-Av9d
+endif
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/Makefile Thu Mar 15 00:02:32 2012
@@ -1,0 +1,9 @@
+ifeq ($(subdir),math)
+ifeq ($(have-as-vis3),yes)
+libm-sysdep_routines += m_signbitf-vis3 m_signbit-vis3
+sysdep_routines += s_signbitf-vis3 s_signbit-vis3
+
+CFLAGS-s_signbitf-vis3.S = -Wa,-Av9d
+CFLAGS-s_signbit-vis3.S = -Wa,-Av9d
+endif
+endif
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit-vis3.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,25 @@
+/* signbit(). sparc64 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 (__signbit_vis3)
+ movdtox %f0, %o0
+ retl
+ srlx %o0, 63, %o0
+END (__signbit_vis3)
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbit.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,57 @@
+#include <sysdep.h>
+
+ .text
+ENTRY(__signbit)
+ .type __signbit, @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(__signbit_vis3), %o1
+ xor %o1, %gdop_lox10(__signbit_vis3), %o1
+# else
+ set __signbit_vis3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# endif
+# ifdef SHARED
+ sethi %gdop_hix22(__signbit_generic), %o1
+ xor %o1, %gdop_lox10(__signbit_generic), %o1
+# else
+ set __signbit_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__signbit)
+weak_alias (__signbit, signbit)
+
+/* On 64-bit the double version will also always work for
+ long-double-precision since in both cases the word with the
+ sign bit in it is passed always in register %f0. */
+strong_alias (__signbit, __signbitl)
+hidden_def (__signbitl)
+weak_alias (__signbitl, signbitl)
+
+# undef weak_alias
+# define weak_alias(a, b)
+# undef strong_alias
+# define strong_alias(a, b)
+# undef hidden_def
+# define hidden_def(a)
+
+#define __signbit __signbit_generic
+
+#include "../s_signbit.S"
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf-vis3.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,25 @@
+/* signbitf(). sparc64 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 (__signbitf_vis3)
+ movstouw %f1, %o0
+ retl
+ srl %o0, 31, %o0
+END (__signbitf_vis3)
Added: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S (added)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/multiarch/s_signbitf.S Thu Mar 15 00:02:32 2012
@@ -1,0 +1,46 @@
+#include <sysdep.h>
+
+ .text
+ENTRY(__signbitf)
+ .type __signbitf, @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(__signbitf_vis3), %o1
+ xor %o1, %gdop_lox10(__signbitf_vis3), %o1
+# else
+ set __signbitf_vis3, %o1
+# endif
+ ba 10f
+ nop
+9:
+# endif
+# ifdef SHARED
+ sethi %gdop_hix22(__signbitf_generic), %o1
+ xor %o1, %gdop_lox10(__signbitf_generic), %o1
+# else
+ set __signbitf_generic, %o1
+# endif
+# ifdef HAVE_AS_VIS3_SUPPORT
+10:
+# endif
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__signbitf)
+weak_alias (__signbitf, signbitf)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+#define __signbitf __signbitf_generic
+
+#include "../s_signbitf.S"
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysign.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysign.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysign.S Thu Mar 15 00:02:32 2012
@@ -20,9 +20,8 @@
#include <sysdep.h>
ENTRY (__copysign)
- sethi %hi(0x80000000), %g1
- st %g1, [%sp + STACK_BIAS + 128]
- ld [%sp + STACK_BIAS + 128], %f7
+ fzeros %f7
+ fnegs %f7, %f7
fands %f2, %f7, %f9
fandnot2s %f0, %f7, %f0
retl
Modified: fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysignf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysignf.S (original)
+++ fsf/trunk/libc/sysdeps/sparc/sparc64/fpu/s_copysignf.S Thu Mar 15 00:02:32 2012
@@ -20,9 +20,8 @@
#include <sysdep.h>
ENTRY (__copysignf)
- sethi %hi(0x80000000), %g1
- st %g1, [%sp + STACK_BIAS + 128]
- ld [%sp + STACK_BIAS + 128], %f7
+ fzeros %f7
+ fnegs %f7, %f7
fands %f3, %f7, %f9
fandnot2s %f1, %f7, %f1
retl
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/Makefile Thu Mar 15 00:02:32 2012
@@ -34,9 +34,7 @@
bits/a.out.h sys/inotify.h sys/signalfd.h sys/eventfd.h \
sys/timerfd.h sys/fanotify.h bits/eventfd.h bits/inotify.h \
bits/signalfd.h bits/timerfd.h bits/epoll.h \
- bits/socket_type.h
-
-install-others += $(inst_includedir)/bits/syscall.h
+ bits/socket_type.h bits/syscall.h
tests += tst-clone
@@ -62,7 +60,7 @@
syscall-list-includes := bits/wordsize.h
endif
-$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
+$(objpfx)bits/syscall%h $(objpfx)bits/syscall%d: ../sysdeps/unix/sysv/linux/sys/syscall.h
$(make-target-directory)
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
@@ -97,17 +95,11 @@
rm -f $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v))
mv -f $(@:.h=.d)-t3 $(@:.h=.d)
-$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
- $(make-target-directory)
- if test -r $@ && cmp -s $< $@; \
- then echo 'bits/syscall.h unchanged'; \
- else $(INSTALL_DATA) $< $@; fi
-
ifndef no_deps
# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
--include $(objpfx)syscall-list.d
+-include $(objpfx)bits/syscall.d
endif
-generated += syscall-list.h syscall-list.d
+generated += bits/syscall.h bits/syscall.d
endif
ifeq ($(subdir),time)
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps Thu Mar 15 00:02:32 2012
@@ -848,6 +848,35 @@
Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 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 "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 (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-1074 + 0x1p-1074 i) == 2.442109726130830256743814843868934877597e-162 + 1.011554969366634726113090867589031782487e-162 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1p-149 + 0x1p-149 i) == 4.112805464342778798097003462770175200803e-23 + 1.703579802732953750368659735601389709551e-23 i":
+ildouble: 1
+ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
@@ -2033,8 +2062,18 @@
ldouble: 2
Function: Real part of "csqrt":
-float: 1
-ifloat: 1
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "csqrt":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ctan":
double: 1
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits