Update cfi offsets for pthread_cond_broadcast and signal fir x86.
authorDinakar Guniguntala <dino@in.ibm.com>
Wed, 18 Nov 2009 14:33:23 +0000 (06:33 -0800)
committerUlrich Drepper <drepper@redhat.com>
Wed, 18 Nov 2009 14:33:23 +0000 (06:33 -0800)
nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S

index 4f04c97..1991a4d 100644 (file)
@@ -1,3 +1,10 @@
+2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
+
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
+       Remove redundant code. Fix cfi offsets.
+       * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
+       Fix cfi offsets.
+
 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
index f46b4b8..1a55e52 100644 (file)
@@ -35,16 +35,17 @@ __pthread_cond_broadcast:
        cfi_startproc
        pushl   %ebx
        cfi_adjust_cfa_offset(4)
+       cfi_rel_offset(%ebx, 0)
        pushl   %esi
        cfi_adjust_cfa_offset(4)
+       cfi_rel_offset(%esi, 0)
        pushl   %edi
        cfi_adjust_cfa_offset(4)
+       cfi_rel_offset(%edi, 0)
        pushl   %ebp
        cfi_adjust_cfa_offset(4)
-       cfi_offset(%ebx, -8)
-       cfi_offset(%esi, -12)
-       cfi_offset(%edi, -16)
-       cfi_offset(%ebp, -20)
+       cfi_rel_offset(%ebp, 0)
+       cfi_remember_state
 
        movl    20(%esp), %ebx
 
@@ -120,7 +121,7 @@ __pthread_cond_broadcast:
        cmpl    $0xfffff001, %eax
        jae     9f
 
-10:    xorl    %eax, %eax
+6:     xorl    %eax, %eax
        popl    %ebp
        cfi_adjust_cfa_offset(-4)
        cfi_restore(%ebp)
@@ -135,37 +136,15 @@ __pthread_cond_broadcast:
        cfi_restore(%ebx)
        ret
 
-       cfi_adjust_cfa_offset(16)
-       cfi_offset(%ebx, -8)
-       cfi_offset(%esi, -12)
-       cfi_offset(%edi, -16)
-       cfi_offset(%ebp, -20)
+       cfi_restore_state
+
        .align  16
        /* Unlock.  */
 4:     LOCK
        subl    $1, cond_lock-cond_futex(%ebx)
        jne     5f
+       jmp     6b
 
-6:     xorl    %eax, %eax
-       popl    %ebp
-       cfi_adjust_cfa_offset(-4)
-       cfi_restore(%ebp)
-       popl    %edi
-       cfi_adjust_cfa_offset(-4)
-       cfi_restore(%edi)
-       popl    %esi
-       cfi_adjust_cfa_offset(-4)
-       cfi_restore(%esi)
-       popl    %ebx
-       cfi_adjust_cfa_offset(-4)
-       cfi_restore(%ebx)
-       ret
-
-       cfi_adjust_cfa_offset(16)
-       cfi_offset(%ebx, -8)
-       cfi_offset(%esi, -12)
-       cfi_offset(%edi, -16)
-       cfi_offset(%ebp, -20)
        /* Initial locking failed.  */
 1:
 #if cond_lock == 0
@@ -232,7 +211,7 @@ __pthread_cond_broadcast:
        addl    $FUTEX_WAKE, %ecx
        movl    $SYS_futex, %eax
        ENTER_KERNEL
-       jmp     10b
+       jmp     6b
        cfi_endproc
        .size   __pthread_cond_broadcast, .-__pthread_cond_broadcast
 versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast,
index 4909f49..ad42fb7 100644 (file)
@@ -36,10 +36,11 @@ __pthread_cond_signal:
        cfi_startproc
        pushl   %ebx
        cfi_adjust_cfa_offset(4)
+       cfi_rel_offset(%ebx, 0)
        pushl   %edi
        cfi_adjust_cfa_offset(4)
-       cfi_offset(%ebx, -8)
-       cfi_offset(%edi, -12)
+       cfi_rel_offset(%edi, 0)
+       cfi_remember_state
 
        movl    12(%esp), %edi
 
@@ -75,10 +76,10 @@ __pthread_cond_signal:
        /* Wake up one thread.  */
        pushl   %esi
        cfi_adjust_cfa_offset(4)
+       cfi_rel_offset(%esi, 0)
        pushl   %ebp
        cfi_adjust_cfa_offset(4)
-       cfi_offset(%esi, -16)
-       cfi_offset(%ebp, -20)
+       cfi_rel_offset(%ebp, 0)
 
 #if FUTEX_PRIVATE_FLAG > 255
        xorl    %ecx, %ecx
@@ -121,9 +122,7 @@ __pthread_cond_signal:
        cfi_restore(%ebx)
        ret
 
-       cfi_adjust_cfa_offset(8)
-       cfi_offset(%ebx, -8)
-       cfi_offset(%edi, -12)
+       cfi_restore_state
 
 7:     /* %ecx should be either FUTEX_WAKE_OP or
           FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall.  */