diff options
-rw-r--r-- | sysdeps/l4/hurd/i386/pt-setup.c | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/pt-setup.c | 6 |
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. */ } |