]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 21 Aug 2002 02:35:30 +0000 (02:35 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 21 Aug 2002 02:35:30 +0000 (02:35 +0000)
* sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
loading/reading segment registers.  Some old hardware doesn't
handle the 32-bit instructions as expected.
* sysdeps/i386/tls.h: Likewise.

linuxthreads/ChangeLog
linuxthreads/sysdeps/i386/tls.h
linuxthreads/sysdeps/i386/useldt.h

index ce61798bbdacc4cc6d2b5637febf378fde255fd5..2be82510d0bcaf4b681c6990a2a145a3d882b838 100644 (file)
@@ -1,5 +1,10 @@
 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
+       loading/reading segment registers.  Some old hardware doesn't
+       handle the 32-bit instructions as expected.
+       * sysdeps/i386/tls.h: Likewise.
+
        * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
        renamed to secondcall and use is negated.
        (TLS_SETUP_GS_SEGMENT): Likewise.
index 0bec077730324a38d4b2066b9888f4e0e69f2546..a168c008b75475bff3f97d2feb863922734b3f16 100644 (file)
@@ -123,8 +123,8 @@ typedef struct
   int result;                                                                \
   if (secondcall)                                                            \
     ldt_entry.entry_number = ({ int _gs;                                     \
-                               asm ("movl %%gs, %0" : "=q" (_gs));           \
-                               _gs >> 3; });                                 \
+                               asm ("movw %%gs, %w0" : "=q" (_gs));          \
+                               (_gs & 0xffff) >> 3; });                      \
   asm volatile (TLS_LOAD_EBX                                                 \
                "int $0x80\n\t"                                               \
                TLS_LOAD_EBX                                                  \
@@ -164,7 +164,7 @@ typedef struct
     __gs = TLS_SETUP_GS_SEGMENT (_descr, secondcall);                        \
     if (__builtin_expect (__gs, 7) != -1)                                    \
       {                                                                              \
-       asm ("movl %0, %%gs" : : "q" (__gs));                                 \
+       asm ("movw %w0, %%gs" : : "q" (__gs));                                \
        __gs = 0;                                                             \
       }                                                                              \
     __gs;                                                                    \
index ff42853668d50b91b64a44a918a879f15a2334c8..8c77c4a34b0075f990f4e5c46a8e87aa71f771ce 100644 (file)
@@ -72,7 +72,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
       1, 0, 0, 0, 0, 1, 0 };                                                 \
   if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0)                 \
     abort ();                                                                \
-  asm ("movl %0, %%gs" : : "q" (nr * 8 + 7));                                \
+  asm ("movw %w0, %%gs" : : "q" (nr * 8 + 7));                               \
 })
 
 /* When using the new set_thread_area call, we don't need to change %gs
@@ -83,13 +83,13 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
 ({                                                                           \
   int __gs;                                                                  \
   struct modify_ldt_ldt_s ldt_entry =                                        \
-    { ({ asm ("movl %%gs, %0" : "=q" (__gs)); __gs >> 3; }),                 \
+    { ({ asm ("movw %%gs, %w0" : "=q" (__gs)); (__gs & 0xffff) >> 3; }),      \
       (unsigned long int) descr, sizeof (struct _pthread_descr_struct),              \
       1, 0, 0, 0, 0, 1, 0 };                                                 \
   if (__builtin_expect (INLINE_SYSCALL (set_thread_area, 1, &ldt_entry) == 0, \
                        1))                                                   \
-    asm ("movl %0, %%gs" :: "q" (__gs));                                     \
-  else                                                               \
+    asm ("movw %w0, %%gs" :: "q" (__gs));                                    \
+  else                                                                       \
     __gs = -1;                                                               \
   __gs;                                                                              \
 })
@@ -117,7 +117,7 @@ extern int __have_no_set_thread_area;
 #define FREE_THREAD(descr, nr) \
 {                                                                            \
   int __gs;                                                                  \
-  __asm__ __volatile__ ("movl %%gs, %0" : "=q" (__gs));                              \
+  __asm__ __volatile__ ("movw %%gs, %w0" : "=q" (__gs));                     \
   if (__builtin_expect (__gs & 4, 0))                                        \
     {                                                                        \
       struct modify_ldt_ldt_s ldt_entry =                                    \