aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2018-06-08 08:08:03 -0700
committerPaul Eggert2018-06-08 08:09:00 -0700
commitdb353b8649cdae54146308e4c875e53d02b0aaee (patch)
treef7bb8cfb9176b668dab4840e83b2e8cbaacb15ec /src
parentf09e9d292f31abeac37e83c3558d7b33a6a1abbf (diff)
downloademacs-db353b8649cdae54146308e4c875e53d02b0aaee.tar.gz
emacs-db353b8649cdae54146308e4c875e53d02b0aaee.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 10012b29db1..293cf2783c3 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -785,7 +785,7 @@ struct Lisp_Symbol
785 GCALIGNED_UNION 785 GCALIGNED_UNION
786 } u; 786 } u;
787}; 787};
788verify (alignof (struct Lisp_Symbol) % GCALIGNMENT == 0); 788verify (!USE_LSB_TAG || alignof (struct Lisp_Symbol) % GCALIGNMENT == 0);
789 789
790/* Declare a Lisp-callable function. The MAXARGS parameter has the same 790/* Declare a Lisp-callable function. The MAXARGS parameter has the same
791 meaning as in the DEFUN macro, and is used to construct a prototype. */ 791 meaning as in the DEFUN macro, and is used to construct a prototype. */
@@ -898,7 +898,7 @@ union vectorlike_header
898 ptrdiff_t size; 898 ptrdiff_t size;
899 GCALIGNED_UNION 899 GCALIGNED_UNION
900 }; 900 };
901verify (alignof (union vectorlike_header) % GCALIGNMENT == 0); 901verify (!USE_LSB_TAG || alignof (union vectorlike_header) % GCALIGNMENT == 0);
902 902
903INLINE bool 903INLINE bool
904(SYMBOLP) (Lisp_Object x) 904(SYMBOLP) (Lisp_Object x)
@@ -1259,7 +1259,7 @@ struct Lisp_Cons
1259 GCALIGNED_UNION 1259 GCALIGNED_UNION
1260 } u; 1260 } u;
1261}; 1261};
1262verify (alignof (struct Lisp_Cons) % GCALIGNMENT == 0); 1262verify (!USE_LSB_TAG || alignof (struct Lisp_Cons) % GCALIGNMENT == 0);
1263 1263
1264INLINE bool 1264INLINE bool
1265(NILP) (Lisp_Object x) 1265(NILP) (Lisp_Object x)
@@ -1381,7 +1381,7 @@ struct Lisp_String
1381 GCALIGNED_UNION 1381 GCALIGNED_UNION
1382 } u; 1382 } u;
1383}; 1383};
1384verify (alignof (struct Lisp_String) % GCALIGNMENT == 0); 1384verify (!USE_LSB_TAG || alignof (struct Lisp_String) % GCALIGNMENT == 0);
1385 1385
1386INLINE bool 1386INLINE bool
1387STRINGP (Lisp_Object x) 1387STRINGP (Lisp_Object x)