Skip to content

Commit

Permalink
Minial unwind section size reduction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrich Drepper committed Nov 18, 2009
1 parent 424bea6 commit b5f2ab8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
3 changes: 3 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2009-11-17 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
reduce size of unwind info.

* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
cfi directives.
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
Expand Down
31 changes: 14 additions & 17 deletions nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ __pthread_cond_timedwait:
#endif
subq $FRAME_SIZE, %rsp
cfi_adjust_cfa_offset(FRAME_SIZE)
cfi_remember_state

cmpq $1000000000, 8(%rdx)
movl $EINVAL, %eax
Expand All @@ -77,19 +78,19 @@ __pthread_cond_timedwait:
/* Stack frame:
rsp + 48
+--------------------------+
+--------------------------+
rsp + 32 | timeout value |
+--------------------------+
+--------------------------+
rsp + 24 | old wake_seq value |
+--------------------------+
+--------------------------+
rsp + 16 | mutex pointer |
+--------------------------+
+--------------------------+
rsp + 8 | condvar pointer |
+--------------------------+
+--------------------------+
rsp + 4 | old broadcast_seq value |
+--------------------------+
+--------------------------+
rsp + 0 | old cancellation mode |
+--------------------------+
+--------------------------+
*/

cmpq $-1, dep_mutex(%rdi)
Expand Down Expand Up @@ -317,11 +318,7 @@ __pthread_cond_timedwait:

retq

cfi_adjust_cfa_offset(4 * 8 + FRAME_SIZE)
cfi_rel_offset(%r12, FRAME_SIZE + 24)
cfi_rel_offset(%r13, FRAME_SIZE + 16)
cfi_rel_offset(%r14, FRAME_SIZE + 8)
cfi_rel_offset(%r15, FRAME_SIZE)
cfi_restore_state

64: callq __pthread_mutex_cond_lock_adjust
movq %r14, %rax
Expand Down Expand Up @@ -650,15 +647,15 @@ __condvar_cleanup2:
rsp + 48 | %r14 |
+--------------------------+
rsp + 24 | unused |
+--------------------------+
+--------------------------+
rsp + 16 | mutex pointer |
+--------------------------+
+--------------------------+
rsp + 8 | condvar pointer |
+--------------------------+
+--------------------------+
rsp + 4 | old broadcast_seq value |
+--------------------------+
+--------------------------+
rsp + 0 | old cancellation mode |
+--------------------------+
+--------------------------+
*/

movq %rax, 24(%rsp)
Expand Down

0 comments on commit b5f2ab8

Please sign in to comment.