summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-02-29 09:53:35 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2008-02-29 09:53:35 +0000
commitb42fd8b216a3137f3379ee9d23da5d9c5fc23411 (patch)
treeb3bec6af65ac4afa7fc0909a747127397f074df0 /sysdeps
parent5f60c7ab2316b9b4c61294b754a08e4cb1a9c4e6 (diff)
2008-02-29 Samuel Thibault <samuel.thibault@ens-lyon.org
* sysdeps/l4/hurd/i386/pt-setup.c (stack_setup): Align stack on 0x10 for MMX operations. * sysdeps/mach/hurd/i386/pt-setup.c (stack_setup): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/l4/hurd/i386/pt-setup.c6
-rw-r--r--sysdeps/mach/hurd/i386/pt-setup.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/l4/hurd/i386/pt-setup.c b/sysdeps/l4/hurd/i386/pt-setup.c
index fe77d533..6afcd141 100644
--- a/sysdeps/l4/hurd/i386/pt-setup.c
+++ b/sysdeps/l4/hurd/i386/pt-setup.c
@@ -47,8 +47,10 @@ stack_setup (struct __pthread *thread,
if (start_routine)
{
/* Set up call frame. */
- *--top = (L4_Word_t) arg; /* Argument to START_ROUTINE. */
- *--top = (L4_Word_t) start_routine;
+ top -= 2*sizeof(L4_Word_t);
+ top = (unsigned long) top & ~0xf;
+ top[1] = (L4_Word_t) arg; /* Argument to START_ROUTINE. */
+ top[0] = (L4_Word_t) start_routine;
*--top = 0; /* Fake return address. */
}
diff --git a/sysdeps/mach/hurd/i386/pt-setup.c b/sysdeps/mach/hurd/i386/pt-setup.c
index 32ace6ad..71f60e23 100644
--- a/sysdeps/mach/hurd/i386/pt-setup.c
+++ b/sysdeps/mach/hurd/i386/pt-setup.c
@@ -63,8 +63,10 @@ stack_setup (struct __pthread *thread,
if (start_routine)
{
/* And then the call frame. */
- *--top = (uintptr_t) arg; /* Argument to START_ROUTINE. */
- *--top = (uintptr_t) start_routine;
+ top -= 2*sizeof(uintptr_t);
+ top = (uintptr_t) top & ~0xf;
+ top[1] = (uintptr_t) arg; /* Argument to START_ROUTINE. */
+ top[0] = (uintptr_t) start_routine;
*--top = 0; /* Fake return address. */
}