diff options
Diffstat (limited to 'nptl/sysdeps/unix')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S | 11 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S | 7 |
2 files changed, 12 insertions, 6 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S index fd04e116c7..b522f3c07e 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S @@ -45,6 +45,7 @@ pthread_rwlock_timedrdlock: pushq %r12 pushq %r13 + pushq %r14 subq $16, %rsp movq %rdi, %r12 @@ -76,14 +77,14 @@ pthread_rwlock_timedrdlock: incl READERS_QUEUED(%r12) je 4f - movl READERS_WAKEUP(%r12), %edx + movl READERS_WAKEUP(%r12), %r14d /* Unlock. */ LOCK #if MUTEX == 0 - subl $1, (%r12) + decl (%r12) #else - subl $1, MUTEX(%r12) + decl MUTEX(%r12) #endif jne 10f @@ -112,7 +113,8 @@ pthread_rwlock_timedrdlock: movq %rdi, 8(%rsp) xorq %rsi, %rsi /* movq $FUTEX_WAIT, %rsi */ - xorq %r10, %r10 + movq %rsp, %r10 + movl %r14d, %edx leaq READERS_WAKEUP(%r12), %rdi movq $SYS_futex, %rax syscall @@ -152,6 +154,7 @@ pthread_rwlock_timedrdlock: 7: movq %rdx, %rax addq $16, %rsp + popq %r14 popq %r13 popq %r12 retq diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S index 75c6cc42b4..6cbadabb07 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S @@ -44,6 +44,7 @@ pthread_rwlock_timedwrlock: pushq %r12 pushq %r13 + pushq %r14 subq $16, %rsp movq %rdi, %r12 @@ -73,7 +74,7 @@ pthread_rwlock_timedwrlock: incl WRITERS_QUEUED(%r12) je 4f - movl WRITERS_WAKEUP(%r12), %edx + movl WRITERS_WAKEUP(%r12), %r14d LOCK #if MUTEX == 0 @@ -109,6 +110,7 @@ pthread_rwlock_timedwrlock: xorq %rsi, %rsi /* movq $FUTEX_WAIT, %rsi */ movq %rsp, %r10 + movl %r14d, %edx leaq WRITERS_WAKEUP(%r12), %rdi movq $SYS_futex, %rax syscall @@ -134,7 +136,7 @@ pthread_rwlock_timedwrlock: jmp 9f -5: xorq %rcx, %rdx +5: xorq %rdx, %rdx movq %fs:SELF, %rax movq %rax, WRITER(%r12) 9: LOCK @@ -148,6 +150,7 @@ pthread_rwlock_timedwrlock: 7: movq %rdx, %rax addq $16, %rsp + popq %r14 popq %r13 popq %r12 retq |