From: Roland McGrath Date: Wed, 16 Feb 2005 11:07:26 +0000 (+0000) Subject: 2005-01-26 Jakub Jelinek X-Git-Tag: cvs/fedora-glibc-2_3-20050216T1256~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cbef6c273e0f8b71d1ae8d1d0d56f9cf1a37403;p=thirdparty%2Fglibc.git 2005-01-26 Jakub Jelinek [BZ #737] * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm. 2005-01-23 Roland McGrath [BZ #737] * sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS. * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD] (SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer from %gs:0 and add to that value, rather that direct %gs:OFFSET access. * sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise. --- diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index af75d4c51ab..a15109f8000 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -154,9 +154,17 @@ __i686.get_pc_thunk.reg: \ movl SYSCALL_ERROR_ERRNO@GOTNTPOFF(%ecx), %ecx; \ xorl %edx, %edx; \ subl %eax, %edx; \ - movl %edx, %gs:0(%ecx); \ + SYSCALL_ERROR_HANDLER_TLS_STORE (%edx, %ecx); \ orl $-1, %eax; \ jmp L(pseudo_end); +# ifndef NO_TLS_DIRECT_SEG_REFS +# define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ + movl src, %gs:(destoff) +# else +# define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ + addl %gs:0, destoff; \ + movl src, (destoff) +# endif # else # define SYSCALL_ERROR_HANDLER \ 0:pushl %ebx; \