From: Stas Boukarev Date: Sun, 3 Nov 2013 21:18:01 +0000 (+0400) Subject: Fix raw-instance-slots-equalp on SPARC. X-Git-Url: http://repo.macrolet.net/gitweb/?p=sbcl.git;a=commitdiff_plain;h=f192f80212c9603f90933a3b575a15007335779c 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). --- 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