Forgot to adjust code for using byte fields for flags and shared.
authordrepper <drepper>
Sun, 27 May 2007 19:19:42 +0000 (19:19 +0000)
committerdrepper <drepper>
Sun, 27 May 2007 19:19:42 +0000 (19:19 +0000)
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S

index 763c14b..c61c697 100644 (file)
@@ -61,7 +61,7 @@ __pthread_rwlock_rdlock:
        jne     14f
        cmpl    $0, WRITERS_QUEUED(%ebx)
        je      5f
-       cmpl    $0, FLAGS(%ebx)
+       cmpb    $0, FLAGS(%ebx)
        je      5f
 
 3:     addl    $1, READERS_QUEUED(%ebx)
@@ -79,14 +79,12 @@ __pthread_rwlock_rdlock:
 
 11:
 #if __ASSUME_PRIVATE_FUTEX
-       movl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-       xorl    PSHARED(%ebx), %ecx
+       movzbl  PSHARED(%ebx), %ecx
+       xorl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
 #else
-# if FUTEX_WAIT == 0
-       movl    PSHARED(%ebx), %ecx
-# else
-       movl    $FUTEX_WAIT, %ecx
-       orl     PSHARED(%ebx), %ecx
+       movzbl  PSHARED(%ebx), %ecx
+# if FUTEX_WAIT != 0
+       orl     $FUTEX_WAIT, %ecx
 # endif
        xorl    %gs:PRIVATE_FUTEX, %ecx
 #endif
index a6d3db5..c6a584f 100644 (file)
@@ -65,7 +65,7 @@ pthread_rwlock_timedrdlock:
        jne     14f
        cmpl    $0, WRITERS_QUEUED(%ebp)
        je      5f
-       cmpl    $0, FLAGS(%ebp)
+       cmpb    $0, FLAGS(%ebp)
        je      5f
 
        /* Check the value of the timeout parameter.  */
@@ -111,14 +111,12 @@ pthread_rwlock_timedrdlock:
 
        movl    %esi, %edx
 #if __ASSUME_PRIVATE_FUTEX
-       movl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-       xorl    PSHARED(%ebp), %ecx
+       movzbl  PSHARED(%ebp), %ecx
+       xorl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
 #else
-# if FUTEX_WAIT == 0
-       movl    PSHARED(%ebp), %ecx
-# else
-       movl    $FUTEX_WAIT, %ecx
-       orl     PSHARED(%ebp), %ecx
+       movzbl  PSHARED(%ebp), %ecx
+# if FUTEX_WAIT != 0
+       orl     $FUTEX_WAIT, %ecx
 # endif
        xorl    %gs:PRIVATE_FUTEX, %ecx
 #endif
index 6c6e2fa..5e9faf9 100644 (file)
@@ -109,14 +109,12 @@ pthread_rwlock_timedwrlock:
 
        movl    %esi, %edx
 #if __ASSUME_PRIVATE_FUTEX
-       movl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-       xorl    PSHARED(%ebp), %ecx
+       movzbl  PSHARED(%ebp), %ecx
+       xorl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
 #else
-# if FUTEX_WAIT == 0
-       movl    PSHARED(%ebp), %ecx
-# else
-       movl    $FUTEX_WAIT, %ecx
-       orl     PSHARED(%ebp), %ecx
+       movzbl  PSHARED(%ebp), %ecx
+# if FUTEX_WAIT != 0
+       orl     $FUTEX_WAIT, %ecx
 # endif
        xorl    %gs:PRIVATE_FUTEX, %ecx
 #endif
index 122ac76..35c40c2 100644 (file)
@@ -84,11 +84,11 @@ __pthread_rwlock_unlock:
 
 8:
 #if __ASSUME_PRIVATE_FUTEX
-       movl    $FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
-       xorl    PSHARED(%edi), %ecx
+       movzbl  PSHARED(%edi), %ecx
+       xorl    $FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
 #else
-       movl    $FUTEX_WAKE, %ecx
-       orl     PSHARED(%edi), %ecx
+       movzbl  PSHARED(%edi), %ecx
+       orl     $FUTEX_WAKE, %ecx
        xorl    %gs:PRIVATE_FUTEX, %ecx
 #endif
        movl    $SYS_futex, %eax
index 9083419..88044c0 100644 (file)
@@ -77,14 +77,12 @@ __pthread_rwlock_wrlock:
 
 11:
 #if __ASSUME_PRIVATE_FUTEX
-       movl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-       xorl    PSHARED(%ebx), %ecx
+       movzbl  PSHARED(%ebx), %ecx
+       xorl    $FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
 #else
-# if FUTEX_WAIT == 0
-       movl    PSHARED(%ebx), %ecx
-# else
-       movl    $FUTEX_WAIT, %ecx
-       orl     PSHARED(%ebx), %ecx
+       movzbl  PSHARED(%ebx), %ecx
+# if FUTEX_WAIT != 0
+       orl     $FUTEX_WAIT, %ecx
 # endif
        xorl    %gs:PRIVATE_FUTEX, %ecx
 #endif