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

[Commits] r18321 - in /fsf/trunk/libc: ./ elf/ math/ nptl/ nptl/sysdeps/i386/ nptl/sysdeps/x86_64/ sysdeps/ieee754/ldbl-128ibm/ sysdep...



Author: eglibc
Date: Thu May  3 00:01:41 2012
New Revision: 18321

Log:
Import glibc-mainline for 2012-05-03

Added:
    fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.S
    fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.S
Removed:
    fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.c
    fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/elf/dl-sysdep.c
    fsf/trunk/libc/math/Makefile
    fsf/trunk/libc/nptl/ChangeLog
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
    fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu May  3 00:01:41 2012
@@ -1,3 +1,31 @@
+2012-05-02  David S. Miller  <davem@xxxxxxxxxxxxx>
+
+	* sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-05-02  Paul Pluzhnikov  <ppluzhnikov@xxxxxxxxxx>
+
+	[BZ #14055]
+	* elf/dl-sysdep.c (_dl_show_auxv): Add bounds check.
+
+2012-05-02  Andreas Jaeger  <aj@xxxxxxx>
+
+	* math/Makefile (CPPFLAGS-test-ildoubl.c): Add -frounding-math
+	since we manipulate rounding mode.
+	(CPPFLAGS-test-idouble.c): Likewise.
+	(CPPFLAGS-test-ifloat.c): Likewise.
+	(CFLAGS-test-ldouble.c): Likewise.
+	(CFLAGS-test-double.c): Likewise.
+	(CFLAGS-test-float.c): Likewise.
+	(CFLAGS-test-misc.c): Likewise.
+	(CFLAGS-test-test-fenv.c): Likewise.
+
+2012-05-02  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+        [BZ #2550]
+        [BZ #2570]
+        * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Use floating-point
+        comparisons to determine direction to adjust input.
+
 2012-05-01  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* elf/Makefile ($(objpfx)check-localplt.out): Redirect the test's

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu May  3 00:01:41 2012
@@ -23,7 +23,7 @@
   13873, 13879, 13883, 13886, 13892, 13895, 13908, 13910, 13911, 13912,
   13913, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13924, 13926,
   13927, 13928, 13938, 13941, 13942, 13963, 13967, 13970, 13973, 14027,
-  14033, 14034, 14040
+  14033, 14034, 14040, 14055
 
 * ISO C11 support:
 

Modified: fsf/trunk/libc/elf/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/elf/dl-sysdep.c (original)
+++ fsf/trunk/libc/elf/dl-sysdep.c Thu May  3 00:01:41 2012
@@ -1,5 +1,5 @@
 /* Operating system support for run-time dynamic linker.  Generic Unix version.
-   Copyright (C) 1995-1998,2000-2008,2009,2010
+   Copyright (C) 1995-1998,2000-2010,2012
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -303,7 +303,9 @@
 	};
       unsigned int idx = (unsigned int) (av->a_type - 2);
 
-      if ((unsigned int) av->a_type < 2u || auxvars[idx].form == ignore)
+      if ((unsigned int) av->a_type < 2u
+	  || (idx < sizeof (auxvars) / sizeof (auxvars[0])
+	      && auxvars[idx].form == ignore))
 	continue;
 
       assert (AT_NULL == 0);

Modified: fsf/trunk/libc/math/Makefile
==============================================================================
--- fsf/trunk/libc/math/Makefile (original)
+++ fsf/trunk/libc/math/Makefile Thu May  3 00:01:41 2012
@@ -122,19 +122,21 @@
 $(objpfx)test-ildoubl.o: $(objpfx)libm-test.stmp
 endif
 
-CFLAGS-test-float.c = -fno-inline -ffloat-store -fno-builtin
-CFLAGS-test-double.c = -fno-inline -ffloat-store -fno-builtin
-CFLAGS-test-ldouble.c = -fno-inline -ffloat-store -fno-builtin
+CFLAGS-test-float.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
+CFLAGS-test-double.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
+CFLAGS-test-ldouble.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
 CFLAGS-test-tgmath.c = -fno-builtin
 CFLAGS-test-tgmath2.c = -fno-builtin
 CFLAGS-test-tgmath-ret.c = -fno-builtin
 CFLAGS-test-powl.c = -fno-builtin
+CFLAGS-test-test-fenv.c = -frounding-math
+CFLAGS-test-misc.c = -frounding-math
 CPPFLAGS-test-ifloat.c = -U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ \
-			 -DTEST_FAST_MATH -fno-builtin
+			 -DTEST_FAST_MATH -fno-builtin -frounding-math
 CPPFLAGS-test-idouble.c = -U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ \
-			 -DTEST_FAST_MATH -fno-builtin
+			 -DTEST_FAST_MATH -fno-builtin -frounding-math
 CPPFLAGS-test-ildoubl.c = -U__LIBC_INTERNAL_MATH_INLINES -D__FAST_MATH__ \
-			  -DTEST_FAST_MATH -fno-builtin
+			  -DTEST_FAST_MATH -fno-builtin -frounding-math
 
 
 # The -lieee module sets the _LIB_VERSION_ switch to IEEE mode

Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu May  3 00:01:41 2012
@@ -1,3 +1,10 @@
+2012-05-02  Paul Pluzhnikov  <ppluzhnikov@xxxxxxxxxx>
+
+	* sysdeps/i386/pthread_spin_lock.S: New.
+	* sysdeps/i386/pthread_spin_lock.c: Delete.
+	* sysdeps/x86_64/pthread_spin_lock.S: New.
+	* sysdeps/x86_64/pthread_spin_lock.c: Delete.
+
 2012-04-28  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
 
 	* Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't

Added: fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.S (added)
+++ fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.S Thu May  3 00:01:41 2012
@@ -1,0 +1,37 @@
+/* Copyright (C) 2012 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/>.  */
+
+#include <lowlevellock.h>
+
+	.globl	pthread_spin_lock
+	.type	pthread_spin_lock,@function
+	.align	16
+pthread_spin_lock:
+	mov	4(%esp), %eax
+1:	LOCK
+	decl	0(%eax)
+	jne	2f
+	xor	%eax, %eax
+	ret
+
+	.align	16
+2:	rep
+	nop
+	cmpl	$0, 0(%eax)
+	jg	1b
+	jmp	2b
+	.size	pthread_spin_lock,.-pthread_spin_lock

Removed: fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/i386/pthread_spin_lock.c (removed)
@@ -1,48 +1,0 @@
-/* Copyright (C) 2002,2003,2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
-
-   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/>.  */
-
-#include "pthreadP.h"
-
-#ifndef LOCK_PREFIX
-# ifdef UP
-#  define LOCK_PREFIX	/* nothing */
-# else
-#  define LOCK_PREFIX	"lock;"
-# endif
-#endif
-
-
-int
-pthread_spin_lock (lock)
-     pthread_spinlock_t *lock;
-{
-  asm ("\n"
-       "1:\t" LOCK_PREFIX "decl %0\n\t"
-       "jne 2f\n\t"
-       ".subsection 1\n\t"
-       ".align 16\n"
-       "2:\trep; nop\n\t"
-       "cmpl $0, %0\n\t"
-       "jg 1b\n\t"
-       "jmp 2b\n\t"
-       ".previous"
-       : "=m" (*lock)
-       : "m" (*lock));
-
-  return 0;
-}

Added: fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.S (added)
+++ fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.S Thu May  3 00:01:41 2012
@@ -1,0 +1,36 @@
+/* Copyright (C) 2012 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/>.  */
+
+#include <lowlevellock.h>
+
+	.globl	pthread_spin_lock
+	.type	pthread_spin_lock,@function
+	.align	16
+pthread_spin_lock:
+1:	LOCK
+	decl	0(%rdi)
+	jne	2f
+	xor	%eax, %eax
+	ret
+
+	.align	16
+2:	rep
+	nop
+	cmpl	$0, 0(%rdi)
+	jg	1b
+	jmp	2b
+	.size	pthread_spin_lock,.-pthread_spin_lock

Removed: fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/x86_64/pthread_spin_lock.c (removed)
@@ -1,1 +1,0 @@
-#include "../i386/pthread_spin_lock.c"

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c Thu May  3 00:01:41 2012
@@ -57,11 +57,7 @@
 	    return x;
 	}
 	if(hx>=0) {				/* x > 0 */
-	    if (hy<0||(ix>>20)>(iy>>52)
-		|| ((ix>>20)==(iy>>52)
-		    && (((((int64_t)hx)<<32)|(lx))>(hy&0x000fffffffffffffLL)
-			|| (((((int64_t)hx)<<32)|(lx))==(hy&0x000fffffffffffffLL)
-			    )))) {	/* x > y, x -= ulp */
+	    if (x > y) {			/* x > 0 */
 		if(lx==0) hx -= 1;
 		lx -= 1;
 	    } else {				/* x < y, x += ulp */
@@ -69,11 +65,7 @@
 		if(lx==0) hx += 1;
 	    }
 	} else {				/* x < 0 */
-	    if (hy>=0||(ix>>20)>(iy>>52)
-		|| ((ix>>20)==(iy>>52)
-		    && (((((int64_t)hx)<<32)|(lx))>(hy&0x000fffffffffffffLL)
-			|| (((((int64_t)hx)<<32)|(lx))==(hy&0x000fffffffffffffLL)
-			   )))) {	/* x < y, x -= ulp */
+	    if (x < y) {			/* x < 0 */
 		if(lx==0) hx -= 1;
 		lx -= 1;
 	    } else {				/* x > y, x += ulp */

Modified: fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/sparc/fpu/libm-test-ulps Thu May  3 00:01:41 2012
@@ -1,4 +1,68 @@
 # Begin of automatic generation
+
+# acos_downward
+Test "acos_downward (-0.5) == M_PI_6l*4.0":
+double: 1
+idouble: 1
+Test "acos_downward (0.5) == M_PI_6l*2.0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# acos_towardzero
+Test "acos_towardzero (-0.5) == M_PI_6l*4.0":
+double: 1
+idouble: 1
+Test "acos_towardzero (0.5) == M_PI_6l*2.0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# asin_downward
+Test "asin_downward (-0.5) == -pi/6":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "asin_downward (-1.0) == -pi/2":
+ildouble: 1
+ldouble: 1
+Test "asin_downward (0.5) == pi/6":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "asin_downward (1.0) == pi/2":
+float: 1
+ifloat: 1
+
+# asin_towardzero
+Test "asin_towardzero (-0.5) == -pi/6":
+double: 1
+idouble: 1
+Test "asin_towardzero (-1.0) == -pi/2":
+float: 1
+ifloat: 1
+Test "asin_towardzero (0.5) == pi/6":
+double: 1
+idouble: 1
+Test "asin_towardzero (1.0) == pi/2":
+float: 1
+ifloat: 1
+
+# asin_upward
+Test "asin_upward (-1.0) == -pi/2":
+float: 1
+ifloat: 1
+Test "asin_upward (1.0) == pi/2":
+ildouble: 1
+ldouble: 1
 
 # atan2
 Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
@@ -2013,6 +2077,42 @@
 idouble: 1
 
 # Maximal error of functions:
+Function: "acos_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "acos_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "asin_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "asin_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "asin_upward":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "atan2":
 float: 1
 ifloat: 1

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