[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9466 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/i386/ nptl/sysdeps/unix/sysv/linux/i386/i486/ sysdeps/i386...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9466 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/i386/ nptl/sysdeps/unix/sysv/linux/i386/i486/ sysdeps/i386...
- From: eglibc@xxxxxxxxxx
- Date: Mon, 14 Dec 2009 08:05:01 -0000
Author: eglibc
Date: Mon Dec 14 00:04:36 2009
New Revision: 9466
Log:
Import glibc-mainline for 2009-12-14
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S
fsf/trunk/libc/sysdeps/i386/i686/multiarch/strlen.S
fsf/trunk/libc/sysdeps/i386/i686/multiarch/strspn.S
fsf/trunk/libc/sysdeps/sh/elf/initfini.c
fsf/trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
fsf/trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strchr.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strcmp.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strcspn.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strlen.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strrchr.S
fsf/trunk/libc/sysdeps/x86_64/multiarch/strspn.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Dec 14 00:04:36 2009
@@ -1,3 +1,40 @@
+2009-12-13 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strcspn.S Include <init-arch.h>
+ instead of <ifunc-defines.h>. Use bit_XXX and index_XXX to
+ check processor feature.
+ * sysdeps/i386/i686/multiarch/strlen.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/init-arch.h (bit_SSE2): New definition.
+ (index_SSE2): Likewise.
+
+2009-12-09 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/x86_64/multiarch/init-arch.h: Include <ifunc-defines.h>
+ if __ASSEMBLER__ is defined.
+ (bit_SSSE3): New. Defined for __ASSEMBLER__.
+ (bit_SSE4_2): Likewise.
+ (index_SSSE3): Likewise.
+ (index_SSE4_2): Likewise.
+ * sysdeps/x86_64/multiarch/rawmemchr.S: Include <init-arch.h>
+ instead of <ifunc-defines.h>. Use bit_XXX and index_XXX to
+ check processor feature.
+ * sysdeps/x86_64/multiarch/strchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcmp.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/strlen.S: Likewise.
+ * sysdeps/x86_64/multiarch/strrchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strspn.S: Likewise.
+
+2009-12-08 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/sh/elf/initfini.c: Update according to generic/initfini.c.
+
+2009-12-01 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/sh/sh4/fpu/fpu_control.h (__set_fpscr): New prototype.
+
2009-12-11 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Redefine O_SYNC and
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Mon Dec 14 00:04:36 2009
@@ -1,3 +1,19 @@
+2009-12-01 Dinakar Guniguntala <dino@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
+ FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
+ is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
+ is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
+
+2009-12-12 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+ Don't update nwaiters after invalid timeout is recognized.
+
2009-11-27 Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S Mon Dec 14 00:04:36 2009
@@ -91,11 +91,16 @@
8: cmpl $-1, %edi
je 9f
- /* XXX: The kernel so far doesn't support requeue to PI futex. */
- /* XXX: The kernel only supports FUTEX_CMP_REQUEUE to the same
- type of futex (private resp. shared). */
- testl $(PI_BIT | PS_BIT), MUTEX_KIND(%edi)
+ /* Do not use requeue for pshared condvars. */
+ testl $PS_BIT, MUTEX_KIND(%edi)
jne 9f
+
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ je 81f
/* Wake up all threads. */
#ifdef __ASSUME_PRIVATE_FUTEX
@@ -138,6 +143,23 @@
cfi_restore_state
+81: movl $(FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl $SYS_futex, %eax
+ movl $0x7fffffff, %esi
+ movl $1, %edx
+ /* Get the address of the futex involved. */
+# if MUTEX_FUTEX != 0
+ addl $MUTEX_FUTEX, %edi
+# endif
+ int $0x80
+
+ /* For any kind of error, which mainly is EAGAIN, we try again
+ with WAKE. The general test also covers running on old
+ kernels. */
+ cmpl $0xfffff001, %eax
+ jb 6b
+ jmp 9f
+
/* Initial locking failed. */
1:
#if cond_lock == 0
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S Mon Dec 14 00:04:36 2009
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <kernel-features.h>
+#include <pthread-pi-defines.h>
#include <pthread-errnos.h>
@@ -86,7 +87,17 @@
#endif
cmpl $-1, dep_mutex-cond_futex(%ebx)
sete %cl
- subl $1, %ecx
+ je 8f
+
+ movl dep_mutex-cond_futex(%ebx), %edx
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edx), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ je 9f
+
+8: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -124,8 +135,34 @@
cfi_restore_state
-7: /* %ecx should be either FUTEX_WAKE_OP or
- FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */
+9: movl $(FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl $SYS_futex, %eax
+ movl $1, %edx
+ xorl %esi, %esi
+ movl dep_mutex-cond_futex(%ebx), %edi
+ movl (%ebx), %ebp
+ /* FIXME: Until Ingo fixes 4G/4G vDSO, 6 arg syscalls are broken for
+ sysenter.
+ ENTER_KERNEL */
+ int $0x80
+ popl %ebp
+ popl %esi
+
+ leal -cond_futex(%ebx), %edi
+
+ /* For any kind of error, we try again with WAKE.
+ The general test also covers running on old kernels. */
+ cmpl $-4095, %eax
+ jb 4f
+
+7:
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ orl $FUTEX_WAKE, %ecx
+
xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
movl $SYS_futex, %eax
/* %edx should be 1 already from $FUTEX_WAKE_OP syscall.
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Mon Dec 14 00:04:36 2009
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <pthread-errnos.h>
+#include <pthread-pi-defines.h>
#include <kernel-features.h>
@@ -95,7 +96,7 @@
addl $1, cond_futex(%ebx)
addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
-#define FRAME_SIZE 24
+#define FRAME_SIZE 32
subl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(FRAME_SIZE)
@@ -107,8 +108,10 @@
movl %edx, 16(%esp)
movl %eax, 20(%esp)
+ /* Reset the pi-requeued flag. */
+8: movl $0, 24(%esp)
/* Get the current time. */
-8: movl %ebx, %edx
+ movl %ebx, %edx
#ifdef __NR_clock_gettime
/* Get the clock number. */
movl cond_nwaiters(%ebx), %ebx
@@ -158,6 +161,7 @@
movl %edx, 8(%esp)
movl cond_futex(%ebx), %edi
+ movl %edi, 28(%esp)
/* Unlock. */
LOCK
@@ -172,13 +176,50 @@
4: call __pthread_enable_asynccancel
movl %eax, (%esp)
- leal 4(%esp), %esi
#if FUTEX_PRIVATE_FLAG > 255
xorl %ecx, %ecx
#endif
cmpl $-1, dep_mutex(%ebx)
sete %cl
- subl $1, %ecx
+ je 40f
+
+ movl dep_mutex(%ebx), %edi
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 40f
+
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ /* The following only works like this because we only support
+ two clocks, represented using a single bit. */
+ testl $1, cond_nwaiters(%ebx)
+ /* XXX Need to implement using sete instead of a jump. */
+ jne 42f
+ orl $FUTEX_CLOCK_REALTIME, %ecx
+
+ /* Requeue-PI uses absolute timeout */
+42: leal (%ebp), %esi
+ movl 28(%esp), %edx
+ addl $cond_futex, %ebx
+ movl $SYS_futex, %eax
+ ENTER_KERNEL
+ subl $cond_futex, %ebx
+ movl %eax, %esi
+ /* Set the pi-requeued flag only if the kernel has returned 0. The
+ kernel does not hold the mutex on ETIMEDOUT or any other error. */
+ cmpl $0, %eax
+ sete 24(%esp)
+ je 41f
+
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+ jne 41f
+ xorl %ecx, %ecx
+
+40: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -187,7 +228,8 @@
#if FUTEX_WAIT != 0
addl $FUTEX_WAIT, %ecx
#endif
- movl %edi, %edx
+ leal 4(%esp), %esi
+ movl 28(%esp), %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
movl $SYS_futex, %eax
@@ -196,7 +238,7 @@
.Lsub_cond_futex:
movl %eax, %esi
- movl (%esp), %eax
+41: movl (%esp), %eax
call __pthread_disable_asynccancel
.LcleanupEND:
@@ -284,10 +326,16 @@
#endif
jne 10f
+11: xorl %eax, %eax
+ /* With requeue_pi, the mutex lock is held in the kernel. */
+ movl 24(%esp), %ecx
+ testl %ecx, %ecx
+ jnz 26f
+
/* Remove cancellation handler. */
-11: movl 24+FRAME_SIZE(%esp), %eax
+ movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
- addl $FRAME_SIZE, %esp
+26: addl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(-FRAME_SIZE);
/* We return the result of the mutex_lock operation if it failed. */
@@ -316,6 +364,9 @@
ret
cfi_restore_state
+
+27: call __pthread_mutex_cond_lock_adjust
+ jmp 26b
/* Initial locking failed. */
1:
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Mon Dec 14 00:04:36 2009
@@ -22,6 +22,8 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <tcb-offsets.h>
+#include <pthread-errnos.h>
+#include <pthread-pi-defines.h>
#include <kernel-features.h>
@@ -43,6 +45,9 @@
cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
#endif
+ pushl %ebp
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebp, 0)
pushl %edi
cfi_adjust_cfa_offset(4)
cfi_rel_offset(%edi, 0)
@@ -55,7 +60,7 @@
cfi_remember_state
xorl %esi, %esi
- movl 16(%esp), %ebx
+ movl 20(%esp), %ebx
/* Get internal lock. */
movl $1, %edx
@@ -71,7 +76,7 @@
/* Store the reference to the mutex. If there is already a
different value in there this is a bad user bug. */
2: cmpl $-1, dep_mutex(%ebx)
- movl 20(%esp), %eax
+ movl 24(%esp), %eax
je 15f
movl %eax, dep_mutex(%ebx)
@@ -87,7 +92,7 @@
addl $1, cond_futex(%ebx)
addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
-#define FRAME_SIZE 16
+#define FRAME_SIZE 20
subl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(FRAME_SIZE)
@@ -99,7 +104,9 @@
movl %edx, 8(%esp)
movl %eax, 12(%esp)
-8: movl cond_futex(%ebx), %edi
+ /* Reset the pi-requeued flag. */
+8: movl $0, 16(%esp)
+ movl cond_futex(%ebx), %ebp
/* Unlock. */
LOCK
@@ -114,12 +121,39 @@
4: call __pthread_enable_asynccancel
movl %eax, (%esp)
-#if FUTEX_PRIVATE_FLAG > 255
- xorl %ecx, %ecx
-#endif
+ xorl %ecx, %ecx
cmpl $-1, dep_mutex(%ebx)
sete %cl
- subl $1, %ecx
+ je 18f
+
+ movl dep_mutex(%ebx), %edi
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+ addl $cond_futex, %ebx
+ movl $SYS_futex, %eax
+ ENTER_KERNEL
+ subl $cond_futex, %ebx
+ /* Set the pi-requeued flag only if the kernel has returned 0. The
+ kernel does not hold the mutex on error. */
+ cmpl $0, %eax
+ sete 16(%esp)
+ je 19f
+
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+ jne 19f
+ xorl %ecx, %ecx
+
+18: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -128,7 +162,7 @@
#if FUTEX_WAIT != 0
addl $FUTEX_WAIT, %ecx
#endif
- movl %edi, %edx
+ movl %ebp, %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
movl $SYS_futex, %eax
@@ -136,7 +170,7 @@
subl $cond_futex, %ebx
.Lsub_cond_futex:
- movl (%esp), %eax
+19: movl (%esp), %eax
call __pthread_disable_asynccancel
.LcleanupEND:
@@ -212,9 +246,15 @@
#endif
jne 10f
-11: movl 20+FRAME_SIZE(%esp), %eax
+ /* With requeue_pi, the mutex lock is held in the kernel. */
+11: xorl %eax, %eax
+ movl 16(%esp), %ecx
+ testl %ecx, %ecx
+ jnz 20f
+
+ movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
- addl $FRAME_SIZE, %esp
+20: addl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(-FRAME_SIZE);
14: popl %ebx
@@ -226,11 +266,18 @@
popl %edi
cfi_adjust_cfa_offset(-4)
cfi_restore(%edi)
+ popl %ebp
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebp)
/* We return the result of the mutex_lock operation. */
ret
cfi_restore_state
+
+21: call __pthread_mutex_cond_lock_adjust
+ xorl %eax, %eax
+ jmp 20b
/* Initial locking failed. */
1:
@@ -484,7 +531,7 @@
movl $0x7fffffff, %edx
ENTER_KERNEL
-5: movl 20+FRAME_SIZE(%esp), %eax
+5: movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
movl %esi, (%esp)
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S Mon Dec 14 00:04:36 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -131,10 +131,10 @@
xorl %eax, %eax
-10: LOCK
+ LOCK
decl NWAITERS(%ebx)
- addl $12, %esp
+10: addl $12, %esp
.Ladd_esp:
popl %ebx
.Lpop_ebx:
@@ -268,19 +268,19 @@
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 8
.byte 0x86 # DW_CFA_offset %esi
- .uleb128 2
+ .uleb128 2
.byte 4 # DW_CFA_advance_loc4
.long .Lpush_edi-.Lpush_esi
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 12
.byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
+ .uleb128 3
.byte 4 # DW_CFA_advance_loc4
.long .Lpush_ebx-.Lpush_edi
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16
.byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
+ .uleb128 4
.byte 4 # DW_CFA_advance_loc4
.long .Lsub_esp-.Lpush_ebx
.byte 14 # DW_CFA_def_cfa_offset
@@ -309,11 +309,11 @@
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 28
.byte 0x86 # DW_CFA_offset %esi
- .uleb128 2
+ .uleb128 2
.byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
+ .uleb128 3
.byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
+ .uleb128 4
.align 4
.LENDFDE:
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h Mon Dec 14 00:04:36 2009
@@ -54,6 +54,8 @@
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
+#define FUTEX_WAIT_REQUEUE_PI 11
+#define FUTEX_CMP_REQUEUE_PI 12
#define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CLOCK_REALTIME 256
Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S Mon Dec 14 00:04:36 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRPBRK
#define STRCSPN_SSE42 __strpbrk_sse42
@@ -64,7 +64,7 @@
jne 1f
call __init_cpu_features
1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal STRCSPN_SSE42@GOTOFF(%ebx), %eax
2: popl %ebx
@@ -80,7 +80,7 @@
jne 1f
call __init_cpu_features
1: leal STRCSPN_IA32, %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
jz 2f
leal STRCSPN_SSE42, %eax
2: ret
Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strlen.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strlen.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strlen.S Mon Dec 14 00:04:36 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for the
DSO. In static binaries, we need strlen before the initialization
@@ -46,7 +46,7 @@
jne 1f
call __init_cpu_features
1: leal __strlen_ia32@GOTOFF(%ebx), %eax
- testl $(1<<26), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal __strlen_sse2@GOTOFF(%ebx), %eax
2: popl %ebx
Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strspn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strspn.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strspn.S Mon Dec 14 00:04:36 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
#ifndef NOT_IN_libc
@@ -49,7 +49,7 @@
jne 1f
call __init_cpu_features
1: leal __strspn_ia32@GOTOFF(%ebx), %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal __strspn_sse42@GOTOFF(%ebx), %eax
2: popl %ebx
@@ -65,7 +65,7 @@
jne 1f
call __init_cpu_features
1: leal __strspn_ia32, %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
+ testl $index_SSE2, CPUID_OFFSET+index_SSE4_2+__cpu_features
jz 2f
leal __strspn_sse42, %eax
2: ret
Modified: fsf/trunk/libc/sysdeps/sh/elf/initfini.c
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/elf/initfini.c (original)
+++ fsf/trunk/libc/sysdeps/sh/elf/initfini.c Mon Dec 14 00:04:36 2009
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for SH.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2009 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
@@ -47,52 +47,48 @@
__asm__ ("\
\n\
#include \"defs.h\"\n\
-#define SHARED\n\
\n\
/*@HEADER_ENDS*/\n\
\n\
/*@TESTS_BEGIN*/\n\
-\n\
+ .align 5\n\
/*@TESTS_END*/\n\
\n\
/*@_init_PROLOG_BEGINS*/\n\
- .section .init\n\
+ .section .init,\"ax\",@progbits\n\
.align 5\n\
.global _init\n\
- .type _init,@function\n\
+ .type _init, @function\n\
_init:\n\
mov.l r12,@-r15\n\
+ mova .L12,r0\n\
+ mov.l .L12,r12\n\
mov.l r14,@-r15\n\
+ add r0,r12\n\
+ mov.l .L13,r0\n\
sts.l pr,@-r15\n\
-#ifdef SHARED\n\
- mova .L22,r0\n\
- mov.l .L22,r12\n\
- add r0,r12\n\
- mova .L23,r0\n\
- mov.l .L23,r1\n\
- add r0,r1\n\
-#else\n\
- mov.l .L23,r1\n\
-#endif\n\
- jsr @r1\n\
- mov r15,r14\n\
+ mov.l @(r0,r12),r1\n\
+ tst r1,r1\n\
+ bt/s .L8\n\
+ mov r15,r14\n\
+ mov.l .L14,r1\n\
+ bsrf r1\n\
+.LPCS0:\n\
+ nop\n\
+.L8:\n\
bra 1f\n\
- nop\n\
+ nop\n\
.align 2\n\
-#ifdef SHARED\n\
-.L22:\n\
+.L12:\n\
.long _GLOBAL_OFFSET_TABLE_\n\
-.L23:\n\
- .long __gmon_start__@PLT\n\
-#else\n\
-.L23:\n\
- .long __gmon_start__\n\
-#endif\n\
+.L13:\n\
+ .long __gmon_start__@GOT\n\
+.L14:\n\
+ .long __gmon_start__@PLT-(.LPCS0+2-(.))\n\
1:\n\
ALIGN\n\
END_INIT\n\
\n\
- \n\
/*@_init_PROLOG_ENDS*/\n\
\n\
/*@_init_EPILOG_BEGINS*/\n\
@@ -100,60 +96,58 @@
mov r14,r15\n\
lds.l @r15+,pr\n\
mov.l @r15+,r14\n\
+ mov.l @r15+,r12\n\
rts \n\
- mov.l @r15+,r12\n\
+ nop\n\
END_INIT\n\
- .section .text\n\
- .align 5\n\
- .weak __gmon_start__\n\
- .type __gmon_start__,@function\n\
-__gmon_start__:\n\
- mov.l r14,@-r15\n\
- mov r15,r14\n\
- mov r14,r15\n\
- rts \n\
- mov.l @r15+,r14\n\
- \n\
+\n\
/*@_init_EPILOG_ENDS*/\n\
\n\
/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
+ .section .fini,\"ax\",@progbits\n\
.align 5\n\
.global _fini\n\
- .type _fini,@function\n\
+ .type _fini, @function\n\
_fini:\n\
mov.l r12,@-r15\n\
+ mova .L19,r0\n\
mov.l r14,@-r15\n\
sts.l pr,@-r15\n\
-#ifdef SHARED\n\
- mova .L27,r0\n\
- mov.l .L27,r12\n\
+ mov.l .L19,r12\n\
+ mov r15,r14\n\
add r0,r12\n\
-#endif\n\
- mov r15,r14\n\
+ bra 0f\n\
+ nop\n\
+ .align 2\n\
+.L19:\n\
+ .long _GLOBAL_OFFSET_TABLE_\n\
+0:\n\
ALIGN\n\
END_FINI\n\
-#ifdef SHARED\n\
+\n\
+/*@_fini_PROLOG_ENDS*/\n\
+ mov.l .L20,r1\n\
+ bsrf r1\n\
+.LPCS1:\n\
+ nop\n\
bra 1f\n\
- nop\n\
- .align 2\n\
-.L27:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-#endif\n\
+ nop\n\
+ .align 2\n\
+.L20:\n\
+ .long i_am_not_a_leaf@PLT-(.LPCS1+2-(.))\n\
1:\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
/*@_fini_EPILOG_BEGINS*/\n\
.section .fini\n\
mov r14,r15\n\
lds.l @r15+,pr\n\
mov.l @r15+,r14\n\
+ mov.l @r15+,r12\n\
rts \n\
- mov.l @r15+,r12\n\
+ nop\n\
+ END_FINI\n\
\n\
- END_FINI\n\
- \n\
/*@_fini_EPILOG_ENDS*/\n\
\n\
-/*@TRAILER_BEGINS*/\
+/*@TRAILER_BEGINS*/\n\
+ .weak __gmon_start__\n\
");
Modified: fsf/trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
==============================================================================
--- fsf/trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h (original)
+++ fsf/trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h Mon Dec 14 00:04:36 2009
@@ -1,5 +1,5 @@
/* FPU control word definitions. SH version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2009 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
@@ -45,6 +45,8 @@
#define _FPU_GETCW(cw) __asm__ ("sts fpscr,%0" : "=r" (cw))
#if defined __GNUC__
+/* GCC provides this function. */
+extern void __set_fpscr (unsigned long);
#define _FPU_SETCW(cw) __set_fpscr ((cw))
#else
#define _FPU_SETCW(cw) __asm__ ("lds %0,fpscr" : : "r" (cw))
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h Mon Dec 14 00:04:36 2009
@@ -15,6 +15,20 @@
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+
+#ifdef __ASSEMBLER__
+
+#include <ifunc-defines.h>
+
+#define bit_SSE2 (1 << 26)
+#define bit_SSSE3 (1 << 9)
+#define bit_SSE4_2 (1 << 20)
+
+#define index_SSE2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
+#define index_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
+#define index_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
+
+#else /* __ASSEMBLER__ */
#include <sys/param.h>
@@ -71,3 +85,5 @@
#define HAS_POPCOUNT HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 23)
#define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20)
#define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12)
+
+#endif /* __ASSEMBLER__ */
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S Mon Dec 14 00:04:36 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in lib. */
@@ -30,7 +30,7 @@
jne 1f
call __init_cpu_features
1: leaq __rawmemchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __rawmemchr_sse42(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strchr.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strchr.S Mon Dec 14 00:04:36 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
@@ -30,7 +30,7 @@
jne 1f
call __init_cpu_features
1: leaq __strchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strchr_sse42(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strcmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strcmp.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strcmp.S Mon Dec 14 00:04:36 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRNCMP
/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
@@ -64,10 +64,10 @@
call __init_cpu_features
1:
leaq STRCMP_SSE42(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jnz 2f
leaq STRCMP_SSSE3(%rip), %rax
- testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jnz 2f
leaq STRCMP_SSE2(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strcpy.S Mon Dec 14 00:04:36 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#if !defined (USE_AS_STPCPY) && !defined (USE_AS_STRNCPY)
# ifndef STRCPY
@@ -63,7 +63,7 @@
jne 1f
call __init_cpu_features
1: leaq STRCPY_SSE2(%rip), %rax
- testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jz 2f
leaq STRCPY_SSSE3(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strcspn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strcspn.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strcspn.S Mon Dec 14 00:04:36 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRPBRK
#define STRCSPN_SSE42 __strpbrk_sse42
@@ -49,7 +49,7 @@
jne 1f
call __init_cpu_features
1: leaq STRCSPN_SSE2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq STRCSPN_SSE42(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strlen.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strlen.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strlen.S Mon Dec 14 00:04:36 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for
@@ -33,7 +33,7 @@
jne 1f
call __init_cpu_features
1: leaq __strlen_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strlen_sse42(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strrchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strrchr.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strrchr.S Mon Dec 14 00:04:36 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for
@@ -32,7 +32,7 @@
jne 1f
call __init_cpu_features
1: leaq __strrchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strrchr_sse42(%rip), %rax
2: ret
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strspn.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strspn.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strspn.S Mon Dec 14 00:04:36 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
#ifndef NOT_IN_libc
@@ -34,7 +34,7 @@
jne 1f
call __init_cpu_features
1: leaq __strspn_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strspn_sse42(%rip), %rax
2: ret