about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-24 22:05:34 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-24 22:05:34 +0000
commit9ce0ecbe384f09030cd5d014e17179725e778fa6 (patch)
treefe311a312021ab640083716643ac2c891d54bb10
parent6abbc50157efd0a8cec43827774307c9dc2a6493 (diff)
downloadglibc-9ce0ecbe384f09030cd5d014e17179725e778fa6.tar.gz
glibc-9ce0ecbe384f09030cd5d014e17179725e778fa6.tar.xz
glibc-9ce0ecbe384f09030cd5d014e17179725e778fa6.zip
Update.
2004-03-24  Jakub Jelinek  <jakub@redhat.com>

	* stdlib/strtod_l.c (INTERNAL (__STRTOF)): Clear the rest of retval,
	not just one limb if RETURN_LIMB_SIZE > 2.  Fix shifting up if
	RETURN_LIMB_SIZE > 2.

	* stdio-common/printf_fp.c (__printf_fp): For IEEE quad long double
	on 32-bit architectures reserve 8 limbs instead of 4.
-rw-r--r--ChangeLog9
-rw-r--r--linuxthreads/ChangeLog4
-rw-r--r--linuxthreads/sysdeps/powerpc/tls.h10
-rw-r--r--math/README.libm-test12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/getpid.c2
-rw-r--r--stdio-common/printf_fp.c4
-rw-r--r--stdlib/strtod_l.c8
7 files changed, 34 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 7853c66f55..e2df440c5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-24  Jakub Jelinek  <jakub@redhat.com>
+
+	* stdlib/strtod_l.c (INTERNAL (__STRTOF)): Clear the rest of retval,
+	not just one limb if RETURN_LIMB_SIZE > 2.  Fix shifting up if
+	RETURN_LIMB_SIZE > 2.
+
+	* stdio-common/printf_fp.c (__printf_fp): For IEEE quad long double
+	on 32-bit architectures reserve 8 limbs instead of 4.
+
 2004-03-23  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_pread, __NR_pwrite):
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 442dc0b513..c55d28f7e2 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
+
+	* sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
+
 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
diff --git a/linuxthreads/sysdeps/powerpc/tls.h b/linuxthreads/sysdeps/powerpc/tls.h
index de651eb8d2..76104cd14c 100644
--- a/linuxthreads/sysdeps/powerpc/tls.h
+++ b/linuxthreads/sysdeps/powerpc/tls.h
@@ -130,14 +130,12 @@ typedef struct
 
 # endif /* __ASSEMBLER__ */
 
-#elif !defined __ASSEMBLER__ && !defined __powerpc64__
+#elif !defined __ASSEMBLER__
 
-/* This overlaps the start of the pthread_descr.  On PPC32, system
-   calls and such use this to find the multiple_threads flag and need
+/* This overlaps the start of the pthread_descr.  System calls
+   and such use this to find the multiple_threads flag and need
    to use the same offset relative to the thread register in both
-   single-threaded and multi-threaded code.  On PPC64, the global
-   variable is always used, so single-threaded code without TLS
-   never needs to initialize the thread register at all.  */
+   single-threaded and multi-threaded code.  */
 typedef struct
 {
   void *tcb;			/* Never used.  */
diff --git a/math/README.libm-test b/math/README.libm-test
index af07622ccd..7a461551cb 100644
--- a/math/README.libm-test
+++ b/math/README.libm-test
@@ -45,15 +45,15 @@ but it's better to pretty print it first.  "gen-libm-test.pl"  has an option
 to generate a pretty-printed and sorted new ULPs file from the output
 of the test drivers.
 
-To generate a new "libm-test-ulps" file, you can execute for example:
+To generate a new "libm-test-ulps" file, first remove "ULPs" file in the
+current directory, then you can execute for example:
 test-double -u --ignore-max-ulp=yes
 This generates a file "ULPs" with all double ULPs in it, ignoring any
 previous calculated ULPs.
-Now move this away, e.g. "mv ULPs allULPs" and generate the ULPs
-for all other formats and concat all ULP files together (e.g. "cat
-ULPs >> allULPs").  As final step run "gen-libm-test.pl" with the file
-as input and ask to generate a pretty printed output in the file "NewUlps":
-  gen-libm-test.pl -u allULPs -n
+Now generate the ULPs for all other formats, the tests will be appending
+the data to the "ULPs" file.  As final step run "gen-libm-test.pl" with the
+file as input and ask to generate a pretty printed output in the file "NewUlps":
+  gen-libm-test.pl -u ULPs -n
 
 Now you can rename "NewUlps" to "libm-test-ulps" and move it into
 sysdeps.
diff --git a/nptl/sysdeps/unix/sysv/linux/getpid.c b/nptl/sysdeps/unix/sysv/linux/getpid.c
index 476981e975..98307ff21d 100644
--- a/nptl/sysdeps/unix/sysv/linux/getpid.c
+++ b/nptl/sysdeps/unix/sysv/linux/getpid.c
@@ -31,7 +31,7 @@ really_getpid (pid_t oldval)
   if (__builtin_expect (oldval == 0, 1))
     {
       pid_t selftid = THREAD_GETMEM (THREAD_SELF, tid);
-      if (__builtin_expect (selftid != 0), 1)
+      if (__builtin_expect (selftid != 0, 1))
 	return selftid;
     }
 
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index 62867e75f2..ed225e05a6 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -430,7 +430,9 @@ __printf_fp (FILE *fp,
      would be really big it could lead to memory problems.  */
   {
     mp_size_t bignum_size = ((ABS (exponent) + BITS_PER_MP_LIMB - 1)
-			     / BITS_PER_MP_LIMB + 4) * sizeof (mp_limb_t);
+			     / BITS_PER_MP_LIMB
+			     + (LDBL_MANT_DIG / BITS_PER_MP_LIMB > 2 ? 8 : 4))
+			    * sizeof (mp_limb_t);
     frac = (mp_limb_t *) alloca (bignum_size);
     tmp = (mp_limb_t *) alloca (bignum_size);
     scale = (mp_limb_t *) alloca (bignum_size);
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 89d30b435b..9eca802a10 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1155,7 +1155,11 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
       memcpy (retval, num, numsize * sizeof (mp_limb_t));
 #if RETURN_LIMB_SIZE > 1
       if (numsize < RETURN_LIMB_SIZE)
+# if RETURN_LIMB_SIZE == 2
         retval[numsize] = 0;
+# else
+	MPN_ZERO (retval + numsize, RETURN_LIMB_SIZE - numsize);
+# endif
 #endif
     }
 
@@ -1461,8 +1465,10 @@ INTERNAL (__STRTOF) (nptr, endptr, group, loc)
 		      __mpn_lshift_1 (retval, RETURN_LIMB_SIZE,
 				      BITS_PER_MP_LIMB, 0);
 #else
-		      for (i = RETURN_LIMB_SIZE; i > empty; --i)
+		      for (i = RETURN_LIMB_SIZE - 1; i >= empty; --i)
 			retval[i] = retval[i - empty];
+		      while (i >= 0)
+			retval[i--] = 0;
 #endif
 		      for (i = numsize; i > 0; --i)
 			num[i + empty] = num[i - 1];