all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Subject: Re: [Mac OS X] LP64 support for Mac OS X 10.4 + G5.
Date: Sat, 11 Nov 2006 15:48:23 +0900	[thread overview]
Message-ID: <wlbqnexyvc.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <86u0l82ec3.fsf@panel.jk.homeunix.org>

Could someone take a look at the following src/alloc.c part of the
LP64 support on Mac OS X 10.4 + G5 by Nozomu Ando?
http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg00547.html
(src/unexmacosx.c part is already installed.)

FYI, jmp_buf in this platform is not defined in terms of array of
`long's, but that of `int's.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

Index: src/alloc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/alloc.c,v
retrieving revision 1.368
diff -u -r1.368 alloc.c
--- src/alloc.c	20 Apr 2005 07:50:08 -0000	1.368
+++ src/alloc.c	12 May 2005 23:37:51 -0000
@@ -434,7 +434,7 @@
 static int live_float_p P_ ((struct mem_node *, void *));
 static int live_misc_p P_ ((struct mem_node *, void *));
 static void mark_maybe_object P_ ((Lisp_Object));
-static void mark_memory P_ ((void *, void *));
+static void mark_memory P_ ((void *, void *, int));
 static void mem_init P_ ((void));
 static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type));
 static void mem_insert_fixup P_ ((struct mem_node *));
@@ -4139,11 +4139,13 @@
 }
 
 
-/* Mark Lisp objects referenced from the address range START..END.  */
+/* Mark Lisp objects referenced from the address range START+OFFSET..END
+   or END+OFFSET..START. */
 
 static void
-mark_memory (start, end)
+mark_memory (start, end, offset)
      void *start, *end;
+     int offset;
 {
   Lisp_Object *p;
   void **pp;
@@ -4162,7 +4164,7 @@
     }
 
   /* Mark Lisp_Objects.  */
-  for (p = (Lisp_Object *) start; (void *) p < end; ++p)
+  for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p)
     mark_maybe_object (*p);
 
   /* Mark Lisp data pointed to.  This is necessary because, in some
@@ -4362,7 +4364,11 @@
 mark_stack ()
 {
   int i;
-  jmp_buf j;
+  /* jmp_buf may not be aligned enough on darwin-ppc64 */
+  union aligned_jmpbuf {
+    Lisp_Object o;
+    jmp_buf j;
+  } j;
   volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
   void *end;
 
@@ -4393,7 +4399,7 @@
     }
 #endif /* GC_SETJMP_WORKS */
 
-  setjmp (j);
+  setjmp (j.j);
   end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
 #endif /* not GC_SAVE_REGISTERS_ON_STACK */
 
@@ -4408,7 +4414,7 @@
 #endif
 #endif
   for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT)
-    mark_memory ((char *) stack_base + i, end);
+    mark_memory (stack_base, end, i);
   /* Allow for marking a secondary stack, like the register stack on the
      ia64.  */
 #ifdef GC_MARK_SECONDARY_STACK

  reply	other threads:[~2006-11-11  6:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 23:51 [Mac OS X] LP64 support for Mac OS X 10.4 + G5 Nozomu Ando
2006-11-11  6:48 ` YAMAMOTO Mitsuharu [this message]
2006-11-11 10:23   ` Andreas Schwab
2006-11-11 11:01     ` YAMAMOTO Mitsuharu
2006-11-14  1:39       ` Discussion of the following change? YAMAMOTO Mitsuharu
2006-11-12  5:14   ` [Mac OS X] LP64 support for Mac OS X 10.4 + G5 Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-11-13 13:17 Discussion of the following change? David Kastrup
2006-11-13 13:41 ` Juanma Barranquero
2006-11-13 14:02   ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlbqnexyvc.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.