]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2004-12-21 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Wed, 16 Feb 2005 08:45:56 +0000 (08:45 +0000)
committerRoland McGrath <roland@gnu.org>
Wed, 16 Feb 2005 08:45:56 +0000 (08:45 +0000)
[BZ #723]
* sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
%esp.
* Makefile (tests): Add tst-align2.
* tst-align2.c: New test.
* sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
-mpreferred-stack-boundary=4.

nptl/Makefile
nptl/sysdeps/i386/Makefile
nptl/sysdeps/i386/tls.h

index 8149ef5ed40d86a07b0d3fe1cdbb13fd1732de78..3cef684226c309e3cd3efa787ab9239a51665d70 100644 (file)
@@ -205,7 +205,7 @@ tests = tst-attr1 tst-attr2 tst-attr3 \
        tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
        tst-sem8 tst-sem9 \
        tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
-       tst-align \
+       tst-align tst-align2 \
        tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
        tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \
        tst-raise1 \
index 693fb0569fb19e620a8dd97a97220aeba4b10d4e..2f0d88f3037c72afd0628182c69ccf570c66e396 100644 (file)
@@ -22,4 +22,6 @@ endif
 
 ifeq ($(subdir),nptl)
 CFLAGS-pthread_create.c += -mpreferred-stack-boundary=4
+CFLAGS-tst-align.c += -mpreferred-stack-boundary=4
+CFLAGS-tst-align2.c += -mpreferred-stack-boundary=4
 endif
index 18b038f93ea8ce65a9e44c95c5cf7083381d2974..945a4c71d65b273ff7373581f18714cd0d5c6777 100644 (file)
@@ -397,9 +397,12 @@ union user_desc_init
 #define CALL_THREAD_FCT(descr) \
   ({ void *__res;                                                            \
      int __ignore1, __ignore2;                                               \
-     asm volatile ("pushl %%gs:%P4\n\t"                                              \
+     asm volatile ("pushl %%eax\n\t"                                         \
+                  "pushl %%eax\n\t"                                          \
+                  "pushl %%eax\n\t"                                          \
+                  "pushl %%gs:%P4\n\t"                                       \
                   "call *%%gs:%P3\n\t"                                       \
-                  "addl $4, %%esp"                                           \
+                  "addl $16, %%esp"                                          \
                   : "=a" (__res), "=c" (__ignore1), "=d" (__ignore2)         \
                   : "i" (offsetof (struct pthread, start_routine)),          \
                     "i" (offsetof (struct pthread, arg)));                   \