Reorder struct passed to cleanup handler to eliminate one more instruction.
This commit is contained in:
parent
8cfb7315ea
commit
ee2af3e835
|
@ -95,8 +95,8 @@ __pthread_cond_timedwait:
|
||||||
movl %edi, 20(%esp)
|
movl %edi, 20(%esp)
|
||||||
movl %edx, 24(%esp)
|
movl %edx, 24(%esp)
|
||||||
/* Prepare structure passed to cancellation handler. */
|
/* Prepare structure passed to cancellation handler. */
|
||||||
|
movl %ecx, (%esp)
|
||||||
movl %ebx, 4(%esp)
|
movl %ebx, 4(%esp)
|
||||||
movl %ecx, 8(%esp)
|
|
||||||
|
|
||||||
/* Unlock. */
|
/* Unlock. */
|
||||||
8: LOCK
|
8: LOCK
|
||||||
|
@ -107,7 +107,7 @@ __pthread_cond_timedwait:
|
||||||
#endif
|
#endif
|
||||||
jne 3f
|
jne 3f
|
||||||
|
|
||||||
4: movl %esp, %eax
|
4: leal 8(%esp), %eax
|
||||||
call __pthread_enable_asynccancel_2
|
call __pthread_enable_asynccancel_2
|
||||||
|
|
||||||
/* Get the current time. */
|
/* Get the current time. */
|
||||||
|
@ -168,7 +168,7 @@ __pthread_cond_timedwait:
|
||||||
subl $wakeup_seq, %ebx
|
subl $wakeup_seq, %ebx
|
||||||
movl %eax, %esi
|
movl %eax, %esi
|
||||||
|
|
||||||
movl (%esp), %eax
|
movl 8(%esp), %eax
|
||||||
call __pthread_disable_asynccancel
|
call __pthread_disable_asynccancel
|
||||||
|
|
||||||
/* Lock. */
|
/* Lock. */
|
||||||
|
@ -224,10 +224,9 @@ __pthread_cond_timedwait:
|
||||||
11: movl 20+CLEANUP_PREV(%esp), %edx
|
11: movl 20+CLEANUP_PREV(%esp), %edx
|
||||||
movl %edx, %gs:CLEANUP
|
movl %edx, %gs:CLEANUP
|
||||||
|
|
||||||
/* Trick ahead: 8(%esp) contains the address of the mutex. */
|
/* Trick ahead: (%esp) contains the address of the mutex. */
|
||||||
addl $8, %esp
|
|
||||||
call __pthread_mutex_lock_internal
|
call __pthread_mutex_lock_internal
|
||||||
addl $36, %esp
|
addl $44, %esp
|
||||||
|
|
||||||
/* We return the result of the mutex_lock operation if it failed. */
|
/* We return the result of the mutex_lock operation if it failed. */
|
||||||
testl %eax, %eax
|
testl %eax, %eax
|
||||||
|
|
|
@ -84,10 +84,10 @@ __condvar_cleanup:
|
||||||
ENTER_KERNEL
|
ENTER_KERNEL
|
||||||
|
|
||||||
/* Lock the mutex unless asynchronous cancellation is in effect. */
|
/* Lock the mutex unless asynchronous cancellation is in effect. */
|
||||||
testl $2, (%esi)
|
testl $2, 8(%esi)
|
||||||
jne 3f
|
jne 3f
|
||||||
|
|
||||||
pushl 8(%esi)
|
pushl (%esi)
|
||||||
call __pthread_mutex_lock_internal
|
call __pthread_mutex_lock_internal
|
||||||
popl %eax
|
popl %eax
|
||||||
|
|
||||||
|
@ -153,8 +153,8 @@ __pthread_cond_wait:
|
||||||
movl %edi, 12(%esp)
|
movl %edi, 12(%esp)
|
||||||
movl %edx, 16(%esp)
|
movl %edx, 16(%esp)
|
||||||
/* Prepare structure passed to cancellation handler. */
|
/* Prepare structure passed to cancellation handler. */
|
||||||
|
movl %ecx, (%esp)
|
||||||
movl %ebx, 4(%esp)
|
movl %ebx, 4(%esp)
|
||||||
movl %ecx, 8(%esp)
|
|
||||||
|
|
||||||
/* Unlock. */
|
/* Unlock. */
|
||||||
8: LOCK
|
8: LOCK
|
||||||
|
@ -165,7 +165,7 @@ __pthread_cond_wait:
|
||||||
#endif
|
#endif
|
||||||
jne 3f
|
jne 3f
|
||||||
|
|
||||||
4: movl %esp, %eax
|
4: leal 8(%esp), %eax
|
||||||
call __pthread_enable_asynccancel_2
|
call __pthread_enable_asynccancel_2
|
||||||
|
|
||||||
movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */
|
movl %esi, %ecx /* movl $FUTEX_WAIT, %ecx */
|
||||||
|
@ -175,7 +175,7 @@ __pthread_cond_wait:
|
||||||
ENTER_KERNEL
|
ENTER_KERNEL
|
||||||
subl $wakeup_seq, %ebx
|
subl $wakeup_seq, %ebx
|
||||||
|
|
||||||
movl (%esp), %eax
|
movl 8(%esp), %eax
|
||||||
call __pthread_disable_asynccancel
|
call __pthread_disable_asynccancel
|
||||||
|
|
||||||
/* Lock. */
|
/* Lock. */
|
||||||
|
@ -222,10 +222,9 @@ __pthread_cond_wait:
|
||||||
11: movl 20+CLEANUP_PREV(%esp), %edx
|
11: movl 20+CLEANUP_PREV(%esp), %edx
|
||||||
movl %edx, %gs:CLEANUP
|
movl %edx, %gs:CLEANUP
|
||||||
|
|
||||||
/* Trick ahead: 8(%esp) contains the address of the mutex. */
|
/* Trick ahead: (%esp) contains the address of the mutex. */
|
||||||
addl $8, %esp
|
|
||||||
call __pthread_mutex_lock_internal
|
call __pthread_mutex_lock_internal
|
||||||
addl $28, %esp
|
addl $36, %esp
|
||||||
|
|
||||||
14: popl %ebx
|
14: popl %ebx
|
||||||
popl %esi
|
popl %esi
|
||||||
|
|
Loading…
Reference in New Issue