[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2425 - in /trunk: libc/ libc/math/ libc/stdio-common/ libc/sysdeps/ieee754/ldbl-128ibm/ ports/ ports/sysdeps/arm/nptl/ port...
- To: commits@xxxxxxxxxx
- Subject: [commits] r2425 - in /trunk: libc/ libc/math/ libc/stdio-common/ libc/sysdeps/ieee754/ldbl-128ibm/ ports/ ports/sysdeps/arm/nptl/ port...
- From: joseph@xxxxxxxxxx
- Date: Wed, 06 Jun 2007 17:48:04 -0000
Author: joseph
Date: Wed Jun 6 10:48:04 2007
New Revision: 2425
Log:
Merge changes between r2393 and r2424 from /fsf/trunk.
Added:
trunk/libc/stdio-common/tst-sprintf2.c
- copied unchanged from r2424, fsf/trunk/libc/stdio-common/tst-sprintf2.c
Modified:
trunk/libc/ChangeLog
trunk/libc/math/test-misc.c
trunk/libc/stdio-common/Makefile
trunk/libc/sysdeps/ieee754/ldbl-128ibm/printf_fphex.c
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/arm/nptl/tls.h
trunk/ports/sysdeps/mips/nptl/tls.h
trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Wed Jun 6 10:48:04 2007
@@ -1,3 +1,14 @@
+2007-06-04 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c
+ (PRINT_FPHEX_LONG_DOUBLE): Fix printing numbers where lower double
+ is non-zero, but smaller than 2 * __DBL_MIN__.
+ * stdio-common/tst-sprintf2.c: New test.
+ * stdio-common/Makefile (tests): Add tst-sprintf2.
+
+ * math/test-misc.c (main): Don't run last batch of tests with
+ IBM long double format.
+
2007-05-31 Steven Munroe <sjmunroe@xxxxxxxxxx>
* sysdeps/powerpc/powerpc32/970/fpu/Implies: New file.
Modified: trunk/libc/math/test-misc.c
==============================================================================
--- trunk/libc/math/test-misc.c (original)
+++ trunk/libc/math/test-misc.c Wed Jun 6 10:48:04 2007
@@ -1235,7 +1235,12 @@
}
#endif
-#if !defined NO_LONG_DOUBLE && LDBL_MANT_DIG >= DBL_MANT_DIG + 4
+/* Skip testing IBM long double format, for 2 reasons:
+ 1) it only supports FE_TONEAREST
+ 2) nextafter (0.0, 1.0) == nextafterl (0.0L, 1.0L), so
+ nextafter (0.0, 1.0) / 16.0L will be 0.0L. */
+#if !defined NO_LONG_DOUBLE && LDBL_MANT_DIG >= DBL_MANT_DIG + 4 \
+ && LDBL_MANT_DIG != 106
int oldmode = fegetround ();
int j;
for (j = 0; j < 4; j++)
Modified: trunk/libc/stdio-common/Makefile
==============================================================================
--- trunk/libc/stdio-common/Makefile (original)
+++ trunk/libc/stdio-common/Makefile Wed Jun 6 10:48:04 2007
@@ -56,7 +56,7 @@
tst-fseek tst-fmemopen tst-gets \
tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
- tst-fwrite bug16 bug17 tst-swscanf
+ tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-sscanf tst-swprintf bug15 test-vfprintf
Modified: trunk/libc/sysdeps/ieee754/ldbl-128ibm/printf_fphex.c
==============================================================================
--- trunk/libc/sysdeps/ieee754/ldbl-128ibm/printf_fphex.c (original)
+++ trunk/libc/sysdeps/ieee754/ldbl-128ibm/printf_fphex.c Wed Jun 6 10:48:04 2007
@@ -1,5 +1,5 @@
/* Print floating point number in hexadecimal notation according to ISO C99.
- Copyright (C) 1997,1998,1999,2000,2001,2002,2004,2006
+ Copyright (C) 1997,1998,1999,2000,2001,2002,2004,2006,2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -35,21 +35,24 @@
\
lo = ((long long)eldbl.ieee.mantissa2 << 32) | eldbl.ieee.mantissa3; \
hi = ((long long)eldbl.ieee.mantissa0 << 32) | eldbl.ieee.mantissa1; \
- /* If the lower double is not a denomal or zero then set the hidden \
- 53rd bit. */ \
- if (eldbl.ieee.exponent2 > 0x001) \
- { \
- lo |= (1ULL << 52); \
- lo = lo << 7; /* pre-shift lo to match ieee854. */ \
- /* The lower double is normalized separately from the upper. We \
- may need to adjust the lower manitissa to reflect this. */ \
- ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; \
- if (ediff > 53) \
- lo = lo >> (ediff-53); \
- } \
- \
- if ((eldbl.ieee.negative != eldbl.ieee.negative2) \
- && ((eldbl.ieee.exponent2 != 0) && (lo != 0L))) \
+ lo <<= 7; /* pre-shift lo to match ieee854. */ \
+ /* If the lower double is not a denomal or zero then set the hidden \
+ 53rd bit. */ \
+ if (eldbl.ieee.exponent2 != 0) \
+ lo |= (1ULL << (52 + 7)); \
+ else \
+ lo <<= 1; \
+ /* The lower double is normalized separately from the upper. We \
+ may need to adjust the lower manitissa to reflect this. */ \
+ ediff = eldbl.ieee.exponent - eldbl.ieee.exponent2; \
+ if (ediff > 53 + 63) \
+ lo = 0; \
+ else if (ediff > 53) \
+ lo = lo >> (ediff - 53); \
+ else if (eldbl.ieee.exponent2 == 0 && ediff < 53) \
+ lo = lo << (53 - ediff); \
+ if (eldbl.ieee.negative != eldbl.ieee.negative2 \
+ && (eldbl.ieee.exponent2 != 0 || lo != 0L)) \
{ \
lo = (1ULL << 60) - lo; \
if (hi == 0L) \
Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Wed Jun 6 10:48:04 2007
@@ -1,3 +1,20 @@
+2007-06-06 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+ (lll_unlock_wake_cb): Delete.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+ (RTLD_SINGLE_THREAD_P): Define.
+
2007-05-23 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Wed Jun 6 10:48:04 2007
@@ -1,3 +1,16 @@
+2007-06-06 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+
2007-05-24 Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
Modified: trunk/ports/sysdeps/arm/nptl/tls.h
==============================================================================
--- trunk/ports/sysdeps/arm/nptl/tls.h (original)
+++ trunk/ports/sysdeps/arm/nptl/tls.h Wed Jun 6 10:48:04 2007
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/ARM version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 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
@@ -132,6 +132,29 @@
is not available. */
#define TLS_INIT_TP_EXPENSIVE 1
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
Modified: trunk/ports/sysdeps/mips/nptl/tls.h
==============================================================================
--- trunk/ports/sysdeps/mips/nptl/tls.h (original)
+++ trunk/ports/sysdeps/mips/nptl/tls.h Wed Jun 6 10:48:04 2007
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/MIPS version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 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
@@ -156,6 +156,29 @@
different value to mean unset l_tls_offset. */
# define NO_TLS_OFFSET -1
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h Wed Jun 6 10:48:04 2007
@@ -18,6 +18,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+
+#include <endian.h>
#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_MUTEX_T 24
@@ -126,9 +128,21 @@
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c Wed Jun 6 10:48:04 2007
@@ -1,5 +1,5 @@
/* low level locking for pthread library. Generic futex-using version.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007 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
@@ -63,20 +63,8 @@
}
-/* These don't get included in libc.so */
+/* This function doesn't get included in libc.so */
#ifdef IS_IN_libpthread
-int
-lll_unlock_wake_cb (int *futex)
-{
- int val = atomic_exchange_rel (futex, 0);
-
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
-
- return 0;
-}
-
-
int
__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
@@ -114,5 +102,4 @@
return 0;
}
-
#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h Wed Jun 6 10:48:04 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007 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
@@ -34,6 +34,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -234,8 +235,6 @@
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* The states of a lock are:
0 - untaken
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h Wed Jun 6 10:48:04 2007
@@ -126,3 +126,9 @@
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h Wed Jun 6 10:48:04 2007
@@ -19,6 +19,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+
+#include <endian.h>
#if _MIPS_SIM == _ABI64
# define __SIZEOF_PTHREAD_ATTR_T 56
@@ -157,9 +159,9 @@
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
- int __pad1;
+ int __shared;
+ unsigned long int __pad1;
unsigned long int __pad2;
- unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
@@ -173,9 +175,21 @@
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
# endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h Wed Jun 6 10:48:04 2007
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2006, 2007 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
@@ -35,6 +35,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -233,8 +234,6 @@
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* The states of a lock are:
0 - untaken