summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-04-12 07:48:58 +0000
committerJakub Jelinek <jakub@redhat.com>2008-04-12 07:48:58 +0000
commit14e44061ad888abbea7239599a9109b41776e41c (patch)
tree258e74578e51d985048e70482acab48bc5cf591a
parenta346458fa85decb63d2bf237c62f58ca46450c3b (diff)
Updated to fedora-glibc-20080412T0741cvs/fedora-glibc-2_8-1
-rw-r--r--ChangeLog51
-rw-r--r--elf/tls-macros.h9
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in5
-rw-r--r--include/features.h2
-rw-r--r--include/fenv.h1
-rw-r--r--math/s_significandl.c2
-rw-r--r--scripts/data/localplt-powerpc64-linux-gnu.data6
-rw-r--r--sysdeps/i386/i686/memcpy.S2
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j0l.c16
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c16
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_expl.c8
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_expm1l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_log1pl.c8
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c8
-rw-r--r--sysdeps/powerpc/bits/fenv.h7
-rw-r--r--sysdeps/powerpc/fpu/e_sqrt.c8
-rw-r--r--sysdeps/powerpc/fpu/e_sqrtf.c8
-rw-r--r--sysdeps/powerpc/fpu/fe_nomask.c5
-rw-r--r--sysdeps/powerpc/fpu/fedisblxcpt.c6
-rw-r--r--sysdeps/powerpc/fpu/feenablxcpt.c6
-rw-r--r--sysdeps/powerpc/fpu/fegetexcept.c7
-rw-r--r--sysdeps/powerpc/fpu/fenv_libc.h6
-rw-r--r--sysdeps/powerpc/fpu/fraiseexcpt.c11
-rw-r--r--sysdeps/unix/sysv/linux/configure2
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h132
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c5
-rw-r--r--version.h4
30 files changed, 280 insertions, 74 deletions
diff --git a/ChangeLog b/ChangeLog
index 1faab8a4b8..f1969c4e33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2008-04-11 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h (__signbitl):
+ Also use for 32-bit.
+ * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c (__nearbyintl): Use
+ __nextafter instead of nextafter to avoid local PLT.
+ * sysdeps/powerpc/fpu/e_sqrt.c: Avoid call to fetestexcept.
+ * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
+
+ * scripts/data/localplt-powerpc64-linux-gnu.data: New file.
+
+ * sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
+ __fe_nomask_env.
+ * sysdeps/powerpc/fpu/fe_nomask.c: Add libm_hidden_def. Include
+ <fenv_libc.h> instead of <fenv.h>.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise.
+
+ * sysdeps/powerpc/bits/fenv.h: Make safe for C++.
+
+ * sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h: New file.
+ * sysdeps/powerpc/fpu/fegetexcept.c (__fegetexcept): Rename
+ function from fegetexcept and make old name weak alias.
+ * include/fenv.h: Declare __fegetexcept.
+ * sysdeps/powerpc/fpu/fedisblxcpt.c: Use __fegetexcept instead of
+ fegetexcept.
+ * sysdeps/powerpc/fpu/feenablxcpt.c: Likewise.
+ * sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Avoid call
+ to fetestexcept.
+ * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Use __frexpl
+ instead of frexpl to avoid local PLT.
+ * math/s_significandl.c (__significandl): Use __ilogbl instead of
+ ilogbl to avoid local PLT.
+ * sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __ldexpl
+ instead of ldexpl to avoid local PLT.
+ * sysdeps/ieee754/ldbl-128ibm/e_expl.c (__ieee754_expl): Use
+ __roundl not roundl to avoid local PLT.
+ * sysdeps/ieee754/ldbl-128/e_j0l.c: Use function names which avoid
+ local PLTs. Use __sincosl instead of separate sinl and cosl
+ calls.
+ * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/configure.in: Bump minimal kernel
+ version for ppc64 to 2.4.21 since without it makecontext will fail.
+
+ * elf/tls-macros.h [__powerpc64__] (__TLS_GET_ADDR): Define according
+ to the ABI in use.
+ [__powerpc64__] (TLS_LD): Use __TLS_GET_ADDR instead of
+ .__tls_get_addr.
+ [__powerpc64__] (TLS_GD): Likewise.
+
2007-11-20 Ryan S. Arnold <rsa@us.ibm.com>
[BZ #4997]
diff --git a/elf/tls-macros.h b/elf/tls-macros.h
index 37cbe7514f..6463a6c3f9 100644
--- a/elf/tls-macros.h
+++ b/elf/tls-macros.h
@@ -813,12 +813,17 @@ register void *__gp __asm__("$29");
: "=b" (__result) ); \
__result; \
})
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+# define __TLS_GET_ADDR ".__tls_get_addr"
+# else
+# define __TLS_GET_ADDR "__tls_get_addr"
+# endif
/* PowerPC64 Local Dynamic TLS access. */
# define TLS_LD(x) \
({ int * __result; \
asm ( \
" addi 3,2," #x "@got@tlsld\n" \
- " bl .__tls_get_addr\n" \
+ " bl " __TLS_GET_ADDR "\n" \
" nop \n" \
" addis %0,3," #x "@dtprel@ha\n" \
" addi %0,%0," #x "@dtprel@l\n" \
@@ -834,7 +839,7 @@ register void *__gp __asm__("$29");
({ int * __result; \
asm ( \
" addi 3,2," #x "@got@tlsgd\n" \
- " bl .__tls_get_addr\n" \
+ " bl " __TLS_GET_ADDR "\n" \
" nop \n" \
" mr %0,3\n" \
: "=b" (__result) : \
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 80cc48e13e..b35fb36cea 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-f8
-fedora-sync-date := 2008-04-11 19:34 UTC
-fedora-sync-tag := fedora-glibc-20080411T1934
+fedora-sync-date := 2008-04-12 07:41 UTC
+fedora-sync-tag := fedora-glibc-20080412T0741
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index 18eb47dab5..2b39ca9e26 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -19,7 +19,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: @glibcversion@
-Release: 16
+Release: 1
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -976,6 +976,9 @@ rm -f *.filelist*
%endif
%changelog
+* Sat Apr 12 2008 Jakub Jelinek <jakub@redhat.com> 2.8-1
+- 2.8 release
+
* Fri Apr 11 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-16
- update to trunk
- misc fixes (BZ#4997, BZ#5741)
diff --git a/include/features.h b/include/features.h
index 6191d2044c..18093befcf 100644
--- a/include/features.h
+++ b/include/features.h
@@ -316,7 +316,7 @@
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define __GLIBC__ 2
-#define __GLIBC_MINOR__ 7
+#define __GLIBC_MINOR__ 8
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
diff --git a/include/fenv.h b/include/fenv.h
index 673eb4b977..3aec7e52bb 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -4,6 +4,7 @@
/* Now define the internal interfaces. */
extern int __feclearexcept (int __excepts);
+extern int __fegetexcept (void);
extern int __fegetexceptflag (fexcept_t *__flagp, int __excepts);
extern int __feraiseexcept (int __excepts);
extern int __fesetexceptflag (__const fexcept_t *__flagp, int __excepts);
diff --git a/math/s_significandl.c b/math/s_significandl.c
index 9fa0e4ff91..238b79ae55 100644
--- a/math/s_significandl.c
+++ b/math/s_significandl.c
@@ -34,6 +34,6 @@ static char rcsid[] = "$NetBSD: $";
long double x;
#endif
{
- return __ieee754_scalbl(x,(long double) -ilogbl(x));
+ return __ieee754_scalbl(x,(long double) -__ilogbl(x));
}
weak_alias (__significandl, significandl)
diff --git a/scripts/data/localplt-powerpc64-linux-gnu.data b/scripts/data/localplt-powerpc64-linux-gnu.data
new file mode 100644
index 0000000000..2219aa9048
--- /dev/null
+++ b/scripts/data/localplt-powerpc64-linux-gnu.data
@@ -0,0 +1,6 @@
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
index ff5c66e9d4..0b2da1ea27 100644
--- a/sysdeps/i386/i686/memcpy.S
+++ b/sysdeps/i386/i686/memcpy.S
@@ -71,10 +71,10 @@ ENTRY (BP_SYM (memcpy))
1: pushl %eax
movl %ecx, %eax
shrl $2, %ecx
+ andl $3, %eax
rep
movsl
movl %eax, %ecx
- andl $3, %ecx
rep
movsb
popl %eax
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index 67ef371153..f235372916 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -768,16 +768,15 @@ __ieee754_j0l (long double x)
= 1/sqrt(2) * (sin(x) - cos(x))
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = s - c;
cc = s + c;
- z = -cosl (xx + xx);
+ z = -__cosl (xx + xx);
if ((s * c) < 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx);
+ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
return z;
}
@@ -836,7 +835,7 @@ long double
/* 0 <= x <= 2 */
z = xx * xx;
p = neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
- p = TWOOPI * logl(x) * __ieee754_j0l(x) + p;
+ p = TWOOPI * __ieee754_logl (x) * __ieee754_j0l (x) + p;
return p;
}
@@ -908,15 +907,14 @@ long double
= 1/sqrt(2) * (sin(x) - cos(x))
sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
cf. Fdlibm. */
- c = cosl (x);
- s = sinl (x);
+ __sincosl (x, &s, &c);
ss = s - c;
cc = s + c;
- z = -cosl (x + x);
+ z = -__cosl (x + x);
if ((s * c) < 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * ss + q * cc) / sqrtl (x);
+ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x);
return z;
}
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 3a977c2a84..7ec073d9e2 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -773,16 +773,15 @@ __ieee754_j1l (long double x)
sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
= -1/sqrt(2) * (sin(x) + cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = -s - c;
cc = s - c;
- z = cosl (xx + xx);
+ z = __cosl (xx + xx);
if ((s * c) > 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * cc - q * ss) / sqrtl (xx);
+ z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
if (x < 0)
z = -z;
return z;
@@ -844,7 +843,7 @@ __ieee754_y1l (long double x)
z = xx * xx;
p = xx * neval (z, Y0_2N, NY0_2N) / deval (z, Y0_2D, NY0_2D);
p = -TWOOPI / xx + p;
- p = TWOOPI * logl(x) * __ieee754_j1l (x) + p;
+ p = TWOOPI * __ieee754_logl (x) * __ieee754_j1l (x) + p;
return p;
}
@@ -915,15 +914,14 @@ __ieee754_y1l (long double x)
sin(X) = sin(x) cos(3 pi/4) - cos(x) sin(3 pi/4)
= -1/sqrt(2) * (sin(x) + cos(x))
cf. Fdlibm. */
- c = cosl (xx);
- s = sinl (xx);
+ __sincosl (xx, &s, &c);
ss = -s - c;
cc = s - c;
- z = cosl (xx + xx);
+ z = __cosl (xx + xx);
if ((s * c) > 0)
cc = z / ss;
else
ss = z / cc;
- z = ONEOSQPI * (p * ss + q * cc) / sqrtl (xx);
+ z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx);
return z;
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
index 3c4088f75f..daf2cba323 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999,2004,2006 Free Software Foundation, Inc.
+ Copyright (C) 1999,2004,2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -148,15 +148,15 @@ __ieee754_expl (long double x)
fesetround (FE_TONEAREST);
#endif
- n = roundl(x*M_1_LN2);
+ n = __roundl (x*M_1_LN2);
x = x-n*M_LN2_0;
xl = n*M_LN2_1;
- tval1 = roundl(x*TWO8);
+ tval1 = __roundl (x*TWO8);
x -= __expl_table[T_EXPL_ARG1+2*tval1];
xl -= __expl_table[T_EXPL_ARG1+2*tval1+1];
- tval2 = roundl(x*TWO15);
+ tval2 = __roundl (x*TWO15);
x -= __expl_table[T_EXPL_ARG2+2*tval2];
xl -= __expl_table[T_EXPL_ARG2+2*tval2+1];
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
index 4908d4e4f3..735006575f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
@@ -152,7 +152,7 @@ __expm1l (long double x)
exp(x) - 1 = 2^k (qx + 1) - 1
= 2^k qx + 2^k - 1. */
- px = ldexpl (1.0L, k);
+ px = __ldexpl (1.0L, k);
x = px * qx + (px - 1.0);
return x;
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
index f1863fb688..5ccf541b71 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
@@ -121,12 +121,6 @@ static const long double maxlog = 1.1356523406294143949491931077970764891253E4L;
static const long double big = 2e300L;
static const long double zero = 0.0L;
-#if 1
-/* Make sure these are prototyped. */
-long double frexpl (long double, int *);
-long double ldexpl (long double, int);
-#endif
-
long double
__log1pl (long double xm1)
@@ -161,7 +155,7 @@ __log1pl (long double xm1)
/* Separate mantissa from exponent. */
/* Use frexp used so that denormal numbers will be handled properly. */
- x = frexpl (x, &e);
+ x = __frexpl (x, &e);
/* Logarithm using log(x) = z + z^3 P(z^2)/Q(z^2),
where z = 2(x-1)/x+1). */
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
index 2561fda329..36c5a164dc 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
@@ -1,6 +1,6 @@
/* Round to int long double floating-point values without raising inexact.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008 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
@@ -84,8 +84,8 @@ __nearbyintl (x)
{
/* Else the high double is pre rounded and we need to
adjust for that. */
-
- tau = nextafter (u.dd[0], 0.0);
+
+ tau = __nextafter (u.dd[0], 0.0);
tau = (u.dd[0] - tau) * 2.0;
high = u.dd[0] - tau;
low = u.dd[1] + tau;
@@ -106,7 +106,7 @@ __nearbyintl (x)
{
/* Else the high double is pre rounded and we need to
adjust for that. */
- tau = nextafter (u.dd[0], 0.0);
+ tau = __nextafter (u.dd[0], 0.0);
tau = (u.dd[0] - tau) * 2.0;
high = u.dd[0] - tau;
low = u.dd[1] + tau;
diff --git a/sysdeps/powerpc/bits/fenv.h b/sysdeps/powerpc/bits/fenv.h
index 10582a6ff6..1a5720abe6 100644
--- a/sysdeps/powerpc/bits/fenv.h
+++ b/sysdeps/powerpc/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2008 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
@@ -136,6 +136,8 @@ extern const fenv_t __fe_enabled_env;
extern const fenv_t __fe_nonieee_env;
# define FE_NONIEEE_ENV (&__fe_nonieee_env)
+__BEGIN_DECLS
+
/* Floating-point environment with all exceptions enabled. Note that
just evaluating this value does not change the processor exception mode.
Passing this mask to fesetenv will result in a prctl syscall to change
@@ -152,4 +154,7 @@ extern const fenv_t *__fe_nomask_env (void);
this allows the fastest possible floating point execution.*/
extern const fenv_t *__fe_mask_env (void);
# define FE_MASK_ENV FE_DFL_ENV
+
+__END_DECLS
+
#endif
diff --git a/sysdeps/powerpc/fpu/e_sqrt.c b/sysdeps/powerpc/fpu/e_sqrt.c
index 540b924656..24e0dd3523 100644
--- a/sysdeps/powerpc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/fpu/e_sqrt.c
@@ -1,5 +1,5 @@
/* Double-precision floating point square root.
- Copyright (C) 1997, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002, 2003, 2004, 2008 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
@@ -150,7 +150,9 @@ __slow_ieee754_sqrt (x)
FE_INVALID_SQRT. */
#ifdef FE_INVALID_SQRT
feraiseexcept (FE_INVALID_SQRT);
- if (!fetestexcept (FE_INVALID))
+
+ fenv_union_t u = { .fenv = fegetenv_register () };
+ if ((u.l[1] & FE_INVALID) == 0)
#endif
feraiseexcept (FE_INVALID);
x = a_nan.value;
@@ -172,7 +174,7 @@ __ieee754_sqrt (x)
/* If the CPU is 64-bit we can use the optional FP instructions. */
if (__CPU_HAS_FSQRT)
{
- /* Volatile is required to prevent the compiler from moving the
+ /* Volatile is required to prevent the compiler from moving the
fsqrt instruction above the branch. */
__asm __volatile (" fsqrt %0,%1\n"
:"=f" (z):"f" (x));
diff --git a/sysdeps/powerpc/fpu/e_sqrtf.c b/sysdeps/powerpc/fpu/e_sqrtf.c
index b63d31472b..8e8138a17d 100644
--- a/sysdeps/powerpc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/fpu/e_sqrtf.c
@@ -1,5 +1,5 @@
/* Single-precision floating point square root.
- Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004, 2008 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
@@ -126,7 +126,9 @@ __slow_ieee754_sqrtf (x)
FE_INVALID_SQRT. */
#ifdef FE_INVALID_SQRT
feraiseexcept (FE_INVALID_SQRT);
- if (!fetestexcept (FE_INVALID))
+
+ fenv_union_t u = { .fenv = fegetenv_register () };
+ if ((u.l[1] & FE_INVALID) == 0)
#endif
feraiseexcept (FE_INVALID);
x = a_nan.value;
@@ -149,7 +151,7 @@ __ieee754_sqrtf (x)
/* If the CPU is 64-bit we can use the optional FP instructions. */
if (__CPU_HAS_FSQRT)
{
- /* Volatile is required to prevent the compiler from moving the
+ /* Volatile is required to prevent the compiler from moving the
fsqrt instruction above the branch. */
__asm __volatile (" fsqrts %0,%1\n"
:"=f" (z):"f" (x));
diff --git a/sysdeps/powerpc/fpu/fe_nomask.c b/sysdeps/powerpc/fpu/fe_nomask.c
index 3cccee1d06..bc18bb8f80 100644
--- a/sysdeps/powerpc/fpu/fe_nomask.c
+++ b/sysdeps/powerpc/fpu/fe_nomask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_NOMASK_ENV.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2008 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
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
#include <errno.h>
/* This is a generic stub. An OS specific override is required to set
@@ -30,4 +30,5 @@ __fe_nomask_env(void)
__set_errno (ENOSYS);
return FE_ENABLED_ENV;
}
+libm_hidden_def (__fe_nomask_env)
stub_warning (__fe_nomask_env)
diff --git a/sysdeps/powerpc/fpu/fedisblxcpt.c b/sysdeps/powerpc/fpu/fedisblxcpt.c
index 3002b1b4cc..9df4bbc7ef 100644
--- a/sysdeps/powerpc/fpu/fedisblxcpt.c
+++ b/sysdeps/powerpc/fpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
/* Disable floating-point exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@geoffk.org>, 2000.
@@ -26,7 +26,7 @@ fedisableexcept (int excepts)
fenv_union_t fe;
int result, new;
- result = fegetexcept ();
+ result = __fegetexcept ();
if ((excepts & FE_ALL_INVALID) == FE_ALL_INVALID)
excepts = (excepts | FE_INVALID) & ~ FE_ALL_INVALID;
@@ -44,7 +44,7 @@ fedisableexcept (int excepts)
fe.l[1] &= ~(1 << (31 - FPSCR_VE));
fesetenv_register (fe.fenv);
- new = fegetexcept ();
+ new = __fegetexcept ();
if (new == 0 && result != 0)
(void)__fe_mask_env ();
diff --git a/sysdeps/powerpc/fpu/feenablxcpt.c b/sysdeps/powerpc/fpu/feenablxcpt.c
index 7bff18b421..4875e95e32 100644
--- a/sysdeps/powerpc/fpu/feenablxcpt.c
+++ b/sysdeps/powerpc/fpu/feenablxcpt.c
@@ -1,5 +1,5 @@
/* Enable floating-point exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@geoffk.org>, 2000.
@@ -26,7 +26,7 @@ feenableexcept (int excepts)
fenv_union_t fe;
int result, new;
- result = fegetexcept ();
+ result = __fegetexcept ();
if ((excepts & FE_ALL_INVALID) == FE_ALL_INVALID)
excepts = (excepts | FE_INVALID) & ~ FE_ALL_INVALID;
@@ -44,7 +44,7 @@ feenableexcept (int excepts)
fe.l[1] |= (1 << (31 - FPSCR_VE));
fesetenv_register (fe.fenv);
- new = fegetexcept ();
+ new = __fegetexcept ();
if (new != 0 && result == 0)
(void)__fe_nomask_env ();
diff --git a/sysdeps/powerpc/fpu/fegetexcept.c b/sysdeps/powerpc/fpu/fegetexcept.c
index 0b5cebb6dd..c85cb1b222 100644
--- a/sysdeps/powerpc/fpu/fegetexcept.c
+++ b/sysdeps/powerpc/fpu/fegetexcept.c
@@ -1,5 +1,5 @@
/* Get floating-point exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@geoffk.org>, 2000.
@@ -21,13 +21,13 @@
#include <fenv_libc.h>
int
-fegetexcept (void)
+__fegetexcept (void)
{
fenv_union_t fe;
int result = 0;
fe.fenv = fegetenv_register ();
-
+
if (fe.l[1] & (1 << (31 - FPSCR_XE)))
result |= FE_INEXACT;
if (fe.l[1] & (1 << (31 - FPSCR_ZE)))
@@ -41,3 +41,4 @@ fegetexcept (void)
return result;
}
+weak_alias (__fegetexcept, fegetexcept)
diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
index fd5fc0c767..6f116b60d5 100644
--- a/sysdeps/powerpc/fpu/fenv_libc.h
+++ b/sysdeps/powerpc/fpu/fenv_libc.h
@@ -1,5 +1,5 @@
/* Internal libc stuff for floating point environment routines.
- Copyright (C) 1997, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006, 2008 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
@@ -22,6 +22,8 @@
#include <fenv.h>
+libm_hidden_proto (__fe_nomask_env)
+
/* The sticky bits in the FPSCR indicating exceptions have occurred. */
#define FPSCR_STICKY_BITS ((FE_ALL_EXCEPT | FE_ALL_INVALID) & ~FE_INVALID)
@@ -137,5 +139,5 @@ enum {
({ float f; asm volatile ("fmuls %0,%1,%2" \
: "=f"(f) \
: "f" (x), "f"((float)1.0)); f; })
-
+
#endif /* fenv_libc.h */
diff --git a/sysdeps/powerpc/fpu/fraiseexcpt.c b/sysdeps/powerpc/fpu/fraiseexcpt.c
index dbe36c3d5a..2d983d97c7 100644
--- a/sysdeps/powerpc/fpu/fraiseexcpt.c
+++ b/sysdeps/powerpc/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999-2002, 2008 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
@@ -45,12 +45,15 @@ __feraiseexcept (int excepts)
triggering any appropriate exceptions. */
fesetenv_register (u.fenv);
- if ((excepts & FE_INVALID)
+ if ((excepts & FE_INVALID))
+ {
/* For some reason, some PowerPC chips (the 601, in particular)
don't have FE_INVALID_SOFTWARE implemented. Detect this
case and raise FE_INVALID_SNAN instead. */
- && !fetestexcept (FE_INVALID))
- set_fpscr_bit (FPSCR_VXSNAN);
+ u.fenv = fegetenv_register ();
+ if ((u.l[1] & FE_INVALID) == 0)
+ set_fpscr_bit (FPSCR_VXSNAN);
+ }
/* Success. */
return 0;
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 4703214124..253e9c57ff 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -267,7 +267,7 @@ case "$machine" in
arch_minimum_kernel=2.0.10
;;
powerpc/powerpc64)
- arch_minimum_kernel=2.4.19
+ arch_minimum_kernel=2.4.21
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 43681f3251..5330e98c2d 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -80,7 +80,7 @@ case "$machine" in
arch_minimum_kernel=2.0.10
;;
powerpc/powerpc64)
- arch_minimum_kernel=2.4.19
+ arch_minimum_kernel=2.4.21
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h b/sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h
new file mode 100644
index 0000000000..4f173912ed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mathinline.h
@@ -0,0 +1,132 @@
+/* Inline math functions for powerpc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2004, 2006, 2007, 2008
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#ifndef __extern_inline
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE __extern_inline
+#endif /* __cplusplus */
+
+#if defined __GNUC__ && !defined _SOFT_FLOAT
+
+#ifdef __USE_ISOC99
+# if !__GNUC_PREREQ (2,97)
+# define __unordered_cmp(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ unsigned __r; \
+ __asm__("fcmpu 7,%1,%2 ; mfcr %0" : "=r" (__r) : "f" (__x), "f"(__y) \
+ : "cr7"); \
+ __r; }))
+
+# undef isgreater
+# undef isgreaterequal
+# undef isless
+# undef islessequal
+# undef islessgreater
+# undef isunordered
+
+# define isgreater(x, y) (__unordered_cmp (x, y) >> 2 & 1)
+# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & 6) != 0)
+# define isless(x, y) (__unordered_cmp (x, y) >> 3 & 1)
+# define islessequal(x, y) ((__unordered_cmp (x, y) & 0xA) != 0)
+# define islessgreater(x, y) ((__unordered_cmp (x, y) & 0xC) != 0)
+# define isunordered(x, y) (__unordered_cmp (x, y) & 1)
+
+# endif /* __GNUC_PREREQ (2,97) */
+
+/* The gcc, version 2.7 or below, has problems with all this inlining
+ code. So disable it for this version of the compiler. */
+# if __GNUC_PREREQ (2, 8)
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+__MATH_INLINE int
+__NTH (__signbit (double __x))
+{
+ __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+# ifdef __LONGDOUBLE128
+__MATH_INLINE int
+__NTH (__signbitl (long double __x))
+{
+ __extension__ union { long double __d; int __i[4]; } __u = { __d: __x };
+ return __u.__i[0] < 0;
+}
+# endif
+# endif
+#endif /* __USE_ISOC99 */
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+#ifdef __USE_ISOC99
+
+# ifndef __powerpc64__
+__MATH_INLINE long int lrint (double __x) __THROW;
+__MATH_INLINE long int
+__NTH (lrint (double __x))
+{
+ union {
+ double __d;
+ int __ll[2];
+ } __u;
+ __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
+ return __u.__ll[1];
+}
+
+__MATH_INLINE long int lrintf (float __x) __THROW;
+__MATH_INLINE long int
+__NTH (lrintf (float __x))
+{
+ union {
+ double __d;
+ int __ll[2];
+ } __u;
+ __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x));
+ return __u.__ll[1];
+}
+# endif
+
+__MATH_INLINE double fdim (double __x, double __y) __THROW;
+__MATH_INLINE double
+__NTH (fdim (double __x, double __y))
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+
+__MATH_INLINE float fdimf (float __x, float __y) __THROW;
+__MATH_INLINE float
+__NTH (fdimf (float __x, float __y))
+{
+ return __x <= __y ? 0 : __x - __y;
+}
+
+#endif /* __USE_ISOC99 */
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+#endif /* __GNUC__ && !_SOFT_FLOAT */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c
index 8d3b9ad1f4..50071e19e2 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_NOMASK_ENV for Linux/ppc.
- Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2006, 2008 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
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
#include <errno.h>
#include <signal.h>
#include <unistd.h>
@@ -66,3 +66,4 @@ __fe_nomask_env (void)
return FE_ENABLED_ENV;
}
+libm_hidden_def (__fe_nomask_env)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
index 62f735514a..d0cf8596e1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_NOMASK_ENV for Linux/ppc64.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2008 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
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
#include <errno.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -41,3 +41,4 @@ __fe_nomask_env (void)
#endif
return FE_ENABLED_ENV;
}
+libm_hidden_def (__fe_nomask_env)
diff --git a/version.h b/version.h
index 9ac2ee7ad5..97aa661e6e 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
/* This file just defines the current version number of libc. */
-#define RELEASE "development"
-#define VERSION "2.7.90"
+#define RELEASE "stable"
+#define VERSION "2.8"