[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9834 - in /fsf/trunk/libc: ./ include/ malloc/ math/ sysdeps/i386/ sysdeps/i386/fpu/ sysdeps/ia64/fpu/ sysdeps/powerpc/fpu/...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9834 - in /fsf/trunk/libc: ./ include/ malloc/ math/ sysdeps/i386/ sysdeps/i386/fpu/ sysdeps/ia64/fpu/ sysdeps/powerpc/fpu/...
- From: eglibc@xxxxxxxxxx
- Date: Wed, 10 Feb 2010 08:03:17 -0000
Author: eglibc
Date: Wed Feb 10 00:03:15 2010
New Revision: 9834
Log:
Import glibc-mainline for 2010-02-10
Added:
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/include/fenv.h
fsf/trunk/libc/malloc/malloc.c
fsf/trunk/libc/math/fegetenv.c
fsf/trunk/libc/sysdeps/i386/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/i386/lshift.S
fsf/trunk/libc/sysdeps/i386/rshift.S
fsf/trunk/libc/sysdeps/ia64/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/powerpc/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/s390/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/sh/sh4/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/sparc/fpu/fegetenv.c
fsf/trunk/libc/sysdeps/x86_64/fpu/fegetenv.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Feb 10 00:03:15 2010
@@ -1,3 +1,36 @@
+2010-02-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/i386/rshift.S: More compact unwind information.
+
+ * sysdeps/i386/lshift.S: Fix unwind information.
+
+2010-02-08 Luis Machado <luisgpm@xxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S: New file.
+
+2010-02-08 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * include/fenv.h: Add hidden proto for fegetenv.
+ * math/fegetenv.c: Add hidden alias.
+ * sysdeps/i386/fpu/fegetenv.c: Likewise.
+ * sysdeps/ia64/fpu/fegetenv.c: Likewise.
+ * sysdeps/powerpc/fpu/fegetenv.c: Likewise.
+ * sysdeps/sh/sh4/fpu/fegetenv.c: Likewise.
+ * sysdeps/sparc/fpu/fegetenv.c: Likewise.
+ * sysdeps/x86_64/fpu/fegetenv.c: Likewise
+ * sysdeps/s390/fpu/fegetenv.c: Likewise. Remove unused headers.
+
2010-02-05 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #11230]
Modified: fsf/trunk/libc/include/fenv.h
==============================================================================
--- fsf/trunk/libc/include/fenv.h (original)
+++ fsf/trunk/libc/include/fenv.h Wed Feb 10 00:03:15 2010
@@ -13,6 +13,7 @@
extern int __feupdateenv (__const fenv_t *__envp);
libm_hidden_proto (feraiseexcept)
+libm_hidden_proto (fegetenv)
libm_hidden_proto (fesetenv)
libm_hidden_proto (fesetround)
libm_hidden_proto (feholdexcept)
Modified: fsf/trunk/libc/malloc/malloc.c
==============================================================================
--- fsf/trunk/libc/malloc/malloc.c (original)
+++ fsf/trunk/libc/malloc/malloc.c Wed Feb 10 00:03:15 2010
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@xxxxxxxxx>
and Doug Lea <dl@xxxxxxxxxxxxx>, 2001.
@@ -4850,7 +4850,8 @@
free_perturb (chunk2mem(p), size - SIZE_SZ);
set_fastchunks(av);
- fb = &fastbin (av, fastbin_index(size));
+ unsigned int idx = fastbin_index(size);
+ fb = &fastbin (av, idx);
#ifdef ATOMIC_FASTBINS
mchunkptr fd;
@@ -4864,6 +4865,12 @@
errstr = "double free or corruption (fasttop)";
goto errout;
}
+ if (old != NULL && (chunksize(old) > request2size(MAX_FAST_SIZE)
+ || fastbin_index(chunksize(old)) != idx))
+ {
+ errstr = "invalid fastbin entry (free)";
+ goto errout;
+ }
p->fd = fd = old;
}
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
@@ -4873,6 +4880,12 @@
if (__builtin_expect (*fb == p, 0))
{
errstr = "double free or corruption (fasttop)";
+ goto errout;
+ }
+ if (*fb != NULL && (chunksize(*fb) > request2size(MAX_FAST_SIZE)
+ || fastbin_index(chunksize(*fb)) != idx))
+ {
+ errstr = "invalid fastbin entry (free)";
goto errout;
}
Modified: fsf/trunk/libc/math/fegetenv.c
==============================================================================
--- fsf/trunk/libc/math/fegetenv.c (original)
+++ fsf/trunk/libc/math/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -32,6 +32,7 @@
strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
stub_warning (fegetenv)
Modified: fsf/trunk/libc/sysdeps/i386/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/i386/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -40,4 +40,5 @@
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
Modified: fsf/trunk/libc/sysdeps/i386/lshift.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/lshift.S (original)
+++ fsf/trunk/libc/sysdeps/i386/lshift.S Wed Feb 10 00:03:15 2010
@@ -1,5 +1,5 @@
/* i80386 __mpn_lshift --
- Copyright (C) 1992, 1994, 1997-2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1992,1994,1997-2000,2005,2010 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
@@ -55,6 +55,7 @@
movl (%esi,%edx,4),%ebx /* read most significant limb */
cfi_rel_offset (ebx, 0)
+ cfi_remember_state
xorl %eax,%eax
shldl %cl,%ebx,%eax /* compute carry limb */
decl %edx
@@ -95,6 +96,7 @@
LEAVE
ret
+ cfi_restore_state
L(end): shll %cl,%ebx /* compute least significant limb */
movl %ebx,(%edi) /* store it */
Modified: fsf/trunk/libc/sysdeps/i386/rshift.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/rshift.S (original)
+++ fsf/trunk/libc/sysdeps/i386/rshift.S Wed Feb 10 00:03:15 2010
@@ -1,5 +1,5 @@
/* i80386 __mpn_rshift --
- Copyright (C) 1992,1994,1997-2000,2005 Free Software Foundation, Inc.
+ Copyright (C) 1992,1994,1997-2000,2005,2010 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
@@ -57,6 +57,7 @@
movl (%esi,%edx,4),%ebx /* read least significant limb */
cfi_rel_offset (ebx, 0)
+ cfi_remember_state
xorl %eax,%eax
shrdl %cl,%ebx,%eax /* compute carry limb */
incl %edx
@@ -97,10 +98,7 @@
LEAVE
ret
- cfi_adjust_cfa_offset (12)
- cfi_rel_offset (edi, 8)
- cfi_rel_offset (esi, 4)
- cfi_rel_offset (ebx, 0)
+ cfi_restore_state
L(end): shrl %cl,%ebx /* compute most significant limb */
movl %ebx,(%edi) /* store it */
Modified: fsf/trunk/libc/sysdeps/ia64/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/ia64/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -27,3 +27,4 @@
return 0;
}
+libm_hidden_def (fegetenv)
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -35,4 +35,5 @@
compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,89 @@
+/* finite(). PowerPC32/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __finite(x) */
+ .section .rodata.cst8,"aM",@progbits,8
+ .align 3
+.LC0: /* 1.0 */
+ .quad 0x3ff0000000000000
+
+ .section ".text"
+ .type __finite, @function
+ .machine power7
+ENTRY (__finite)
+#ifdef SHARED
+ mflr r11
+ cfi_register(lr,r11)
+
+ bcl 20,31,1f
+1: mflr r9
+ addis r9,r9,.LC0-1b@ha
+ lfd fp0,.LC0-1b@l(r9)
+
+ mtlr r11
+ cfi_same_value (lr)
+#else
+ lis r9,.LC0@ha
+ lfd fp0,.LC0@l(r9)
+#endif
+ ftdiv cr7,fp1,fp0
+ li r3,1
+ bflr 30
+
+ /* We have -INF/+INF/NaN or a denormal. */
+
+ stwu r1,-16(r1) /* Allocate stack space. */
+ stfd fp1,8(r1) /* Transfer FP to GPR's. */
+
+ ori 2,2,0 /* Force a new dispatch group. */
+ lhz r0,8(r1) /* Fetch the upper portion of the high word of
+ the FP value (where the exponent and sign bits
+ are). */
+ clrlwi r0,r0,17 /* r0 = abs(r0). */
+ addi r1,r1,16 /* Reset the stack pointer. */
+ cmpwi cr7,r0,0x7ff0 /* r4 == 0x7ff0?. */
+ bltlr cr7 /* LT means we have a denormal. */
+ li r3,0
+ blr
+ END (__finite)
+
+hidden_def (__finite)
+weak_alias (__finite, finite)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__finite, __finitef)
+hidden_def (__finitef)
+weak_alias (__finitef, finitef)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__finite, __finitel)
+weak_alias (__finite, finitel)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
+compat_symbol (libc, finite, finitel, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_finitef.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_finite.S. */
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,88 @@
+/* isinf(). PowerPC32/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isinf(x) */
+ .section .rodata.cst8,"aM",@progbits,8
+ .align 3
+.LC0: /* 1.0 */
+ .quad 0x3ff0000000000000
+
+ .section ".text"
+ .type __isinf, @function
+ .machine power7
+ENTRY (__isinf)
+#ifdef SHARED
+ mflr r11
+ cfi_register(lr,r11)
+
+ bcl 20,31,1f
+1: mflr r9
+ addis r9,r9,.LC0-1b@ha
+ lfd fp0,.LC0-1b@l(r9)
+
+ mtlr r11
+ cfi_same_value (lr)
+#else
+ lis r9,.LC0@ha
+ lfd fp0,.LC0@l(r9)
+#endif
+ ftdiv cr7,fp1,fp0
+ li r3,0
+ bflr 29 /* If not INF, return. */
+
+ /* Either we have -INF/+INF or a denormal. */
+
+ stwu r1,-16(r1) /* Allocate stack space. */
+ stfd fp1,8(r1) /* Transfer FP to GPR's. */
+ ori 2,2,0 /* Force a new dispatch group. */
+ lhz r4,8(r1) /* Fetch the upper portion of the high word of
+ the FP value (where the exponent and sign bits
+ are). */
+ addi r1,r1,16 /* Reset the stack pointer. */
+ cmpwi cr7,r4,0x7ff0 /* r4 == 0x7ff0? */
+ li r3,1
+ beqlr cr7 /* EQ means INF, otherwise -INF. */
+ li r3,-1
+ blr
+ END (__isinf)
+
+hidden_def (__isinf)
+weak_alias (__isinf, isinf)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isinf, __isinff)
+hidden_def (__isinff)
+weak_alias (__isinff, isinff)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isinf, __isinfl)
+weak_alias (__isinf, isinfl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
+compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_isinf.S. */
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,92 @@
+/* isnan(). PowerPC32/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isnan(x) */
+ .section .rodata.cst8,"aM",@progbits,8
+ .align 3
+.LC0: /* 1.0 */
+ .quad 0x3ff0000000000000
+
+ .section ".text"
+ .type __isnan, @function
+ .machine power7
+ENTRY (__isnan)
+#ifdef SHARED
+ mflr r11
+ cfi_register(lr,r11)
+
+ bcl 20,31,1f
+1: mflr r9
+ addis r9,r9,.LC0-1b@ha
+ lfd fp0,.LC0-1b@l(r9)
+
+ mtlr r11
+ cfi_same_value (lr)
+#else
+ lis r9,.LC0@ha
+ lfd fp0,.LC0@l(r9)
+#endif
+ ftdiv cr7,fp1,fp0
+ li r3,0
+ bflr 30 /* If not NaN or Inf, finish. */
+
+ /* We have -INF/+INF/NaN or a denormal. */
+
+ stwu r1,-16(r1) /* Allocate stack space. */
+ stfd fp1,8(r1) /* Transfer FP to GPR's. */
+ ori 2,2,0 /* Force a new dispatch group. */
+ lwz r4,8(r1) /* Load the upper half of the FP value. */
+ lwz r5,12(r1) /* Load the lower half of the FP value. */
+ addi r1,r1,16 /* Reset the stack pointer. */
+ lis r0,0x7ff0 /* Load the upper portion for an INF/NaN. */
+ clrlwi r4,r4,1 /* r4 = abs(r4). */
+ cmpw cr7,r4,r0 /* if (abs(r4) <= inf). */
+ cmpwi cr6,r5,0 /* r5 == 0x00000000? */
+ bltlr cr7 /* LT means we have a denormal. */
+ bgt cr7,L(NaN) /* GT means we have a NaN. */
+ beqlr cr6 /* EQ means we have +/-INF. */
+L(NaN):
+ li r3,1 /* x == NaN? */
+ blr
+ END (__isnan)
+
+hidden_def (__isnan)
+weak_alias (__isnan, isnan)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isnan, __isnanf)
+hidden_def (__isnanf)
+weak_alias (__isnanf, isnanf)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isnan, __isnanl)
+weak_alias (__isnan, isnanl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/fpu/s_isnanf.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_isnan.S. */
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,68 @@
+/* finite(). PowerPC64/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __finite(x) */
+ .section ".toc","aw"
+.LC0: /* 1.0 */
+ .tc FD_ONE[TC],0x3ff0000000000000
+ .section ".text"
+ .type __finite, @function
+ .machine power7
+EALIGN (__finite, 4, 0)
+ CALL_MCOUNT 0
+ lfd fp0,.LC0@toc(r2)
+ ftdiv cr7,fp1,fp0
+ li r3,1
+ bflr 30
+
+ /* If we are here, we either have +/-INF,
+ NaN or denormal. */
+
+ stfd fp1,-16(r1) /* Transfer FP to GPR's. */
+ ori 2,2,0 /* Force a new dispatch group. */
+
+ lhz r4,-16(r1) /* Fetch the upper portion of the high word of
+ the FP value (where the exponent and sign bits
+ are). */
+ clrlwi r4,r4,17 /* r4 = abs(r4). */
+ cmpwi cr7,r4,0x7ff0 /* r4 == 0x7ff0? */
+ bltlr cr7 /* LT means finite, other non-finite. */
+ li r3,0
+ blr
+ END (__finite)
+
+hidden_def (__finite)
+weak_alias (__finite, finite)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__finite, __finitef)
+hidden_def (__finitef)
+weak_alias (__finitef, finitef)
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
+compat_symbol (libc, finite, finitel, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_finitef.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_finite.S. */
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,71 @@
+/* isinf(). PowerPC64/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isinf(x) */
+ .section ".toc","aw"
+.LC0: /* 1.0 */
+ .tc FD_ONE[TC],0x3ff0000000000000
+ .section ".text"
+ .type __isinf, @function
+ .machine power7
+EALIGN (__isinf, 4, 0)
+ CALL_MCOUNT 0
+ lfd fp0,.LC0@toc(r2)
+ ftdiv cr7,fp1,fp0
+ li r3,0
+ bflr 29 /* If not INF, return. */
+
+ /* Either we have -INF/+INF or a denormal. */
+
+ stfd fp1,-16(r1) /* Transfer FP to GPR's. */
+ ori 2,2,0 /* Force a new dispatch group. */
+ lhz r4,-16(r1) /* Fetch the upper portion of the high word of
+ the FP value (where the exponent and sign bits
+ are). */
+ cmpwi cr7,r4,0x7ff0 /* r4 == 0x7ff0? */
+ li r3,1
+ beqlr cr7 /* EQ means INF, otherwise -INF. */
+ li r3,-1
+ blr
+ END (__isinf)
+
+hidden_def (__isinf)
+weak_alias (__isinf, isinf)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isinf, __isinff)
+hidden_def (__isinff)
+weak_alias (__isinff, isinff)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isinf, __isinfl)
+weak_alias (__isinf, isinfl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
+compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_isinf.S. */
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,69 @@
+/* isnan(). PowerPC64/POWER7 version.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ Contributed by Luis Machado <luisgpm@xxxxxxxxxx>.
+ 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. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+/* int __isnan(x) */
+ .section ".toc","aw"
+.LC0: /* 1.0 */
+ .tc FD_ONE[TC],0x3ff0000000000000
+ .section ".text"
+ .type __isnan, @function
+ .machine power7
+EALIGN (__isnan, 4, 0)
+ CALL_MCOUNT 0
+ lfd fp0,.LC0@toc(r2)
+ ftdiv cr7,fp1,fp0
+ li r3,0
+ bflr 30 /* If not NaN, finish. */
+
+ stfd fp1,-16(r1) /* Transfer FP to GPR's. */
+ ori 2,2,0 /* Force a new dispatch group. */
+ ld r4,-16(r1) /* Load FP into GPR. */
+ lis r0,0x7ff0
+ sldi r0,r0,32 /* const long r0 0x7ff00000 00000000. */
+ clrldi r4,r4,1 /* x = fabs(x) */
+ cmpd cr7,r4,r0 /* if (fabs(x) <= inf) */
+ blelr cr7 /* LE means not NaN. */
+ li r3,1 /* else return 1 */
+ blr
+ END (__isnan)
+
+hidden_def (__isnan)
+weak_alias (__isnan, isnan)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isnan, __isnanf)
+hidden_def (__isnanf)
+weak_alias (__isnanf, isnanf)
+
+#ifdef NO_LONG_DOUBLE
+strong_alias (__isnan, __isnanl)
+weak_alias (__isnan, isnanl)
+#endif
+
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif
Added: fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S (added)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/fpu/s_isnanf.S Wed Feb 10 00:03:15 2010
@@ -1,0 +1,1 @@
+/* This function uses the same code as s_isnan.S. */
Modified: fsf/trunk/libc/sysdeps/s390/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/s390/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -20,10 +20,6 @@
#include <fenv_libc.h>
#include <fpu_control.h>
-#include <stddef.h>
-#include <asm/ptrace.h>
-#include <sys/ptrace.h>
-#include <unistd.h>
int
fegetenv (fenv_t *envp)
@@ -33,3 +29,4 @@
/* Success. */
return 0;
}
+libm_hidden_def (fegetenv)
Modified: fsf/trunk/libc/sysdeps/sh/sh4/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/sh4/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/sh/sh4/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -29,3 +29,4 @@
return 0;
}
+libm_hidden_def (fegetenv)
Modified: fsf/trunk/libc/sysdeps/sparc/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/sparc/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -34,4 +34,5 @@
compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fegetenv, fegetenv)
versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
Modified: fsf/trunk/libc/sysdeps/x86_64/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/fpu/fegetenv.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/fpu/fegetenv.c Wed Feb 10 00:03:15 2010
@@ -28,3 +28,4 @@
/* Success. */
return 0;
}
+libm_hidden_def (fegetenv)