From f192f80212c9603f90933a3b575a15007335779c Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 4 Nov 2013 01:18:01 +0400 Subject: [PATCH] Fix raw-instance-slots-equalp on SPARC. Some slots have to be aligned or they will cause a bus error. Take alignment into account on #-(or x86 x86-64 ppc). --- src/code/target-defstruct.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/code/target-defstruct.lisp b/src/code/target-defstruct.lisp index f397731..23de7d4 100644 --- a/src/code/target-defstruct.lisp +++ b/src/code/target-defstruct.lisp @@ -404,10 +404,14 @@ for accessor = (when rsd (raw-slot-data-accessor-name rsd)) always (or (not accessor) - (prog1 - (equalp (funcall accessor x i) - (funcall accessor y i)) - (incf i (raw-slot-data-n-words rsd)))))) + (progn + #!-(or x86 x86-64 ppc) + (setf i (logandc2 (+ i (1- (raw-slot-data-alignment rsd))) + (1- (raw-slot-data-alignment rsd)))) + (prog1 + (equalp (funcall accessor x i) + (funcall accessor y i)) + (incf i (raw-slot-data-n-words rsd))))))) ;;; default PRINT-OBJECT method -- 1.7.10.4