(__lll_lock_wait): Remove jump prediction suffix.
authorUlrich Drepper <drepper@redhat.com>
Mon, 17 Mar 2003 01:53:39 +0000 (01:53 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 17 Mar 2003 01:53:39 +0000 (01:53 +0000)
nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S

index d4fb50a..484beaf 100644 (file)
@@ -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
 
index 755bb25..aff449b 100644 (file)
@@ -58,7 +58,7 @@ __lll_lock_wait:
        orl     $-1, %esi       /* Load -1.  */
        LOCK
        xaddl   %esi, (%rdi)
-       jne,pn  1b
+       jne     1b
 
        movl    $-1, (%rdi)
 
index ef3867b..7d5df95 100644 (file)
@@ -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");                        \
index e189dc1..1b2731a 100644 (file)
@@ -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