about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S12
1 files changed, 3 insertions, 9 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 3c56daecf5..2c918d7622 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -51,24 +51,18 @@ __lll_mutex_lock_wait:
 	movq	%r10, %rsi	/* movq $FUTEX_WAIT, %rsi */
 
 	cmpl	%edx, %eax	/* NB:	 %edx == 2 */
-	je	1f
-
-	movl	%edx, %eax
-	xchgl	%eax, (%rdi)	/* NB:	 lock is implied */
-
-	testl	%eax, %eax
-	je	2f
+	jne	2f
 
 1:	movq	$SYS_futex, %rax
 	syscall
 
-	movl	%edx, %eax
+2:	movl	%edx, %eax
 	xchgl	%eax, (%rdi)	/* NB:	 lock is implied */
 
 	testl	%eax, %eax
 	jnz	1b
 
-2:	popq	%rdx
+	popq	%rdx
 	popq	%r10
 	retq
 	.size	__lll_mutex_lock_wait,.-__lll_mutex_lock_wait