about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-02 07:12:51 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-02 07:12:51 +0000
commitfd8979e483df0871606889a02bf3a97f3c01eac8 (patch)
treebdbb885e2ed3a192589bc19743c631e192f3076d /nptl
parent6ff19c81254d30f4314e44fc32ed3e1f11534b59 (diff)
downloadglibc-fd8979e483df0871606889a02bf3a97f3c01eac8.tar.gz
glibc-fd8979e483df0871606889a02bf3a97f3c01eac8.tar.xz
glibc-fd8979e483df0871606889a02bf3a97f3c01eac8.zip
Update.
2003-01-01  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
	unnecessary zero offset when addressing MUTEX.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S72
2 files changed, 77 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index e61e8b5a13..764ab23cd9 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2003-01-01  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
+	unnecessary zero offset when addressing MUTEX.
+
 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S
index 4e021dca29..72df31b40b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S
@@ -61,7 +61,11 @@ __pthread_rwlock_rdlock:
 	/* Get the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebx)
+#else
 	xaddl	%eax, MUTEX(%ebx)
+#endif
 	testl	%eax, %eax
 	jne	1f
 
@@ -77,7 +81,11 @@ __pthread_rwlock_rdlock:
 	je	4f
 
 	LOCK
+#if MUTEX == 0
+	decl	(%ebx)
+#else
 	decl	MUTEX(%ebx)
+#endif
 	jne	10f
 
 11:	addl	$READERS_WAKEUP-MUTEX, %ebx
@@ -90,7 +98,11 @@ __pthread_rwlock_rdlock:
 	/* Reget the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebx)
+#else
 	xaddl	%eax, MUTEX(%ebx)
+#endif
 	testl	%eax, %eax
 	jne	12f
 
@@ -103,7 +115,11 @@ __pthread_rwlock_rdlock:
 	incl	NR_READERS(%ebx)
 	je	8f
 9:	LOCK
+#if MUTEX == 0
+	decl	(%ebx)
+#else
 	decl	MUTEX(%ebx)
+#endif
 	jne	6f
 7:
 
@@ -165,7 +181,11 @@ pthread_rwlock_timedrdlock:
 	/* Get the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebp)
+#else
 	xaddl	%eax, MUTEX(%ebp)
+#endif
 	testl	%eax, %eax
 	jne	1f
 
@@ -181,7 +201,11 @@ pthread_rwlock_timedrdlock:
 	je	4f
 
 	LOCK
+#if MUTEX == 0
+	decl	(%ebp)
+#else
 	decl	MUTEX(%ebp)
+#endif
 	jne	10f
 
 	/* Get current time.  */
@@ -219,7 +243,11 @@ pthread_rwlock_timedrdlock:
 	/* Reget the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebp)
+#else
 	xaddl	%eax, MUTEX(%ebp)
+#endif
 	testl	%eax, %eax
 	jne	12f
 
@@ -235,7 +263,11 @@ pthread_rwlock_timedrdlock:
 	incl	NR_READERS(%ebp)
 	je	8f
 9:	LOCK
+#if MUTEX == 0
+	decl	(%ebp)
+#else
 	decl	MUTEX(%ebp)
+#endif
 	jne	6f
 
 7:	movl	%ecx, %eax
@@ -300,7 +332,11 @@ __pthread_rwlock_wrlock:
 	/* Get the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebx)
+#else
 	xaddl	%eax, MUTEX(%ebx)
+#endif
 	testl	%eax, %eax
 	jne	1f
 
@@ -314,7 +350,11 @@ __pthread_rwlock_wrlock:
 	je	4f
 
 	LOCK
+#if MUTEX == 0
+	decl	(%ebx)
+#else
 	decl	MUTEX(%ebx)
+#endif
 	jne	10f
 
 11:	addl	$WRITERS_WAKEUP-MUTEX, %ebx
@@ -327,7 +367,11 @@ __pthread_rwlock_wrlock:
 	/* Reget the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebx)
+#else
 	xaddl	%eax, MUTEX(%ebx)
+#endif
 	testl	%eax, %eax
 	jne	12f
 
@@ -339,7 +383,11 @@ __pthread_rwlock_wrlock:
 	movl	%gs:8, %eax
 	movl	%eax, WRITER(%ebx)
 9:	LOCK
+#if MUTEX == 0
+	decl	(%ebx)
+#else
 	decl	MUTEX(%ebx)
+#endif
 	jne	6f
 7:
 
@@ -394,7 +442,11 @@ pthread_rwlock_timedwrlock:
 	/* Get the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebp)
+#else
 	xaddl	%eax, MUTEX(%ebp)
+#endif
 	testl	%eax, %eax
 	jne	1f
 
@@ -408,7 +460,11 @@ pthread_rwlock_timedwrlock:
 	je	4f
 
 	LOCK
+#if MUTEX == 0
+	decl	(%ebp)
+#else
 	decl	MUTEX(%ebp)
+#endif
 	jne	10f
 
 	/* Get current time.  */
@@ -446,7 +502,11 @@ pthread_rwlock_timedwrlock:
 	/* Reget the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%ebp)
+#else
 	xaddl	%eax, MUTEX(%ebp)
+#endif
 	testl	%eax, %eax
 	jne	12f
 
@@ -461,7 +521,11 @@ pthread_rwlock_timedwrlock:
 	movl	%gs:8, %eax
 	movl	%eax, WRITER(%ebp)
 9:	LOCK
+#if MUTEX == 0
+	decl	(%ebp)
+#else
 	decl	MUTEX(%ebp)
+#endif
 	jne	6f
 
 7:	movl	%ecx, %eax
@@ -521,7 +585,11 @@ __pthread_rwlock_unlock:
 	/* Get the lock.  */
 	movl	$1, %eax
 	LOCK
+#if MUTEX == 0
+	xaddl	%eax, (%edi)
+#else
 	xaddl	%eax, MUTEX(%edi)
+#endif
 	testl	%eax, %eax
 	jne	1f
 
@@ -550,7 +618,11 @@ __pthread_rwlock_unlock:
 	ENTER_KERNEL
 
 6:	LOCK
+#if MUTEX == 0
+	decl	(%edi)
+#else
 	decl	MUTEX(%edi)
+#endif
 	jne	3f
 
 4:	xorl	%eax, %eax