diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2005-09-08 04:24:25 +0000 | 
|---|---|---|
| committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-08 04:24:25 +0000 | 
| commit | 7703ddcaab81da77af01dbb53cd655ee79c45370 (patch) | |
| tree | f25bcad2ad770c15447ef910f75f19543b64902e /libpthread/linuxthreads/sysdeps | |
| parent | c0be1ede0e06e8318ee99ecb6eb55f7b84c67cbf (diff) | |
import some fixes from glibc
Diffstat (limited to 'libpthread/linuxthreads/sysdeps')
| -rw-r--r-- | libpthread/linuxthreads/sysdeps/i386/useldt.h | 15 | 
1 files changed, 10 insertions, 5 deletions
| diff --git a/libpthread/linuxthreads/sysdeps/i386/useldt.h b/libpthread/linuxthreads/sysdeps/i386/useldt.h index 16aee9989..a5e8e6f18 100644 --- a/libpthread/linuxthreads/sysdeps/i386/useldt.h +++ b/libpthread/linuxthreads/sysdeps/i386/useldt.h @@ -24,6 +24,7 @@  #include <stdlib.h>	/* For abort().	 */ +  /* We don't want to include the kernel header.	So duplicate the     information.	 */ @@ -76,7 +77,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);  #ifdef __PIC__  # define USETLS_EBX_ARG "r" -# define USETLS_LOAD_EBX "xchgl %3, %%ebx\n\t" +# define USETLS_LOAD_EBX "xchgl %1, %%ebx\n\t"  #else  # define USETLS_EBX_ARG "b"  # define USETLS_LOAD_EBX @@ -108,8 +109,10 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);  	     "movl %2, %%eax\n\t"					      \  	     "int $0x80\n\t"						      \  	     USETLS_LOAD_EBX						      \ -	     : "&a" (__result)						      \ -	     : USETLS_EBX_ARG (&ldt_entry), "i" (__NR_set_thread_area));      \ +	     : "=&a" (__result)						      \ +	     : USETLS_EBX_ARG (&ldt_entry), "i" (__NR_set_thread_area),	      \ +	       "m" (ldt_entry)						      \ +	     : "memory");						      \        if (__result == 0)						      \  	asm ("movw %w0, %%gs" :: "q" (__gs));				      \        else								      \ @@ -126,8 +129,10 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);  	     "movl %2, %%eax\n\t"					      \  	     "int $0x80\n\t"						      \  	     USETLS_LOAD_EBX						      \ -	     : "&a" (__result)						      \ -	     : USETLS_EBX_ARG (&ldt_entry), "i" (__NR_set_thread_area));      \ +	     : "=&a" (__result)						      \ +	     : USETLS_EBX_ARG (&ldt_entry), "i" (__NR_set_thread_area),	      \ +	       "m" (ldt_entry)						      \ +	     : "memory");						      \        if (__result == 0)						      \  	{								      \  	  __gs = (ldt_entry.entry_number << 3) + 3;			      \ | 
