From ced5f359e601f2d5de9c069cef8acef777d7d586 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 21 Oct 2005 02:36:42 +0000
Subject: [PATCH] The stack pointer is supposed to be on a 16-byte boundary, so
 make sure FULL_FRAME_SIZE is a multiple of 16.  (From a patch to sbcl from
 Cyrus Harmon.)

---
 lisp/ppc-assem.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ppc-assem.S b/lisp/ppc-assem.S
index e531a1a0c..f5cb68bd9 100644
--- a/lisp/ppc-assem.S
+++ b/lisp/ppc-assem.S
@@ -58,7 +58,8 @@ x:
 (NFPR_SAVE_BYTES(first_f)+ NGPR_SAVE_BYTES(first_g)+ FRAME_ARG_BYTES(out_arg_words))
 #define SAVE_FPR(n) stfd f/**/n,-8*(32- n)(r11)
 #define SAVE_GPR(n) stw r/**/n,-4*(32- n)(r11)
-#define FULL_FRAME_SIZE FRAME_SIZE(FIRST_SAVE_GPR,FIRST_SAVE_FPR,8,1)
+/* Make sure FULL_FRAME_SIZE is on a 16-byte boundary */
+#define FULL_FRAME_SIZE ((FRAME_SIZE(FIRST_SAVE_GPR,FIRST_SAVE_FPR,8,1) + 15) & ~15)
 #else
 #define FRAME_SIZE(first_g,first_f,out_arg_words,savecr) \
 (NFPR_SAVE_BYTES(first_f)+ NGPR_SAVE_BYTES(first_g)+ FRAME_ARG_BYTES(out_arg_words+savecr))
-- 
GitLab