aboutsummaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-29 01:24:20 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-29 01:24:20 +0000
commitdd731d53dcdbb24cd2a3f299a2ba4362505d3f55 (patch)
tree9db2cc09616d8073cc8c2888036e01cc60970d5b /nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
parent10e717a20778341a2e8c7d11e3cb1cc90e943602 (diff)
downloadglibc-dd731d53dcdbb24cd2a3f299a2ba4362505d3f55.tar
glibc-dd731d53dcdbb24cd2a3f299a2ba4362505d3f55.tar.gz
glibc-dd731d53dcdbb24cd2a3f299a2ba4362505d3f55.tar.bz2
glibc-dd731d53dcdbb24cd2a3f299a2ba4362505d3f55.zip
Update.
2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/sh/bits/atomic.h (__arch_compare_and_exchange_val_8_acq): Return old value. Make asm output reg constraint earlyclobber. Renamed from... (__arch_compare_and_exchange_8_acq): ... this. (__arch_compare_and_exchange_val_16_acq): Return old value. Make asm output reg constraint earlyclobber. Renamed from... (__arch_compare_and_exchange_16_acq): ... this. (__arch_compare_and_exchange_val_32_acq): Return old value. Make asm output reg constraint earlyclobber. Renamed from... (__arch_compare_and_exchange_32_acq): ... this. (__arch_compare_and_exchange_val_64_acq): Renamed from... (__arch_compare_and_exchange_64_acq): ... this. (atomic_exchange_and_add): Use local variables and __arch_compare_and_exchange_val_64_acq. (atomic_add): Likewise. (atomic_add_negative, atomic_add_zero): Use local variables. * Makefile: Remove libmd5crypt goal.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S b/nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
index 6df513cbec..0aa2048d11 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
@@ -73,12 +73,13 @@ __lll_mutex_timedlock_wait:
mov r5, r8
mov r6, r9
mov r4, r10
- add #1, r10
/* Stack frame for the timespec and timeval structs. */
add #-8, r15
1:
+ add #1, r10
+
/* Get current time. */
mov r15, r4
mov #0, r5
@@ -116,10 +117,11 @@ __lll_mutex_timedlock_wait:
extu.b r3, r3
trapa #0x14
SYSCALL_INST_PAD
+ mov r0, r4
- mov #1, r3
- XADD (r3, @r8, r10)
- tst r10, r10
+ mov #1, r10
+ XADD (r10, @r8, r3)
+ tst r3, r3
bf 7f
mov #2, r1
@@ -134,7 +136,7 @@ __lll_mutex_timedlock_wait:
7:
/* Check whether the time expired. */
mov #-ETIMEDOUT, r1
- cmp/eq r0, r1
+ cmp/eq r4, r1
bt 5f
bra 1b
nop