summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2003-01-24 12:24:33 +0000
committerDave Love <fx@gnu.org>2003-01-24 12:24:33 +0000
commit422eec7eb8eeff342c2a4fdc84c592b681ca4256 (patch)
tree54ddf59cd41d6339bb298f58fc963166956e9f5a /src/alloc.c
parente7b6b57283dfae891cc6ea9704c06145f1804c94 (diff)
(mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]:
Use __alignof__.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 10c4f6f235d..fb15f883175 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -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,8 +3807,12 @@ 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);