aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/powerpc/aim/vm_machdep.c1
-rw-r--r--sys/powerpc/include/frame.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 2deb4cbfffda..1790ce38d755 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -187,6 +187,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
cf->cf_arg1 = (register_t)tf;
pcb->pcb_sp = (register_t)cf;
+ KASSERT(pcb->pcb_sp % 16 == 0, ("stack misaligned"));
#ifdef __powerpc64__
pcb->pcb_lr = ((register_t *)fork_trampoline)[0];
pcb->pcb_toc = ((register_t *)fork_trampoline)[1];
diff --git a/sys/powerpc/include/frame.h b/sys/powerpc/include/frame.h
index 196cb6fb8af3..092827d2df18 100644
--- a/sys/powerpc/include/frame.h
+++ b/sys/powerpc/include/frame.h
@@ -94,6 +94,7 @@ struct callframe {
register_t cf_func;
register_t cf_arg0;
register_t cf_arg1;
+ register_t _padding; /* Maintain 16-byte alignment */
};
#else
struct callframe {