Drop completely useless test instructions.
authordrepper <drepper>
Sun, 21 Sep 2003 17:40:25 +0000 (17:40 +0000)
committerdrepper <drepper>
Sun, 21 Sep 2003 17:40:25 +0000 (17:40 +0000)
12 files changed:
nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h

index 6e4b077..c73970d 100644 (file)
@@ -65,8 +65,7 @@ __lll_mutex_lock_wait:
 2:     LOCK
        cmpxchgl %edx, (%ebx)
 
-       testl   %eax, %eax
-       jne,pn  1b
+       jnz,pn  1b
 
        popl    %edx
        popl    %ebx
@@ -144,8 +143,7 @@ __lll_mutex_timedlock_wait:
        LOCK
        cmpxchgl %edx, (%ebx)
 
-       testl   %eax, %eax
-       jne     7f
+       jnz     7f
 
 6:     addl    $8, %esp
        popl    %ebp
index 08c6e91..d4b61a1 100644 (file)
@@ -46,8 +46,7 @@ pthread_barrier_wait:
        xorl    %eax, %eax
        LOCK
        cmpxchgl %edx, MUTEX(%ebx)
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
        /* One less waiter.  If this was the last one needed wake
           everybody.  */
index 1049e0f..cdcf6d2 100644 (file)
@@ -59,8 +59,7 @@ __pthread_cond_broadcast:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     addl    $wakeup_seq, %ebx
        movl    total_seq+4-wakeup_seq(%ebx), %eax
index d86ee05..3a24adf 100644 (file)
@@ -58,8 +58,7 @@ __pthread_cond_signal:
 #else
        cmpxchgl %edx, cond_lock(%edi)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     leal    wakeup_seq(%edi), %ebx
        movl    total_seq+4(%edi), %eax
index 5799d8f..ca5c142 100644 (file)
@@ -64,8 +64,7 @@ __pthread_cond_timedwait:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
        /* Store the reference to the mutex.  If there is already a
           different value in there this is a bad user bug.  */
@@ -179,8 +178,7 @@ __pthread_cond_timedwait:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     5f
+       jnz     5f
 
 6:     movl    woken_seq(%ebx), %eax
        movl    woken_seq+4(%ebx), %ecx
@@ -363,8 +361,7 @@ __condvar_tw_cleanup:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       je      1f
+       jz      1f
 
 #if cond_lock == 0
        movl    %ebx, %ecx
index db0428f..ff3a1cc 100644 (file)
@@ -61,8 +61,7 @@ __pthread_cond_wait:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
        /* Store the reference to the mutex.  If there is already a
           different value in there this is a bad user bug.  */
@@ -123,8 +122,7 @@ __pthread_cond_wait:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     5f
+       jnz     5f
 
 6:     movl    woken_seq(%ebx), %eax
        movl    woken_seq+4(%ebx), %ecx
@@ -256,8 +254,7 @@ __condvar_w_cleanup:
 #else
        cmpxchgl %edx, cond_lock(%ebx)
 #endif
-       testl   %eax, %eax
-       je      1f
+       jz      1f
 
 #if cond_lock == 0
        movl    %ebx, %ecx
index 1c14943..db0639d 100644 (file)
@@ -54,8 +54,7 @@ __pthread_rwlock_rdlock:
 #else
        cmpxchgl %edx, MUTEX(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     movl    WRITER(%ebx), %eax
        testl   %eax, %eax
@@ -94,8 +93,7 @@ __pthread_rwlock_rdlock:
 #else
        cmpxchgl %edx, MUTEX(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     12f
+       jnz     12f
 
 13:    subl    $1, READERS_QUEUED(%ebx)
        jmp     2b
index 409c046..eb5665b 100644 (file)
@@ -58,8 +58,7 @@ pthread_rwlock_timedrdlock:
 #else
        cmpxchgl %edx, MUTEX(%ebp)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     movl    WRITER(%ebp), %eax
        testl   %eax, %eax
@@ -127,8 +126,7 @@ pthread_rwlock_timedrdlock:
 #else
        cmpxchgl %edx, MUTEX(%ebp)
 #endif
-       testl   %eax, %eax
-       jne     12f
+       jnz     12f
 
 13:    subl    $1, READERS_QUEUED(%ebp)
        cmpl    $-ETIMEDOUT, %ecx
index 00d9906..d9db77b 100644 (file)
@@ -58,8 +58,7 @@ pthread_rwlock_timedwrlock:
 #else
        cmpxchgl %edx, MUTEX(%ebp)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     movl    WRITER(%ebp), %eax
        testl   %eax, %eax
@@ -125,8 +124,7 @@ pthread_rwlock_timedwrlock:
 #else
        cmpxchgl %edx, MUTEX(%ebp)
 #endif
-       testl   %eax, %eax
-       jne     12f
+       jnz     12f
 
 13:    subl    $1, WRITERS_QUEUED(%ebp)
        cmpl    $-ETIMEDOUT, %ecx
index 839a5eb..64aac32 100644 (file)
@@ -52,8 +52,7 @@ __pthread_rwlock_unlock:
 #else
        cmpxchgl %edx, MUTEX(%edi)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     cmpl    $0, WRITER(%edi)
        jne     5f
index 89ad6a3..ea9cc17 100644 (file)
@@ -54,8 +54,7 @@ __pthread_rwlock_wrlock:
 #else
        cmpxchgl %edx, MUTEX(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     1f
+       jnz     1f
 
 2:     movl    WRITER(%ebx), %eax
        testl   %eax, %eax
@@ -92,8 +91,7 @@ __pthread_rwlock_wrlock:
 #else
        cmpxchgl %edx, MUTEX(%ebx)
 #endif
-       testl   %eax, %eax
-       jne     12f
+       jnz     12f
 
 13:    subl    $1, WRITERS_QUEUED(%ebx)
        jmp     2b
index ba32591..be00e89 100644 (file)
@@ -115,8 +115,7 @@ extern int __lll_mutex_unlock_wake (int *__futex)
 #define lll_mutex_lock(futex) \
   (void) ({ int ignore1, ignore2;                                            \
            __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t"                \
-                             "testl %0, %0\n\t"                              \
-                             "jne _L_mutex_lock_%=\n\t"                      \
+                             "jnz _L_mutex_lock_%=\n\t"                      \
                              ".subsection 1\n\t"                             \
                              ".type _L_mutex_lock_%=,@function\n"            \
                              "_L_mutex_lock_%=:\n\t"                         \
@@ -136,8 +135,7 @@ extern int __lll_mutex_unlock_wake (int *__futex)
 #define lll_mutex_cond_lock(futex) \
   (void) ({ int ignore1, ignore2;                                            \
            __asm __volatile (LOCK_INSTR "cmpxchgl %1, %2\n\t"                \
-                             "testl %0, %0\n\t"                              \
-                             "jne _L_mutex_cond_lock_%=\n\t"                 \
+                             "jnz _L_mutex_cond_lock_%=\n\t"                 \
                              ".subsection 1\n\t"                             \
                              ".type _L_mutex_cond_lock_%=,@function\n"       \
                              "_L_mutex_cond_lock_%=:\n\t"                    \
@@ -155,8 +153,7 @@ extern int __lll_mutex_unlock_wake (int *__futex)
 #define lll_mutex_timedlock(futex, timeout) \
   ({ int result, ignore1, ignore2;                                           \
      __asm __volatile (LOCK_INSTR "cmpxchgl %1, %3\n\t"                              \
-                      "testl %0, %0\n\t"                                     \
-                      "jne _L_mutex_timedlock_%=\n\t"                        \
+                      "jnz _L_mutex_timedlock_%=\n\t"                        \
                       ".subsection 1\n\t"                                    \
                       ".type _L_mutex_timedlock_%=,@function\n"              \
                       "_L_mutex_timedlock_%=:\n\t"                           \
@@ -251,8 +248,7 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
                              "je,pt 0f\n\t"                                  \
                              "lock\n"                                        \
                              "0:\tcmpxchgl %1, %2\n\t"                       \
-                             "testl %0, %0\n\t"                              \
-                             "jne _L_mutex_lock_%=\n\t"                      \
+                             "jnz _L_mutex_lock_%=\n\t"                      \
                              ".subsection 1\n\t"                             \
                              ".type _L_mutex_lock_%=,@function\n"            \
                              "_L_mutex_lock_%=:\n\t"                         \