[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22539 - in /fsf/trunk/libc: ./ elf/ nptl/ sysdeps/generic/ sysdeps/powerpc/ sysdeps/powerpc/bits/ sysdeps/powerpc/fpu/ sysd...



Author: eglibc
Date: Sat Mar  2 00:02:44 2013
New Revision: 22539

Log:
Import glibc-mainline for 2013-03-02

Added:
    fsf/trunk/libc/sysdeps/powerpc/bits/fenvinline.h
    fsf/trunk/libc/sysdeps/powerpc/bits/mathinline.h
    fsf/trunk/libc/sysdeps/powerpc/fpu_control.h
Removed:
    fsf/trunk/libc/sysdeps/powerpc/fpu/bits/
    fsf/trunk/libc/sysdeps/powerpc/fpu/fpu_control.h
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/dl-hwcaps.c
    fsf/trunk/libc/elf/dl-support.c
    fsf/trunk/libc/elf/dl-sysdep.c
    fsf/trunk/libc/elf/rtld.c
    fsf/trunk/libc/elf/setup-vdso.h
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/nptl/tst-oddstacklimit.c
    fsf/trunk/libc/sysdeps/generic/ldsodefs.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Mar  2 00:02:44 2013
@@ -1,3 +1,39 @@
+2013-03-01  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/fpu_control.h: Move to ...
+	* sysdeps/powerpc/fpu_control.h: ... here.
+	* sysdeps/powerpc/fpu/bits/fenvinline.h: Move to ...
+	* sysdeps/powerpc/bits/fenvinline.h: ... here.
+	* sysdeps/powerpc/fpu/bits/mathinline.h: Move to ...
+	* sysdeps/powerpc/bits/mathinline.h: ... here.
+
+2013-03-01  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* elf/dl-hwcaps.c (_dl_important_hwcaps):
+	Change [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO] conditionals
+	to just [NEED_DL_SYSINFO_DSO].
+	* elf/dl-support.c: Likewise.
+	* elf/dl-sysdep.c (_dl_sysdep_start): Likewise.
+	* elf/rtld.c (dl_main): Likewise.
+	* elf/setup-vdso.h (setup_vdso): Likewise.
+	* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Likewise.
+	* sysdeps/unix/sysv/linux/dl-sysdep.c
+	(_dl_discover_osversion): Likewise.
+
+2013-03-01  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* csu/libc-start.c (__pthread_initialize_minimal): Revert last change.
+	* csu/libc-tls.c (__pthread_initialize_minimal): Likewise.
+
+2013-03-01  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* NEWS: Mention libm performance improvements and non-x86 PI
+	futex support.
+
+	* csu/libc-start.c (__pthread_initialize_minimal): Change
+	function arguments.
+	* csu/libc-tls.c (__pthread_initialize_minimal): Likewise.
+
 2013-02-28  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	[BZ #13550]

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sat Mar  2 00:02:44 2013
@@ -16,6 +16,12 @@
 * Add support for calling C++11 thread_local object destructors on thread
   and program exit.  This needs compiler support for offloading C++11
   destructor calls to glibc.
+
+* Improved worst case performance of libm functions with double inputs and
+  output.
+
+* Support for priority inherited mutexes in pthread condition variables on
+  non-x86 architectures.
 
 
 Version 2.17

Modified: fsf/trunk/libc/elf/dl-hwcaps.c
==============================================================================
--- fsf/trunk/libc/elf/dl-hwcaps.c (original)
+++ fsf/trunk/libc/elf/dl-hwcaps.c Sat Mar  2 00:02:44 2013
@@ -51,7 +51,7 @@
     if ((masked & (1ULL << n)) != 0)
       ++cnt;
 
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
   /* The system-supplied DSO can contain a note of type 2, vendor "GNU".
      This gives us a list of names to treat as fake hwcap bits.  */
 
@@ -104,7 +104,7 @@
   /* Create temporary data structure to generate result table.  */
   struct r_strlenpair temp[cnt];
   m = 0;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
   if (dsocaps != NULL)
     {
       const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];

Modified: fsf/trunk/libc/elf/dl-support.c
==============================================================================
--- fsf/trunk/libc/elf/dl-support.c (original)
+++ fsf/trunk/libc/elf/dl-support.c Sat Mar  2 00:02:44 2013
@@ -158,7 +158,7 @@
 /* Needed for improved syscall handling on at least x86/Linux.  */
 uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT;
 #endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
 /* Address of the ELF headers in the vsyscall page.  */
 const ElfW(Ehdr) *_dl_sysinfo_dso;
 
@@ -217,7 +217,7 @@
 	GL(dl_sysinfo) = av->a_un.a_val;
 	break;
 #endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
       case AT_SYSINFO_EHDR:
 	GL(dl_sysinfo_dso) = (void *) av->a_un.a_val;
 	break;

Modified: fsf/trunk/libc/elf/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/elf/dl-sysdep.c (original)
+++ fsf/trunk/libc/elf/dl-sysdep.c Sat Mar  2 00:02:44 2013
@@ -167,7 +167,7 @@
 	new_sysinfo = av->a_un.a_val;
 	break;
 #endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
       case AT_SYSINFO_EHDR:
 	GLRO(dl_sysinfo_dso) = (void *) av->a_un.a_val;
 	break;

Modified: fsf/trunk/libc/elf/rtld.c
==============================================================================
--- fsf/trunk/libc/elf/rtld.c (original)
+++ fsf/trunk/libc/elf/rtld.c Sat Mar  2 00:02:44 2013
@@ -1768,7 +1768,7 @@
 	  GL(dl_rtld_map).l_next = (i + 1 < main_map->l_searchlist.r_nlist
 				    ? main_map->l_searchlist.r_list[i + 1]
 				    : NULL);
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
 	  if (GLRO(dl_sysinfo_map) != NULL
 	      && GL(dl_rtld_map).l_prev->l_next == GLRO(dl_sysinfo_map)
 	      && GL(dl_rtld_map).l_next != GLRO(dl_sysinfo_map))
@@ -1880,7 +1880,7 @@
 	      if (dyn->d_tag == DT_NEEDED)
 		{
 		  l = l->l_next;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
 		  /* Skip the VDSO since it's not part of the list
 		     of objects we brought in via DT_NEEDED entries.  */
 		  if (l == GLRO(dl_sysinfo_map))

Modified: fsf/trunk/libc/elf/setup-vdso.h
==============================================================================
--- fsf/trunk/libc/elf/setup-vdso.h (original)
+++ fsf/trunk/libc/elf/setup-vdso.h Sat Mar  2 00:02:44 2013
@@ -20,7 +20,7 @@
 setup_vdso (struct link_map *main_map __attribute__ ((unused)),
 	    struct link_map ***first_preload __attribute__ ((unused)))
 {
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
   if (GLRO(dl_sysinfo_dso) == NULL)
     return;
 

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Mar  2 00:02:44 2013
@@ -1,3 +1,22 @@
+2013-03-01  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* Makefile (tests): Revert last change.
+	(tst-pthread-stack-env-ENV): Likewise.
+	* nptl-init.c (set_default_stacksize): Likewise.
+	(__pthread_initialize_minimal_internal): Likewise.
+	* tst-pthread-stack-env.c: Likewise.
+
+2013-03-01  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* tst-oddstacklimit.c: Include stdlib.h.
+
+	* Makefile (tests): Add tst-pthread-stack-env.
+	(tst-pthread-stack-env-ENV): Set environment for test.
+	* nptl-init.c (set_default_stacksize): New function.
+	(__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
+	ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
+	* tst-pthread-stack-env.c: New test case.
+
 2013-02-21  David S. Miller  <davem@xxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h

Modified: fsf/trunk/libc/nptl/tst-oddstacklimit.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-oddstacklimit.c (original)
+++ fsf/trunk/libc/nptl/tst-oddstacklimit.c Sat Mar  2 00:02:44 2013
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <sys/resource.h>
 #include <sys/wait.h>
+#include <stdlib.h>
 
 /* This sets the stack resource limit to 1023kb, which is not a multiple
    of the page size since every architecture's page size is > 1k.  */

Modified: fsf/trunk/libc/sysdeps/generic/ldsodefs.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/ldsodefs.h (original)
+++ fsf/trunk/libc/sysdeps/generic/ldsodefs.h Sat Mar  2 00:02:44 2013
@@ -538,7 +538,7 @@
   EXTERN uintptr_t _dl_sysinfo;
 #endif
 
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
   /* The vsyscall page is a virtual DSO pre-mapped by the kernel.
      This points to its ELF header.  */
   EXTERN const ElfW(Ehdr) *_dl_sysinfo_dso;

Added: fsf/trunk/libc/sysdeps/powerpc/bits/fenvinline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/bits/fenvinline.h (added)
+++ fsf/trunk/libc/sysdeps/powerpc/bits/fenvinline.h Sat Mar  2 00:02:44 2013
@@ -1,0 +1,60 @@
+/* Inline floating-point environment handling functions for powerpc.
+   Copyright (C) 1995-2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if (defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__	\
+     && !defined __NO_MATH_INLINES)
+
+/* Inline definition for fegetround.  */
+# define fegetround() \
+  (__extension__  ({ int __fegetround_result;				      \
+		     __asm__ __volatile__				      \
+		       ("mcrfs 7,7 ; mfcr %0"				      \
+			: "=r"(__fegetround_result) : : "cr7");		      \
+		     __fegetround_result & 3; }))
+
+/* The weird 'i#*X' constraints on the following suppress a gcc
+   warning when __excepts is not a constant.  Otherwise, they mean the
+   same as just plain 'i'.  */
+
+/* Inline definition for feraiseexcept.  */
+# define feraiseexcept(__excepts) \
+  ((__builtin_constant_p (__excepts)					      \
+    && ((__excepts) & ((__excepts)-1)) == 0				      \
+    && (__excepts) != FE_INVALID)					      \
+   ? ((__excepts) != 0							      \
+      ? (__extension__ ({ __asm__ __volatile__				      \
+			  ("mtfsb1 %s0"					      \
+			   : : "i#*X"(__builtin_ffs (__excepts)));	      \
+			  0; }))					      \
+      : 0)								      \
+   : (feraiseexcept) (__excepts))
+
+/* Inline definition for feclearexcept.  */
+# define feclearexcept(__excepts) \
+  ((__builtin_constant_p (__excepts)					      \
+    && ((__excepts) & ((__excepts)-1)) == 0				      \
+    && (__excepts) != FE_INVALID)					      \
+   ? ((__excepts) != 0							      \
+      ? (__extension__ ({ __asm__ __volatile__				      \
+			  ("mtfsb0 %s0"					      \
+			   : : "i#*X"(__builtin_ffs (__excepts)));	      \
+			  0; }))					      \
+      : 0)								      \
+   : (feclearexcept) (__excepts))
+
+#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */

Added: fsf/trunk/libc/sysdeps/powerpc/bits/mathinline.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/bits/mathinline.h (added)
+++ fsf/trunk/libc/sysdeps/powerpc/bits/mathinline.h Sat Mar  2 00:02:44 2013
@@ -1,0 +1,130 @@
+/* Inline math functions for powerpc.
+   Copyright (C) 1995-2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#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 && !defined __NO_FPRS__
+
+#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 __LONG_DOUBLE_128__
+__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 && !__NO_FPRS__ */

Removed: fsf/trunk/libc/sysdeps/powerpc/fpu/fpu_control.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/fpu_control.h (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/fpu_control.h (removed)
@@ -1,81 +1,0 @@
-/* FPU control word definitions.  PowerPC version.
-   Copyright (C) 1996-2013 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _FPU_CONTROL_H
-#define _FPU_CONTROL_H
-
-#if defined _SOFT_FLOAT || defined __NO_FPRS__
-
-# define _FPU_RESERVED 0xffffffff
-# define _FPU_DEFAULT  0x00000000 /* Default value.  */
-typedef unsigned int fpu_control_t;
-# define _FPU_GETCW(cw) (cw) = 0
-# define _FPU_SETCW(cw) (void) (cw)
-extern fpu_control_t __fpu_control;
-
-#else /* PowerPC 6xx floating-point.  */
-
-/* rounding control */
-# define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
-# define _FPU_RC_DOWN    0x03
-# define _FPU_RC_UP      0x02
-# define _FPU_RC_ZERO    0x01
-
-# define _FPU_MASK_NI  0x04 /* non-ieee mode */
-
-/* masking of interrupts */
-# define _FPU_MASK_ZM  0x10 /* zero divide */
-# define _FPU_MASK_OM  0x40 /* overflow */
-# define _FPU_MASK_UM  0x20 /* underflow */
-# define _FPU_MASK_XM  0x08 /* inexact */
-# define _FPU_MASK_IM  0x80 /* invalid operation */
-
-# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
-
-/* The fdlibm code requires no interrupts for exceptions.  */
-# define _FPU_DEFAULT  0x00000000 /* Default value.  */
-
-/* IEEE:  same as above, but (some) exceptions;
-   we leave the 'inexact' exception off.
- */
-# define _FPU_IEEE     0x000000f0
-
-/* Type of the control word.  */
-typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
-
-/* Macros for accessing the hardware control word.  */
-# define _FPU_GETCW(__cw) ( { \
-  union { double d; fpu_control_t cw[2]; } \
-    tmp __attribute__ ((__aligned__(8))); \
-  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
-  (__cw)=tmp.cw[1]; \
-  tmp.cw[1]; } )
-# define _FPU_SETCW(__cw) { \
-  union { double d; fpu_control_t cw[2]; } \
-    tmp __attribute__ ((__aligned__(8))); \
-  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
-  tmp.cw[1] = __cw; \
-  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
-}
-
-/* Default control word set at startup.  */
-extern fpu_control_t __fpu_control;
-
-#endif /* PowerPC 6xx floating-point.  */
-
-#endif /* _FPU_CONTROL_H */

Added: fsf/trunk/libc/sysdeps/powerpc/fpu_control.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu_control.h (added)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu_control.h Sat Mar  2 00:02:44 2013
@@ -1,0 +1,81 @@
+/* FPU control word definitions.  PowerPC version.
+   Copyright (C) 1996-2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+#if defined _SOFT_FLOAT || defined __NO_FPRS__
+
+# define _FPU_RESERVED 0xffffffff
+# define _FPU_DEFAULT  0x00000000 /* Default value.  */
+typedef unsigned int fpu_control_t;
+# define _FPU_GETCW(cw) (cw) = 0
+# define _FPU_SETCW(cw) (void) (cw)
+extern fpu_control_t __fpu_control;
+
+#else /* PowerPC 6xx floating-point.  */
+
+/* rounding control */
+# define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
+# define _FPU_RC_DOWN    0x03
+# define _FPU_RC_UP      0x02
+# define _FPU_RC_ZERO    0x01
+
+# define _FPU_MASK_NI  0x04 /* non-ieee mode */
+
+/* masking of interrupts */
+# define _FPU_MASK_ZM  0x10 /* zero divide */
+# define _FPU_MASK_OM  0x40 /* overflow */
+# define _FPU_MASK_UM  0x20 /* underflow */
+# define _FPU_MASK_XM  0x08 /* inexact */
+# define _FPU_MASK_IM  0x80 /* invalid operation */
+
+# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
+
+/* The fdlibm code requires no interrupts for exceptions.  */
+# define _FPU_DEFAULT  0x00000000 /* Default value.  */
+
+/* IEEE:  same as above, but (some) exceptions;
+   we leave the 'inexact' exception off.
+ */
+# define _FPU_IEEE     0x000000f0
+
+/* Type of the control word.  */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
+
+/* Macros for accessing the hardware control word.  */
+# define _FPU_GETCW(__cw) ( { \
+  union { double d; fpu_control_t cw[2]; } \
+    tmp __attribute__ ((__aligned__(8))); \
+  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
+  (__cw)=tmp.cw[1]; \
+  tmp.cw[1]; } )
+# define _FPU_SETCW(__cw) { \
+  union { double d; fpu_control_t cw[2]; } \
+    tmp __attribute__ ((__aligned__(8))); \
+  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
+  tmp.cw[1] = __cw; \
+  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
+}
+
+/* Default control word set at startup.  */
+extern fpu_control_t __fpu_control;
+
+#endif /* PowerPC 6xx floating-point.  */
+
+#endif /* _FPU_CONTROL_H */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/dl-sysdep.c Sat Mar  2 00:02:44 2013
@@ -43,7 +43,7 @@
 attribute_hidden
 _dl_discover_osversion (void)
 {
-#if (defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO) && defined SHARED
+#if defined NEED_DL_SYSINFO_DSO && defined SHARED
   if (GLRO(dl_sysinfo_map) != NULL)
     {
       /* If the kernel-supplied DSO contains a note indicating the kernel's

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits