2005-01-26 Jakub Jelinek <jakub@redhat.com>

[BZ #737]
	* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
	Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
	at least gotntpoff relocation and addition.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
	Likewise.
This commit is contained in:
Roland McGrath 2005-02-16 11:07:44 +00:00
parent 0cbef6c273
commit cbbe5ab1a7
4 changed files with 28 additions and 8 deletions

View File

@ -65,9 +65,14 @@ __new_sem_post:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl $EINVAL, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl $EINVAL, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl $EINVAL, (%eax)

View File

@ -158,9 +158,14 @@ sem_timedwait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl %esi, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl %esi, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl %esi, (%eax)

View File

@ -55,9 +55,14 @@ __new_sem_trywait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ecx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ecx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ecx), %edx
addl %gs:0, %edx
movl $EAGAIN, (%edx)
# else
movl errno@gotntpoff(%ecx), %edx
movl $EAGAIN, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl $EAGAIN, (%eax)

View File

@ -102,9 +102,14 @@ __new_sem_wait:
#endif
addl $_GLOBAL_OFFSET_TABLE_, %ebx
#if USE___THREAD
movl %gs:0, %edx
subl errno@gottpoff(%ebx), %edx
# ifdef NO_TLS_DIRECT_SEG_REFS
movl errno@gotntpoff(%ebx), %edx
addl %gs:0, %edx
movl %esi, (%edx)
# else
movl errno@gotntpoff(%ebx), %edx
movl %esi, %gs:(%edx)
# endif
#else
call __errno_location@plt
movl %esi, (%eax)