+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):
+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.
# 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. */
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.
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;
}
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);
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
}
__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];