forked from pool/glibc
Accepting request 20918 from Base:System
Copy from Base:System/glibc based on submit request 20918 from user oertel OBS-URL: https://build.opensuse.org/request/show/20918 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=11
This commit is contained in:
parent
fe9524db06
commit
da8f6e33a1
3
glibc-2.10.1-44dbdf3777.tar.bz2
Normal file
3
glibc-2.10.1-44dbdf3777.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7a101729724f4487592df4011be0f9766992cc6cf70b39b07c45875897ce742
|
||||
size 15594985
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:471795a00773501701112c90b7d0f4925e83d9922d9c300ad7c7c39804678326
|
||||
size 15601511
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 19 14:13:43 CEST 2009 - pbaudis@suse.cz
|
||||
|
||||
- Update to glibc-2.10.1-44dbdf3777 of glibc/pb-stable.git glibc-2.10-branch
|
||||
(Still the same source is used for glibc-ports.) - random minor fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 18 21:40:04 CEST 2009 - coolo@novell.com
|
||||
|
||||
- add /etc/apparmor.d to the nscd file list
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 14 23:53:20 CEST 2009 - pbaudis@suse.cz
|
||||
|
||||
- define _filter_GLIBC_PRIVATE so that our glibc is not marked to
|
||||
provide these symbols [bnc#468748]
|
||||
- Fix exception behaviour of various libm functions by AMD optimized
|
||||
for x86_64 [bnc#487576]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 8 13:15:04 CEST 2009 - pbaudis@suse.cz
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
Name: glibc
|
||||
BuildRequires: gcc-c++ libstdc++-devel
|
||||
BuildRequires: libselinux-devel
|
||||
%define _filter_GLIBC_PRIVATE 1
|
||||
%define build_locales 1
|
||||
%define run_testsuite 0
|
||||
%define disable_assert 0
|
||||
@ -69,13 +70,13 @@ Obsoletes: glibc-32bit
|
||||
Provides: rtld(GNU_HASH)
|
||||
AutoReqProv: on
|
||||
Version: 2.10.1
|
||||
Release: 8
|
||||
Release: 9
|
||||
Url: http://www.gnu.org/software/libc/libc.html
|
||||
PreReq: filesystem
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# The glibc source comes from http://repo.or.cz/w/glibc/pb-stable.git
|
||||
# glibc-2.10-branch.
|
||||
Source: glibc-%{version}-aa152ec6ad.tar.bz2
|
||||
Source: glibc-%{version}-44dbdf3777.tar.bz2
|
||||
Source2: glibc-ports-%{version}-2b2b217196.tar.bz2
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
@ -140,6 +141,7 @@ Patch46: glibc-2.10-mcheck-free-race.diff
|
||||
Patch47: glibc-2.10.99-ia64-include.diff
|
||||
Patch48: glibc-utmp-timeout-raise.diff
|
||||
Patch49: glibc-nscd-assert.diff
|
||||
Patch50: libm-x86-64-exceptions.diff
|
||||
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
|
||||
Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff
|
||||
Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
|
||||
@ -346,6 +348,7 @@ rm sysdeps/x86_64/fpu/s_sincos.S
|
||||
%patch47
|
||||
%patch48
|
||||
%patch49
|
||||
%patch50
|
||||
%ifarch %arm armv5tel armv7l
|
||||
%patch500
|
||||
%patch501
|
||||
@ -1036,6 +1039,7 @@ exit 0
|
||||
%files -n nscd
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) /etc/nscd.conf
|
||||
%dir /etc/apparmor.d
|
||||
%config /etc/apparmor.d/usr.sbin.nscd
|
||||
%config /etc/init.d/nscd
|
||||
/usr/sbin/nscd
|
||||
|
553
libm-x86-64-exceptions.diff
Normal file
553
libm-x86-64-exceptions.diff
Normal file
@ -0,0 +1,553 @@
|
||||
diff -u sysdeps/x86_64/fpu/libm_inlines_amd.h fpu_new/libm_inlines_amd.h
|
||||
--- sysdeps/x86_64/fpu/libm_inlines_amd.h 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/libm_inlines_amd.h 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -254,6 +254,33 @@
|
||||
|
||||
|
||||
#if defined(USE_RAISE_FPSW_FLAGS)
|
||||
+static inline void raise_fp_exc(int flags)
|
||||
+{
|
||||
+ if((flags & AMD_F_UNDERFLOW) == AMD_F_UNDERFLOW)
|
||||
+ {
|
||||
+ double a = 0x1.0p-1022;
|
||||
+ __asm __volatile ("mulsd %1, %0" : "+x" (a));
|
||||
+ }
|
||||
+
|
||||
+ if((flags & AMD_F_OVERFLOW) == AMD_F_OVERFLOW)
|
||||
+ {
|
||||
+ double a = 0x1.fffffffffffffp1023;
|
||||
+ __asm __volatile ("mulsd %1, %0" : "+x" (a));
|
||||
+ }
|
||||
+
|
||||
+ if((flags & AMD_F_DIVBYZERO) == AMD_F_DIVBYZERO)
|
||||
+ {
|
||||
+ double a = 1.0, b = 0.0;
|
||||
+ __asm __volatile ("divsd %1, %0" : "+x" (a) : "x" (b));
|
||||
+ }
|
||||
+
|
||||
+ if((flags & AMD_F_INVALID) == AMD_F_INVALID)
|
||||
+ {
|
||||
+ double a = 0.0;
|
||||
+ __asm __volatile ("divsd %1, %0" : "+x" (a));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Raises floating-point status flags. The argument should be
|
||||
the bitwise or of the flags to be raised, from the
|
||||
list above, e.g.
|
||||
@@ -269,11 +296,7 @@
|
||||
/* Put the floating-point environment back */
|
||||
__asm fldenv fenv;
|
||||
#elif defined(linux)
|
||||
- unsigned int cw;
|
||||
- /* Get the current floating-point control/status word */
|
||||
- asm volatile ("STMXCSR %0" : "=m" (cw));
|
||||
- cw |= flags;
|
||||
- asm volatile ("LDMXCSR %0" : : "m" (cw));
|
||||
+ raise_fp_exc(flags);
|
||||
#else
|
||||
#error Unknown machine
|
||||
#endif
|
||||
Only in sysdeps/x86_64/fpu/: LICENSE
|
||||
diff -u sysdeps/x86_64/fpu/s_atan2.c fpu_new/s_atan2.c
|
||||
--- sysdeps/x86_64/fpu/s_atan2.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_atan2.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -595,6 +595,14 @@
|
||||
if (yneg) return val_with_flags(-piby2,AMD_F_INEXACT);
|
||||
else val_with_flags(piby2,AMD_F_INEXACT);
|
||||
}
|
||||
+ else if((!xneg) && xinf && (!yinf) && (!yzero))
|
||||
+ {
|
||||
+ if(yneg)
|
||||
+ return -0.0;
|
||||
+ else
|
||||
+ return 0.0;
|
||||
+ }
|
||||
+
|
||||
|
||||
/* Scale up both x and y if they are both below 1/4.
|
||||
This avoids any possible later denormalised arithmetic. */
|
||||
diff -u sysdeps/x86_64/fpu/s_atan2f.c fpu_new/s_atan2f.c
|
||||
--- sysdeps/x86_64/fpu/s_atan2f.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_atan2f.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -349,6 +349,14 @@
|
||||
if (yneg) return val_with_flags(-piby2,AMD_F_INEXACT);
|
||||
else val_with_flags(piby2,AMD_F_INEXACT);
|
||||
}
|
||||
+ else if((!xneg) && xinf && (!yinf) && (!yzero))
|
||||
+ {
|
||||
+ if(yneg)
|
||||
+ return -0.0;
|
||||
+ else
|
||||
+ return 0.0;
|
||||
+ }
|
||||
+
|
||||
|
||||
if (diffexp > 26)
|
||||
{ /* abs(y)/abs(x) > 2^26 => arctan(x/y)
|
||||
diff -u sysdeps/x86_64/fpu/s_atan.c fpu_new/s_atan.c
|
||||
--- sysdeps/x86_64/fpu/s_atan.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_atan.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if (aux == 0) /* if x=0, then result is precise */
|
||||
return x;
|
||||
else
|
||||
- return val_with_flags(x, AMD_F_INEXACT);
|
||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
||||
}
|
||||
|
||||
/* Argument reduction to range [-7/16,7/16] */
|
||||
diff -u sysdeps/x86_64/fpu/s_atanf.c fpu_new/s_atanf.c
|
||||
--- sysdeps/x86_64/fpu/s_atanf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_atanf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if (aux == 0) /* if x=0, then result is precise */
|
||||
return fx;
|
||||
else
|
||||
- return valf_with_flags(fx, AMD_F_INEXACT);
|
||||
+ return valf_with_flags(fx, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
||||
}
|
||||
|
||||
v = x;
|
||||
diff -u sysdeps/x86_64/fpu/s_sincos.c fpu_new/s_sincos.c
|
||||
--- sysdeps/x86_64/fpu/s_sincos.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_sincos.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- *s = x;
|
||||
+ *s = val_with_flags(x, AMD_F_INEXACT);
|
||||
*c = val_with_flags(1.0, AMD_F_INEXACT);
|
||||
}
|
||||
}
|
||||
diff -u sysdeps/x86_64/fpu/s_sincosf.c fpu_new/s_sincosf.c
|
||||
--- sysdeps/x86_64/fpu/s_sincosf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_sincosf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+(C) 2002 Advanced Micro Devices, Inc.
|
||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
+ LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
diff -u sysdeps/x86_64/fpu/s_tanf.c fpu_new/s_tanf.c
|
||||
--- sysdeps/x86_64/fpu/s_tanf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/s_tanf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
-** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
- AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+(C) 2002 Advanced Micro Devices, Inc.
|
||||
+** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
+ AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
+ LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#undef USE_NAN_WITH_FLAGS
|
||||
#undef USE_REMAINDER_PIBY2F_INLINE
|
||||
|
||||
-/* tan(x) approximation valid on the interval [-pi/4,pi/4].
|
||||
+/* tan(x) approximation valid on the interval [-pi/4,pi/4].
|
||||
If recip is true return -1/tan(x) instead. */
|
||||
static inline double tanf_piby4(double x, int recip)
|
||||
{
|
||||
diff -u sysdeps/x86_64/fpu/w_asin.c fpu_new/w_asin.c
|
||||
--- sysdeps/x86_64/fpu/w_asin.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_asin.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
|
||||
if (xexp < -28)
|
||||
{ /* y small enough that arcsin(x) = x */
|
||||
- return val_with_flags(x, AMD_F_INEXACT);
|
||||
+ if(aux == 0) return x;
|
||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
||||
}
|
||||
else if (xnan) return x + x;
|
||||
else if (xexp >= 0)
|
||||
diff -u sysdeps/x86_64/fpu/w_asinf.c fpu_new/w_asinf.c
|
||||
--- sysdeps/x86_64/fpu/w_asinf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_asinf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -75,8 +75,11 @@
|
||||
/* Special cases */
|
||||
|
||||
if (xexp < -14)
|
||||
+ {
|
||||
/* y small enough that arcsin(x) = x */
|
||||
- return valf_with_flags(x, AMD_F_INEXACT);
|
||||
+ if(aux == 0 ) return x;
|
||||
+ return valf_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
||||
+ }
|
||||
else if (xnan) return x + x;
|
||||
else if (xexp >= 0)
|
||||
{
|
||||
diff -u sysdeps/x86_64/fpu/w_hypotf.c fpu_new/w_hypotf.c
|
||||
--- sysdeps/x86_64/fpu/w_hypotf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_hypotf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -79,6 +79,20 @@
|
||||
return retval;
|
||||
}
|
||||
|
||||
+ /* Set x = abs(x) and y = abs(y) */
|
||||
+ if (ux == 0)
|
||||
+ {
|
||||
+ /* x is zero */
|
||||
+ PUT_BITS_DP64(avy, dy);
|
||||
+ return dy;
|
||||
+ }
|
||||
+ if (uy == 0)
|
||||
+ {
|
||||
+ /* y is zero */
|
||||
+ PUT_BITS_DP64(avx, dx);
|
||||
+ return dx;
|
||||
+ }
|
||||
+
|
||||
dr = (dx*dx + dy*dy);
|
||||
|
||||
#if USE_SOFTWARE_SQRT
|
||||
diff -u sysdeps/x86_64/fpu/w_pow.c fpu_new/w_pow.c
|
||||
--- sysdeps/x86_64/fpu/w_pow.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_pow.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -364,8 +364,20 @@
|
||||
{
|
||||
/* y is -ve */
|
||||
if (ax == 0)
|
||||
- /* abs(x) = 0.0. Return +infinity. */
|
||||
- return retval_errno_edom(argx, argy, 1);
|
||||
+ {
|
||||
+ if(yinf)
|
||||
+ {
|
||||
+ /* Return +infinity with no flags */
|
||||
+ double sz;
|
||||
+ PUT_BITS_DP64(PINFBITPATT_DP64, sz);
|
||||
+ return sz;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* abs(x) = 0.0. Return +infinity. */
|
||||
+ return retval_errno_edom(argx, argy, 1);
|
||||
+ }
|
||||
+ }
|
||||
else if (ax < 0x3ff0000000000000)
|
||||
{
|
||||
/* abs(x) < 1.0; return +infinity. */
|
||||
diff -u sysdeps/x86_64/fpu/w_powf.c fpu_new/w_powf.c
|
||||
--- sysdeps/x86_64/fpu/w_powf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_powf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -175,8 +175,20 @@
|
||||
{
|
||||
/* y is -ve */
|
||||
if (ax == 0)
|
||||
- /* abs(x) = 0.0. Return +infinity. */
|
||||
- return retval_errno_edom(x, y, 1);
|
||||
+ {
|
||||
+ if(yinf)
|
||||
+ {
|
||||
+ /* Return +infinity with no flags */
|
||||
+ float sz;
|
||||
+ PUT_BITS_SP32(PINFBITPATT_SP32, sz);
|
||||
+ return sz;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* abs(x) = 0.0. Return +infinity. */
|
||||
+ return retval_errno_edom(x, y, 1);
|
||||
+ }
|
||||
+ }
|
||||
else if (ax < 0x3f800000)
|
||||
{
|
||||
/* abs(x) < 1.0; return +infinity. */
|
||||
diff -u sysdeps/x86_64/fpu/w_remainder.c fpu_new/w_remainder.c
|
||||
--- sysdeps/x86_64/fpu/w_remainder.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_remainder.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -69,11 +69,31 @@
|
||||
{
|
||||
/* x is NaN or infinity */
|
||||
if (ux & MANTBITS_DP64)
|
||||
- /* x is NaN */
|
||||
- return dx + dx; /* Raise invalid if it is a signalling NaN */
|
||||
+ {
|
||||
+ if( (yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64) )
|
||||
+ {
|
||||
+ /* y is also NaN */
|
||||
+ return dx + dy;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* x is NaN */
|
||||
+ return dx + dx; /* Raise invalid if it is a signalling NaN */
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- /* x is infinity; result is NaN */
|
||||
- return nan_with_flags(AMD_F_INVALID);
|
||||
+ {
|
||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
||||
+ {
|
||||
+ /* y is NaN */
|
||||
+ return dy+dy;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* x is infinity; result is NaN */
|
||||
+ return nan_with_flags(AMD_F_INVALID);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else if (yexp > BIASEDEMAX_DP64)
|
||||
{
|
||||
diff -u sysdeps/x86_64/fpu/w_remainderf.c fpu_new/w_remainderf.c
|
||||
--- sysdeps/x86_64/fpu/w_remainderf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_remainderf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -50,11 +50,31 @@
|
||||
{
|
||||
/* x is NaN or infinity */
|
||||
if (ux & MANTBITS_DP64)
|
||||
- /* x is NaN */
|
||||
- return dx + dx; /* Raise invalid if it is a signalling NaN */
|
||||
+ {
|
||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
||||
+ {
|
||||
+ /* y is also NaN */
|
||||
+ return dx + dy;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* x is NaN */
|
||||
+ return dx + dx; /* Raise invalid if it is a signalling NaN */
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- /* x is infinity; result is NaN */
|
||||
- return nan_with_flags(AMD_F_INVALID);
|
||||
+ {
|
||||
+ if((yexp > BIASEDEMAX_DP64) && (uy & MANTBITS_DP64))
|
||||
+ {
|
||||
+ /* y is NaN */
|
||||
+ return dy+dy;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* x is infinity; result is NaN */
|
||||
+ return nan_with_flags(AMD_F_INVALID);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else if (yexp > BIASEDEMAX_DP64)
|
||||
{
|
||||
diff -u sysdeps/x86_64/fpu/w_sinh.c fpu_new/w_sinh.c
|
||||
--- sysdeps/x86_64/fpu/w_sinh.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_sinh.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
/* with no inexact */
|
||||
return x;
|
||||
else
|
||||
- return val_with_flags(x, AMD_F_INEXACT);
|
||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW);
|
||||
}
|
||||
else if (aux >= 0x7ff0000000000000) /* |x| is NaN or Inf */
|
||||
return x + x;
|
||||
diff -u sysdeps/x86_64/fpu/w_sinhf.c fpu_new/w_sinhf.c
|
||||
--- sysdeps/x86_64/fpu/w_sinhf.c 2009-09-11 14:26:54.000000000 -0500
|
||||
+++ sysdeps/x86_64/fpu/w_sinhf.c 2009-09-11 15:36:54.000000000 -0500
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
-(C) 2002 Advanced Micro Devices, Inc.
|
||||
+(C) 2002, 2009 Advanced Micro Devices, Inc.
|
||||
** YOUR USE OF THIS LIBRARY IS SUBJECT TO THE TERMS
|
||||
AND CONDITIONS OF THE GNU LESSER GENERAL PUBLIC
|
||||
- LICENSE FOUND IN THE "README" FILE THAT IS INCLUDED WITH
|
||||
+ LICENSE FOUND IN THE "LICENSE" FILE THAT IS INCLUDED WITH
|
||||
THIS LIBRARY**
|
||||
*/
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
#define USE_SCALEDOUBLE_1
|
||||
#define USE_SCALEDOUBLE_2
|
||||
#define USE_INFINITY_WITH_FLAGS
|
||||
+#define USE_VAL_WITH_FLAGS
|
||||
#include "libm_inlines_amd.h"
|
||||
#undef USE_SPLITEXP
|
||||
#undef USE_SCALEDOUBLE_1
|
||||
#undef USE_SCALEDOUBLE_2
|
||||
#undef USE_INFINITY_WITH_FLAGS
|
||||
+#undef USE_VAL_WITH_FLAGS
|
||||
|
||||
/* Deal with errno for out-of-range result */
|
||||
#include "libm_errno_amd.h"
|
||||
@@ -166,7 +168,8 @@
|
||||
if (aux < 0x3f10000000000000) /* |x| small enough that sinh(x) = x */
|
||||
{
|
||||
if (aux == 0) return x; /* with no inexact */
|
||||
- if (LAMBDA_DP64 + x > 1.0) return x; /* with inexact */
|
||||
+ else
|
||||
+ return val_with_flags(x, AMD_F_INEXACT | AMD_F_UNDERFLOW); /* with inexact */
|
||||
}
|
||||
else if (aux >= 0x7ff0000000000000) /* |x| is NaN or Inf */
|
||||
return x + x;
|
Loading…
Reference in New Issue
Block a user