ppc32: fix stack alignment

The stack should be 16-byte aligned, not 8 mod 16.
master
Bobby Bingham 2019-04-05 13:32:03 -05:00
parent cb59e7ee95
commit b6a9b5e279
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ __makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
sp -= (uc_link + 1);
sp = (greg_t *) (((uintptr_t) sp & -16L) - 8);
sp = (greg_t *) ((uintptr_t) sp & -16L);
ucp->uc_mcontext.gregs[REG_NIP] = (uintptr_t) func;
ucp->uc_mcontext.gregs[REG_LNK] = (uintptr_t) &__start_context;