aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S13
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S14
4 files changed, 17 insertions, 14 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
index d4fb50ac5b..484beafca9 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
@@ -88,10 +88,10 @@ __lll_mutex_timedlock_wait:
movl %ecx, %ebp
movl %edx, %edi
- leal 1(%eax), %esi
+
+1: leal 1(%eax), %esi
/* Get current time. */
-1:
movl %esp, %ebx
xorl %ecx, %ecx
movl $SYS_gettimeofday, %eax
@@ -120,11 +120,12 @@ __lll_mutex_timedlock_wait:
movl %ebp, %ebx
movl $SYS_futex, %eax
ENTER_KERNEL
+ movl %eax, %ecx
- movl $1, %esi
+ movl $1, %eax
LOCK
- xaddl %esi, (%ebx)
- testl %esi, %esi
+ xaddl %eax, (%ebx)
+ testl %eax, %eax
jne 7f
movl $2, (%ebx)
@@ -138,7 +139,7 @@ __lll_mutex_timedlock_wait:
ret
/* Check whether the time expired. */
-7: cmpl $-ETIMEDOUT, %eax
+7: cmpl $-ETIMEDOUT, %ecx
je 5f
jmp 1b
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 755bb25896..aff449b13a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -58,7 +58,7 @@ __lll_lock_wait:
orl $-1, %esi /* Load -1. */
LOCK
xaddl %esi, (%rdi)
- jne,pn 1b
+ jne 1b
movl $-1, (%rdi)
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index ef3867bfb9..7d5df9521a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -92,7 +92,7 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden;
"jmp 2f\n\t" \
".previous\n" \
"2:" \
- : "=S" (result), "=&D" (ignore1), "=&a" (ignore2), \
+ : "=a" (result), "=&D" (ignore1), "=&S" (ignore2), \
"=&d" (ignore3), "=m" (futex) \
: "0" (1), "4" (futex), "m" (timeout) \
: "memory", "cx", "cc", "r10"); \
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
index e189dc1266..1b2731a29e 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
@@ -87,10 +87,11 @@ __lll_mutex_timedlock_wait:
movq %rdi, %r12
movq %rdx, %r13
- leaq 1(%rsi), %r14
+
+1: leaq 1(%rax), %r14
/* Get current time. */
-1: movq %rsp, %rdi
+ movq %rsp, %rdi
xorq %rsi, %rsi
movq $VSYSCALL_ADDR_vgettimeofday, %rax
/* This is a regular function call, all calleer-save registers
@@ -121,11 +122,12 @@ __lll_mutex_timedlock_wait:
movq %r12, %rdi
movq $SYS_futex, %rax
syscall
+ movq %rax, %rcx
- movl $1, %r14d
+ movl $1, %eax
LOCK
- xaddl %r14d, (%rdi)
- testl %r14d, %r14d
+ xaddl %eax, (%rdi)
+ testl %eax, %eax
jne 7f
movl $2, (%rdi)
@@ -138,7 +140,7 @@ __lll_mutex_timedlock_wait:
retq
/* Check whether the time expired. */
-7: cmpq $-ETIMEDOUT, %rax
+7: cmpq $-ETIMEDOUT, %rcx
je 5f
jmp 1b