diff options
Diffstat (limited to 'nptl/sysdeps/unix')
5 files changed, 26 insertions, 34 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S index 763c14b08f..c61c697985 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S @@ -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 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S index a6d3db5302..c6a584fed0 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S @@ -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 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S index 6c6e2faf50..5e9faf93fb 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S @@ -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 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S index 122ac7646e..35c40c2c1c 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S @@ -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 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S index 9083419a4b..88044c040b 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S @@ -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 |