From 2a544d82ce6d7214cf1f95a9b8b814ce40e97253 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 11 Mar 2003 04:07:00 +0000 Subject: Update. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_mutex_lock_wait): Reverse order of first two parameters. (__lll_mutex_timedlock_wait): Likewise. (lll_mutex_lock): Adjust asm for that. (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered. (lll_lock): Adjust asm for operand order change. * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file. * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file. --- nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h') diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index fa472baeea..f7e9450a1a 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -42,10 +42,10 @@ /* Does not preserve %eax and %ecx. */ -extern int __lll_mutex_lock_wait (int val, int *__futex) attribute_hidden; +extern int __lll_mutex_lock_wait (int *__futex, int __val) attribute_hidden; /* Does not preserver %eax, %ecx, and %edx. */ -extern int __lll_mutex_timedlock_wait (int val, int *__futex, - const struct timespec *abstime) +extern int __lll_mutex_timedlock_wait (int *__futex, int __val, + const struct timespec *__abstime) attribute_hidden; /* Preserves all registers but %eax. */ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; @@ -71,7 +71,7 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; "jmp 2f\n\t" \ ".previous\n" \ "2:" \ - : "=D" (ignore1), "=&S" (ignore2), "=m" (futex) \ + : "=S" (ignore1), "=&D" (ignore2), "=m" (futex) \ : "0" (1), "2" (futex) \ : "memory"); }) @@ -82,8 +82,8 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; "testl %0, %0\n\t" \ "jne 1f\n\t" \ ".subsection 1\n" \ - "1:\tmovl %0, %%edi\n\t" \ - "leaq %4, %%rsi\n\t" \ + "1:\tmovl %0, %%esi\n\t" \ + "leaq %4, %%rdi\n\t" \ "movq %7, %%rdx\n\t" \ "call __lll_mutex_timedlock_wait\n\t" \ "jmp 2f\n\t" \ @@ -92,7 +92,7 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden; : "=a" (result), "=&D" (ignore1), "=&S" (ignore2), \ "=&d" (ignore2), "=m" (futex) \ : "0" (1), "4" (futex), "m" (timeout) \ - : "memory"); \ + : "memory", "cx", "cc", "r10"); \ result; }) @@ -157,7 +157,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden; "jmp 2f\n\t" \ ".previous\n" \ "2:" \ - : "=D" (ignore1), "=&S" (ignore2), "=m" (futex) \ + : "=S" (ignore1), "=&D" (ignore2), "=m" (futex) \ : "0" (-1), "2" (futex) \ : "memory"); }) -- cgit v1.2.3