changeset 49414:668c96afa702

(mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]: Use __alignof__.
author Dave Love <fx@gnu.org>
date Fri, 24 Jan 2003 12:24:13 +0000
parents 8aaa2f3ae722
children 0a1ad80e2566
files src/alloc.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Fri Jan 24 12:22:01 2003 +0000
+++ b/src/alloc.c	Fri Jan 24 12:24:13 2003 +0000
@@ -3774,6 +3774,9 @@
 
   /* This trick flushes the register windows so that all the state of
      the process is contained in the stack.  */
+  /* Fixme: Code in the Boehm GC sugests flushing (with `flushrs') is
+     needed on ia64 too.  See mach_dep.c, where it also says inline
+     assembler doesn't work with relevant proprietary compilers.  */
 #ifdef sparc
   asm ("ta 3");
 #endif
@@ -3804,8 +3807,12 @@
      that's not the case, something has to be done here to iterate
      over the stack segments.  */
 #ifndef GC_LISP_OBJECT_ALIGNMENT
+#ifdef __GNUC__
+#define GC_LISP_OBJECT_ALIGNMENT __alignof__ (Lisp_Object)
+#else
 #define GC_LISP_OBJECT_ALIGNMENT sizeof (Lisp_Object)
 #endif
+#endif
   for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT)
     mark_memory ((char *) stack_base + i, end);