From c3db953c165baa444d01ee6c04ef0c51eba42522 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Jul 2009 08:39:47 -0700 Subject: Minor optimizations of last x86-64 condvar changes. --- nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S') 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 f81466e1a5..e12790cb96 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 -- cgit 1.4.1