Add cfi directives.
authordrepper <drepper>
Tue, 27 May 2008 05:58:43 +0000 (05:58 +0000)
committerdrepper <drepper>
Tue, 27 May 2008 05:58:43 +0000 (05:58 +0000)
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_rwlock_rdlock.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/i486/sem_post.S

index 77d252d..040d7f8 100644 (file)
        .type   pthread_barrier_wait,@function
        .align  16
 pthread_barrier_wait:
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
 
        movl    8(%esp), %ebx
 
@@ -45,6 +48,8 @@ pthread_barrier_wait:
 
        /* There are more threads to come.  */
        pushl   %esi
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%esi, -12)
 
 #if CURR_EVENT == 0
        movl    (%ebx), %edx
@@ -101,9 +106,16 @@ pthread_barrier_wait:
 10:    movl    %esi, %eax              /* != PTHREAD_BARRIER_SERIAL_THREAD */
 
        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(4)
+       cfi_offset(%ebx, -8)
+       
        /* The necessary number of threads arrived.  */
 3:
 #if CURR_EVENT == 0
@@ -140,8 +152,12 @@ pthread_barrier_wait:
 5:     orl     $-1, %eax               /* == PTHREAD_BARRIER_SERIAL_THREAD */
 
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
 
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
 1:     movl    PRIVATE(%ebx), %ecx
        leal    MUTEX(%ebx), %edx
        xorl    $LLL_SHARED, %ecx
@@ -154,6 +170,8 @@ pthread_barrier_wait:
        call    __lll_unlock_wake
        jmp     5b
 
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%esi, -12)
 6:     movl    PRIVATE(%ebx), %ecx
        leal    MUTEX(%ebx), %eax
        xorl    $LLL_SHARED, %ecx
@@ -165,4 +183,5 @@ pthread_barrier_wait:
        xorl    $LLL_SHARED, %ecx
        call    __lll_unlock_wake
        jmp     10b
+       cfi_endproc
        .size   pthread_barrier_wait,.-pthread_barrier_wait
index 776c47f..f46b4b8 100644 (file)
        .type   __pthread_cond_broadcast, @function
        .align  16
 __pthread_cond_broadcast:
-
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
        pushl   %esi
+       cfi_adjust_cfa_offset(4)
        pushl   %edi
+       cfi_adjust_cfa_offset(4)
        pushl   %ebp
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
+       cfi_offset(%esi, -12)
+       cfi_offset(%edi, -16)
+       cfi_offset(%ebp, -20)
 
        movl    20(%esp), %ebx
 
@@ -114,11 +122,24 @@ __pthread_cond_broadcast:
 
 10:    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)
        .align  16
        /* Unlock.  */
 4:     LOCK
@@ -127,11 +148,24 @@ __pthread_cond_broadcast:
 
 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
@@ -199,6 +233,7 @@ __pthread_cond_broadcast:
        movl    $SYS_futex, %eax
        ENTER_KERNEL
        jmp     10b
+       cfi_endproc
        .size   __pthread_cond_broadcast, .-__pthread_cond_broadcast
 versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast,
                  GLIBC_2_3_2)
index 36a1803..4909f49 100644 (file)
        .align  16
 __pthread_cond_signal:
 
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
        pushl   %edi
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
+       cfi_offset(%edi, -12)
 
        movl    12(%esp), %edi
 
@@ -69,7 +74,12 @@ __pthread_cond_signal:
 
        /* Wake up one thread.  */
        pushl   %esi
+       cfi_adjust_cfa_offset(4)
        pushl   %ebp
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%esi, -16)
+       cfi_offset(%ebp, -20)
+
 #if FUTEX_PRIVATE_FLAG > 255
        xorl    %ecx, %ecx
 #endif
@@ -91,7 +101,11 @@ __pthread_cond_signal:
        ENTER_KERNEL  */
        int     $0x80
        popl    %ebp
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebp)
        popl    %esi
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%esi)
 
        /* For any kind of error, we try again with WAKE.
           The general test also covers running on old kernels.  */
@@ -100,9 +114,17 @@ __pthread_cond_signal:
 
 6:     xorl    %eax, %eax
        popl    %edi
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%edi)
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
 
+       cfi_adjust_cfa_offset(8)
+       cfi_offset(%ebx, -8)
+       cfi_offset(%edi, -12)
+
 7:     /* %ecx should be either FUTEX_WAKE_OP or
           FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall.  */
        xorl    $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
@@ -152,6 +174,7 @@ __pthread_cond_signal:
        call    __lll_lock_wait
        jmp     2b
 
+       cfi_endproc
        .size   __pthread_cond_signal, .-__pthread_cond_signal
 versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal,
                  GLIBC_2_3_2)
index 2ddeed0..4e5f0c5 100644 (file)
        .type   __pthread_rwlock_rdlock,@function
        .align  16
 __pthread_rwlock_rdlock:
+       cfi_startproc
        pushl   %esi
+       cfi_adjust_cfa_offset(4)
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%esi, -8)
+       cfi_offset(%ebx, -12)
 
        xorl    %esi, %esi
        movl    12(%esp), %ebx
@@ -113,9 +118,16 @@ __pthread_rwlock_rdlock:
 
        movl    %edx, %eax
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        popl    %esi
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%esi)
        ret
 
+       cfi_adjust_cfa_offset(8)
+       cfi_offset(%esi, -8)
+       cfi_offset(%ebx, -12)
 1:
 #if MUTEX == 0
        movl    %ebx, %edx
@@ -171,6 +183,7 @@ __pthread_rwlock_rdlock:
        movzbl  PSHARED(%ebx), %ecx
        call    __lll_lock_wait
        jmp     13b
+       cfi_endproc
        .size   __pthread_rwlock_rdlock,.-__pthread_rwlock_rdlock
 
        .globl  pthread_rwlock_rdlock
index bf9c33e..aabb929 100644 (file)
        .type   __pthread_rwlock_unlock,@function
        .align  16
 __pthread_rwlock_unlock:
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
        pushl   %edi
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
+       cfi_offset(%edi, -12)
 
        movl    12(%esp), %edi
 
@@ -87,9 +92,16 @@ __pthread_rwlock_unlock:
 
        xorl    %eax, %eax
        popl    %edi
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%edi)
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
 
+       cfi_adjust_cfa_offset(8)
+       cfi_offset(%ebx, -8)
+       cfi_offset(%edi, -12)
        .align  16
 6:     LOCK
 #if MUTEX == 0
@@ -133,7 +145,7 @@ __pthread_rwlock_unlock:
        movzbl  PSHARED(%edi), %ecx
        call    __lll_unlock_wake
        jmp     8b
-
+       cfi_endproc
        .size   __pthread_rwlock_unlock,.-__pthread_rwlock_unlock
 
        .globl  pthread_rwlock_unlock
index d13bb51..1007364 100644 (file)
        .type   __pthread_rwlock_wrlock,@function
        .align  16
 __pthread_rwlock_wrlock:
+       cfi_startproc
        pushl   %esi
+       cfi_adjust_cfa_offset(4)
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%esi, -8)
+       cfi_offset(%ebx, -12)
 
        xorl    %esi, %esi
        movl    12(%esp), %ebx
@@ -111,9 +116,16 @@ __pthread_rwlock_wrlock:
 
        movl    %edx, %eax
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        popl    %esi
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%esi)
        ret
 
+       cfi_adjust_cfa_offset(8)
+       cfi_offset(%esi, -8)
+       cfi_offset(%ebx, -12)
 1:
 #if MUTEX == 0
        movl    %ebx, %edx
@@ -162,6 +174,7 @@ __pthread_rwlock_wrlock:
        movzbl  PSHARED(%ebx), %ecx
        call    __lll_lock_wait
        jmp     13b
+       cfi_endproc
        .size   __pthread_rwlock_wrlock,.-__pthread_rwlock_wrlock
 
        .globl  pthread_rwlock_wrlock
index 2edcdde..86992c8 100644 (file)
        .type   __new_sem_post,@function
        .align  16
 __new_sem_post:
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
 
        movl    8(%esp), %ebx
 
@@ -64,8 +67,12 @@ __new_sem_post:
 
 2:     xorl    %eax, %eax
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
 
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
 1:
 #ifdef PIC
        call    __i686.get_pc_thunk.bx
@@ -116,14 +123,20 @@ __new_sem_post:
 
        orl     $-1, %eax
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
+       cfi_endproc
        .size   __new_sem_post,.-__new_sem_post
        versioned_symbol(libpthread, __new_sem_post, sem_post, GLIBC_2_1)
 #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
        .global __old_sem_post
        .type   __old_sem_post,@function
 __old_sem_post:
+       cfi_startproc
        pushl   %ebx
+       cfi_adjust_cfa_offset(4)
+       cfi_offset(%ebx, -8)
 
        movl    8(%esp), %ebx
        LOCK
@@ -139,7 +152,10 @@ __old_sem_post:
 
        xorl    %eax, %eax
        popl    %ebx
+       cfi_adjust_cfa_offset(-4)
+       cfi_restore(%ebx)
        ret
+       cfi_endproc
        .size   __old_sem_post,.-__old_sem_post
        compat_symbol(libpthread, __old_sem_post, sem_post, GLIBC_2_0)
 #endif