This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.10-182-gc3db953


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  c3db953c165baa444d01ee6c04ef0c51eba42522 (commit)
      from  42e69bcf1137fccfd7a95645a9d316c6490b9ff9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3db953c165baa444d01ee6c04ef0c51eba42522

commit c3db953c165baa444d01ee6c04ef0c51eba42522
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Mon Jul 20 08:39:47 2009 -0700

    Minor optimizations of last x86-64 condvar changes.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c747be4..2f0b8d8 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-20  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
+	optimizations of last changes.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+
 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index f81466e..e12790c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -160,16 +160,14 @@ __pthread_cond_timedwait:
 	movq	8(%rsp), %rdi
 
 	movq	%r13, %r10
+	movl	$FUTEX_WAIT_BITSET, %esi
 	cmpq	$-1, dep_mutex(%rdi)
-	movl	$FUTEX_WAIT_BITSET, %eax
-	movl	$(FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG), %esi
-	cmove	%eax, %esi
 	je	60f
 
 	movq	dep_mutex(%rdi), %r8
 	/* Requeue to a PI mutex if the PI bit is set.  */
 	testl	$PI_BIT, MUTEX_KIND(%r8)
-	je	60f
+	je	61f
 
 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
 	xorl	%eax, %eax
@@ -191,10 +189,10 @@ __pthread_cond_timedwait:
 	cmpq	$-4095, %rax
 	jnae	62f
 
-	movl	$(FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG), %esi
 	subq	$cond_futex, %rdi
 #endif
 
+61:	movl	$(FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG), %esi
 60:	xorl	%r15d, %r15d
 	xorl	%eax, %eax
 	/* The following only works like this because we only support
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index e6323ea..2fab38e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -128,28 +128,15 @@ __pthread_cond_wait:
 	movq	8(%rsp), %rdi
 	xorq	%r10, %r10
 	movq	%r12, %rdx
-	// XXX reverse + lea
-	addq	$cond_futex, %rdi
-	cmpq	$-1, dep_mutex-cond_futex(%rdi)
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_WAIT, %eax
-	movl	$(FUTEX_WAIT|FUTEX_PRIVATE_FLAG), %esi
-	cmove	%eax, %esi
-#else
-	movl	$0, %eax
-	movl	%fs:PRIVATE_FUTEX, %esi
-	cmove	%eax, %esi
-# if FUTEX_WAIT != 0
-#  error "cc destroyed by following orl"
-	orl	$FUTEX_WAIT, %esi
-# endif
-#endif
+	cmpq	$-1, dep_mutex(%rdi)
+	leaq	cond_futex(%rdi), %rdi
+	movl	$FUTEX_WAIT, %esi
 	je	60f
 
 	movq	dep_mutex-cond_futex(%rdi), %r8
 	/* Requeue to a PI mutex if the PI bit is set.  */
 	testl	$PI_BIT, MUTEX_KIND(%r8)
-	je	60f
+	je	61f
 
 	movl	$(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
 	movl	$SYS_futex, %eax
@@ -162,9 +149,17 @@ __pthread_cond_wait:
 	cmpq	$-4095, %rax
 	jnae	62f
 
-	movl	$(FUTEX_WAIT|FUTEX_PRIVATE_FLAG), %esi
+# ifndef __ASSUME_PRIVATE_FUTEX
+	movl	$FUTEX_WAIT, %esi
+# endif
 #endif
 
+61:
+#ifdef __ASSUME_PRIVATE_FUTEX
+	movl	$(FUTEX_WAIT|FUTEX_PRIVATE_FLAG), %esi
+#else
+	orl	%fs:PRIVATE_FUTEX, %esi
+#endif
 60:	xorl	%r13d, %r13d
 	movl	$SYS_futex, %eax
 	syscall

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog                                     |    6 ++++
 .../sysv/linux/x86_64/pthread_cond_timedwait.S     |    8 ++---
 .../unix/sysv/linux/x86_64/pthread_cond_wait.S     |   31 ++++++++-----------
 3 files changed, 22 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]