]> git.eshelyaron.com Git - emacs.git/commitdiff
(mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]:
authorDave Love <fx@gnu.org>
Fri, 24 Jan 2003 12:24:33 +0000 (12:24 +0000)
committerDave Love <fx@gnu.org>
Fri, 24 Jan 2003 12:24:33 +0000 (12:24 +0000)
Use __alignof__.

src/ChangeLog
src/alloc.c

index ad2da41b98c8312379e6d2504fb8c44957185cee..66939d965d0f06a7d30656d4d2eee17dbec1ccae 100644 (file)
@@ -1,3 +1,11 @@
+2003-01-24  Dave Love  <fx@gnu.org>
+
+       * s/gnu-linux.h (GC_SETJMP_WORKS, GC_MARK_STACK): Define for more
+       architectures.
+
+       * alloc.c (mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]:
+       Use __alignof__.
+
 2003-01-24  Kenichi Handa  <handa@m17n.org>
 
        * keyboard.c (adjust_point_for_property): New second arg MODIFIED.
index 10c4f6f235de148fb489b3fc486716526521772f..fb15f883175d3e1c785b6b248fdd522a4fc8ac3a 100644 (file)
@@ -3774,6 +3774,9 @@ mark_stack ()
 
   /* 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,7 +3807,11 @@ mark_stack ()
      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);