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

[commits] r8879 - in /trunk/libc: ./ math/ nptl/ nptl/sysdeps/x86_64/ sysdeps/ieee754/dbl-64/wordsize-64/ sysdeps/x86_64/ sysdeps/x86_...



Author: joseph
Date: Tue Aug 25 19:17:41 2009
New Revision: 8879

Log:
Merge changes between r8871 and r8878 from /fsf/trunk.

Added:
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c
    trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c
    trunk/libc/sysdeps/x86_64/fpu/s_scalbln.c
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/x86_64/fpu/s_scalbln.c
    trunk/libc/sysdeps/x86_64/fpu/s_scalbn.c
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/x86_64/fpu/s_scalbn.c
    trunk/libc/sysdeps/x86_64/fpu/s_signbit.S
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/x86_64/fpu/s_signbit.S
    trunk/libc/sysdeps/x86_64/fpu/s_signbitf.S
      - copied unchanged from r8878, fsf/trunk/libc/sysdeps/x86_64/fpu/s_signbitf.S
Modified:
    trunk/libc/CONFORMANCE
    trunk/libc/ChangeLog
    trunk/libc/math/s_fdiml.c
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/x86_64/tls.h
    trunk/libc/sysdeps/x86_64/dl-trampoline.S

Modified: trunk/libc/CONFORMANCE
==============================================================================
--- trunk/libc/CONFORMANCE (original)
+++ trunk/libc/CONFORMANCE Tue Aug 25 19:17:41 2009
@@ -125,7 +125,9 @@
 values.  This conflicts with the glibc extension where %as, %a[ and
 %aS mean to allocate the string for the data read.  A strictly
 conforming C99 program using %as, %a[ or %aS in a scanf format string
-will misbehave under glibc.
+will misbehave under glibc if it does not include <stdio.h> and
+instead declares scanf itself; if it gets the declaration of scanf
+from <stdio.h>, it will use a C99-conforming version.
 
 
 Compiler limitations
@@ -144,29 +146,21 @@
 understand the keyword _Complex before GCC 3.0.  This has the
 corresponding impact on the relevant headers.
 
-glibc's use of extern inline conflicts with C99: in C99, extern inline
-means that an external definition is generated as well as possibly an
-inline definition, but in GCC it means that no external definition is
-generated.  When GCC's C99 mode implements C99 inline semantics, this
-will break the uses of extern inline in glibc's headers.  (Actually,
-glibc uses `extern __inline', which is beyond the scope of the
-standard, but it would clearly be very confusing for `__inline' and
-plain `inline' to have different meanings in C99 mode.)
-
 glibc's <tgmath.h> implementation is arcane but thought to work
 correctly; a clean and comprehensible version requires compiler
 builtins.
 
 For most of the headers required of freestanding implementations,
 glibc relies on GCC to provide correct versions.  (At present, glibc
-provides <stdint.h>, and GCC doesn't.)
+provides <stdint.h>, and GCC doesn't before version 4.5.)
 
-Implementing MATH_ERRNO, MATH_ERREXCEPT and math_errhandling in
-<math.h> needs compiler support: see
-
-http://sources.redhat.com/ml/libc-hacker/2000-06/msg00008.html
-http://sources.redhat.com/ml/libc-hacker/2000-06/msg00014.html
-http://sources.redhat.com/ml/libc-hacker/2000-06/msg00015.html
+The definition of math_errhandling conforms so long as no translation
+unit using math_errhandling is compiled with -fno-math-errno,
+-fno-trapping-math or options such as -ffast-math that imply these
+options.  math_errhandling is only conditionally defined depending on
+__FAST_MATH__; the compiler does not provide the information needed
+for more exact definitions based on settings of -fno-math-errno and
+-fno-trapping-math, possibly for only some source files in a program.
 
 
 Issues with headers

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Tue Aug 25 19:17:41 2009
@@ -1,3 +1,23 @@
+2009-08-25  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* math/s_fdiml.c (__fdiml): Use fpclassify instead of fpclassifyl.
+
+2009-08-25  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/x86_64/fpu/s_scalbln.c: New file.
+	* sysdeps/x86_64/fpu/s_scalbn.c: New file.
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c: New file.
+
+	* sysdeps/x86_64/fpu/s_signbit.S: New file.
+	* sysdeps/x86_64/fpu/s_signbitf.S: New file.
+
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_lround.c: New file.
+	* sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c: New file.
+
+	* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Remove
+	leftover YMM_SIZE definition.
+
 2009-08-24  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* math/math_private.h (ieee_double_shape_type): Add uint64_t word to

Modified: trunk/libc/math/s_fdiml.c
==============================================================================
--- trunk/libc/math/s_fdiml.c (original)
+++ trunk/libc/math/s_fdiml.c Tue Aug 25 19:17:41 2009
@@ -24,8 +24,8 @@
 long double
 __fdiml (long double x, long double y)
 {
-  int clsx = fpclassifyl (x);
-  int clsy = fpclassifyl (y);
+  int clsx = fpclassify (x);
+  int clsy = fpclassify (y);
 
   if (clsx == FP_NAN || clsy == FP_NAN
       || (y < 0 && clsx == FP_INFINITE && clsy == FP_INFINITE))

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Tue Aug 25 19:17:41 2009
@@ -1,3 +1,10 @@
+2009-08-25  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
+	of the field in local variables.
+	(RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
+	variable and don't unconditionally clear it.
+
 2009-08-24  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* pthread_create.c (start_thread): Hint to the kernel that memory for

Modified: trunk/libc/nptl/sysdeps/x86_64/tls.h
==============================================================================
--- trunk/libc/nptl/sysdeps/x86_64/tls.h (original)
+++ trunk/libc/nptl/sysdeps/x86_64/tls.h Tue Aug 25 19:17:41 2009
@@ -188,7 +188,7 @@
 
    The contained asm must *not* be marked volatile since otherwise
    assignments like
-        pthread_descr self = thread_self();
+	pthread_descr self = thread_self();
    do not get optimized away.  */
 # define THREAD_SELF \
   ({ struct pthread *__self;						      \
@@ -404,7 +404,12 @@
 # define RTLD_CHECK_FOREIGN_CALL \
   (THREAD_GETMEM (THREAD_SELF, header.rtld_must_xmm_save) != 0)
 
+/* NB: Don't use the xchg operation because that would imply a lock
+   prefix which is expensive and unnecessary.  The cache line is also
+   not contested at all.  */
 #  define RTLD_ENABLE_FOREIGN_CALL \
+  int old_rtld_must_xmm_save = THREAD_GETMEM (THREAD_SELF,		      \
+					      header.rtld_must_xmm_save);     \
   THREAD_SETMEM (THREAD_SELF, header.rtld_must_xmm_save, 1)
 
 #  define RTLD_PREPARE_FOREIGN_CALL \
@@ -419,7 +424,8 @@
   do {									      \
     if (THREAD_GETMEM (THREAD_SELF, header.rtld_must_xmm_save) == 0)	      \
       _dl_x86_64_restore_sse ();					      \
-    THREAD_SETMEM (THREAD_SELF, header.rtld_must_xmm_save, 0);		      \
+    THREAD_SETMEM (THREAD_SELF, header.rtld_must_xmm_save,		      \
+		   old_rtld_must_xmm_save);				      \
   } while (0)
 # endif
 

Modified: trunk/libc/sysdeps/x86_64/dl-trampoline.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/dl-trampoline.S (original)
+++ trunk/libc/sysdeps/x86_64/dl-trampoline.S Tue Aug 25 19:17:41 2009
@@ -197,7 +197,6 @@
 	ret
 L(no_avx5):
 # endif
-# define YMM_SIZE 16
 	movdqa	%xmm0, %fs:RTLD_SAVESPACE_SSE+0*XMM_SIZE
 	movdqa	%xmm1, %fs:RTLD_SAVESPACE_SSE+1*XMM_SIZE
 	movdqa	%xmm2, %fs:RTLD_SAVESPACE_SSE+2*XMM_SIZE