From db353b8649cdae54146308e4c875e53d02b0aaee Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 8 Jun 2018 08:08:03 -0700 Subject: [PATCH] Port alignment verification to x86 --with-wide-int Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-06/msg00238.html * src/lisp.h (struct Lisp_Symbol, union vectorlike_header) (struct Lisp_Cons, struct Lisp_String): Do not check alignment if !USE_LSB_TAG, as alignment is needed only if we are tagging the low-order bits. --- src/lisp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index 10012b2..293cf27 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -785,7 +785,7 @@ struct Lisp_Symbol GCALIGNED_UNION } u; }; -verify (alignof (struct Lisp_Symbol) % GCALIGNMENT == 0); +verify (!USE_LSB_TAG || alignof (struct Lisp_Symbol) % GCALIGNMENT == 0); /* Declare a Lisp-callable function. The MAXARGS parameter has the same meaning as in the DEFUN macro, and is used to construct a prototype. */ @@ -898,7 +898,7 @@ union vectorlike_header ptrdiff_t size; GCALIGNED_UNION }; -verify (alignof (union vectorlike_header) % GCALIGNMENT == 0); +verify (!USE_LSB_TAG || alignof (union vectorlike_header) % GCALIGNMENT == 0); INLINE bool (SYMBOLP) (Lisp_Object x) @@ -1259,7 +1259,7 @@ struct Lisp_Cons GCALIGNED_UNION } u; }; -verify (alignof (struct Lisp_Cons) % GCALIGNMENT == 0); +verify (!USE_LSB_TAG || alignof (struct Lisp_Cons) % GCALIGNMENT == 0); INLINE bool (NILP) (Lisp_Object x) @@ -1381,7 +1381,7 @@ struct Lisp_String GCALIGNED_UNION } u; }; -verify (alignof (struct Lisp_String) % GCALIGNMENT == 0); +verify (!USE_LSB_TAG || alignof (struct Lisp_String) % GCALIGNMENT == 0); INLINE bool STRINGP (Lisp_Object x) -- 2.7.4