Skip to content

Commit

Permalink
Updated to fedora-glibc-20080412T0741
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek committed Apr 12, 2008
1 parent a346458 commit 14e4406
Show file tree
Hide file tree
Showing 30 changed files with 280 additions and 74 deletions.
51 changes: 51 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
9 changes: 7 additions & 2 deletions elf/tls-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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) : \
Expand Down
4 changes: 2 additions & 2 deletions fedora/branch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion fedora/glibc.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion include/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 1 addition & 0 deletions include/fenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion math/s_significandl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 6 additions & 0 deletions scripts/data/localplt-powerpc64-linux-gnu.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
libc.so: calloc
libc.so: free
libc.so: malloc
libc.so: memalign
libc.so: realloc
libm.so: matherr
2 changes: 1 addition & 1 deletion sysdeps/i386/i686/memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 7 additions & 9 deletions sysdeps/ieee754/ldbl-128/e_j0l.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
16 changes: 7 additions & 9 deletions sysdeps/ieee754/ldbl-128/e_j1l.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
8 changes: 4 additions & 4 deletions sysdeps/ieee754/ldbl-128ibm/e_expl.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 1 addition & 7 deletions sysdeps/ieee754/ldbl-128ibm/s_log1pl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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). */
Expand Down
8 changes: 4 additions & 4 deletions sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion sysdeps/powerpc/bits/fenv.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
8 changes: 5 additions & 3 deletions sysdeps/powerpc/fpu/e_sqrt.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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));
Expand Down
Loading

0 comments on commit 14e4406

Please sign in to comment.