diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S | 26 |
1 files changed, 15 insertions, 11 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 aadc90c974..b44660418a 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 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -90,13 +90,13 @@ pthread_rwlock_timedrdlock: /* Get current time. */ 11: movq %rsp, %rdi - xorq %rsi, %rsi + xorl %esi, %esi movq $VSYSCALL_ADDR_vgettimeofday, %rax callq *%rax /* Compute relative timeout. */ movq 8(%rsp), %rax - movq $1000, %rdi + movl $1000, %edi mul %rdi /* Milli seconds to nano seconds. */ movq (%r13), %rcx movq 8(%r13), %rdi @@ -112,11 +112,15 @@ pthread_rwlock_timedrdlock: movq %rcx, (%rsp) /* Store relative timeout. */ movq %rdi, 8(%rsp) - xorq %rsi, %rsi /* movq $FUTEX_WAIT, %rsi */ +#if FUTEX_WAIT == 0 + xorl %esi, %esi +#else + movl $FUTEX_WAIT, %esi +#endif movq %rsp, %r10 movl %r14d, %edx leaq READERS_WAKEUP(%r12), %rdi - movq $SYS_futex, %rax + movl $SYS_futex, %eax syscall movq %rax, %rdx 17: @@ -136,11 +140,11 @@ pthread_rwlock_timedrdlock: cmpq $-ETIMEDOUT, %rdx jne 2b -18: movq $ETIMEDOUT, %rdx +18: movl $ETIMEDOUT, %edx jmp 9f -5: xorq %rdx, %rdx +5: xorl %edx, %edx incl NR_READERS(%r12) je 8f 9: LOCK @@ -168,7 +172,7 @@ pthread_rwlock_timedrdlock: 14: cmpl %fs:TID, %eax jne 3b - movq $EDEADLK, %rdx + movl $EDEADLK, %edx jmp 9b 6: @@ -182,12 +186,12 @@ pthread_rwlock_timedrdlock: /* Overflow. */ 8: decl NR_READERS(%r12) - movq $EAGAIN, %rdx + movl $EAGAIN, %edx jmp 9b /* Overflow. */ 4: decl READERS_QUEUED(%r12) - movq $EAGAIN, %rdx + movl $EAGAIN, %edx jmp 9b 10: @@ -211,6 +215,6 @@ pthread_rwlock_timedrdlock: 16: movq $-ETIMEDOUT, %rdx jmp 17b -19: movq $EINVAL, %rdx +19: movl $EINVAL, %edx jmp 9b .size pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock |