about summary refs log tree commit diff
path: root/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/i386/i486/pthread_spin_trylock.S')
-rw-r--r--nptl/sysdeps/i386/i486/pthread_spin_trylock.S11
1 files changed, 5 insertions, 6 deletions
diff --git a/nptl/sysdeps/i386/i486/pthread_spin_trylock.S b/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
index abda929c81..0a27312c72 100644
--- a/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
+++ b/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -35,13 +35,12 @@ pthread_spin_trylock:
 	xorl	%ecx, %ecx
 	LOCK
 	cmpxchgl %ecx, (%edx)
-	movl	$EBUSY, %edx
-	movl	%ecx, %eax
+	movl	$EBUSY, %eax
 #ifdef HAVE_CMOV
-	cmovnel	%edx, %eax
+	cmovel	%ecx, %eax
 #else
-	je	0f
-	movl	%edx, %eax
+	jne	0f
+	movl	%ecx, %eax
 0:
 #endif
 	ret