summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-17 04:49:21 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-17 04:49:21 +0000
commitfb2ee178fa1e50dd1ec4b8ff5300f13afbbb1dd9 (patch)
treed483936a63e0a3fde1f5f1611a2384ad398852b8 /nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
parent796038f86356116c705903edf2752e978ea3f6b0 (diff)
Load correct registers.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 7d5df9521a..c593f6ac66 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -157,7 +157,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
__asm __volatile (LOCK_INSTR "xaddl %0, %2\n\t" \
"jne 1f\n\t" \
".subsection 1\n" \
- "1:\tleaq %2, %%rsi\n\t" \
+ "1:\tleaq %2, %%rdi\n\t" \
"subq $128, %%rsp\n\t" \
"callq __lll_lock_wait\n\t" \
"addq $128, %%rsp\n\t" \
@@ -171,7 +171,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
# define lll_unlock(futex) \
(void) ({ int ignore; \
- __asm __volatile (LOCK_INSTR "addl $1,%0\n\t" \
+ __asm __volatile (LOCK_INSTR "incl %0\n\t" \
"jng 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %0, %%rdi\n\t" \
@@ -210,14 +210,14 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
"0:\txaddl %0, %2\n\t" \
"jne 1f\n\t" \
".subsection 1\n" \
- "1:\tleaq %2, %%rsi\n\t" \
+ "1:\tleaq %2, %%rdi\n\t" \
"subq $128, %%rsp\n\t" \
"callq __lll_lock_wait\n\t" \
"addq $128, %%rsp\n\t" \
"jmp 2f\n\t" \
".previous\n" \
"2:" \
- : "=D" (ignore1), "=&S" (ignore2), "=m" (futex) \
+ : "=S" (ignore1), "=&D" (ignore2), "=m" (futex) \
: "0" (-1), "2" (futex) \
: "memory"); })
@@ -227,7 +227,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
__asm __volatile ("cmpl $0, __libc_multiple_threads(%%rip)\n\t" \
"je 0f\n\t" \
"lock\n" \
- "0:\taddl $1,%0\n\t" \
+ "0:\incl %0\n\t" \
"jng 1f\n\t" \
".subsection 1\n" \
"1:\tleaq %0, %%rdi\n\t" \