about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-08 04:58:30 +0000
committerRoland McGrath <roland@gnu.org>2002-08-08 04:58:30 +0000
commit939f249c81c4bff410fbe2befe186059c605d329 (patch)
treed89c46ee720162d4dff943203caebbe06d47f76c
parentec6170f59b44bb0e9c40c263cba3d88f80db884c (diff)
downloadglibc-939f249c81c4bff410fbe2befe186059c605d329.tar.gz
glibc-939f249c81c4bff410fbe2befe186059c605d329.tar.xz
glibc-939f249c81c4bff410fbe2befe186059c605d329.zip
2002-08-07 Roland McGrath <roland@redhat.com>
	* sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
	an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
-rw-r--r--linuxthreads/sysdeps/i386/tls.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index 55cceccf37..a00de6c3d8 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -94,12 +94,16 @@ typedef struct
     { nr, (unsigned long int) (descr), sizeof (struct _pthread_descr_struct), \
       1, 0, 0, 0, 0, 1, 0 };						      \
   int result;								      \
-  asm ("pushl %%ebx\n\t"						      \
+  asm volatile (							      \
+       "pushl %%ebx\n\t"						      \
        "movl $1, %%ebx\n\t"						      \
        "int $0x80\n\t"							      \
        "popl %%ebx"							      \
        : "=a" (result)							      \
-       : "0" (__NR_modify_ldt), "d" (sizeof (ldt_entry)), "c" (&ldt_entry));  \
+       : "0" (__NR_modify_ldt),						      \
+         /* The extra argument with the "m" constraint is necessary	      \
+	    to let the compiler know that we are accessing LDT_ENTRY here.  */\
+         "m" (ldt_entry), "c" (&ldt_entry), "d" (sizeof (ldt_entry)));	      \
   __builtin_expect (result, 0) != 0 ? -1 : nr * 8 + 7;			      \
 })