1.0.41.14: ppc: Treat counter register as an interior pointer during GC.
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Fri, 6 Aug 2010 18:49:23 +0000 (18:49 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Fri, 6 Aug 2010 18:49:23 +0000 (18:49 +0000)
  * The PPC has a "counter" register which is a
previously-unacknowledged interior-pointer... But possibly
shouldn't be.

  * This breaks all non-linux PPC targets, due to GC now accessing
the counter register during interrupt context scavenging.  Those
who have access to such targets should find it simple to fix.

src/runtime/gc-common.c
version.lisp-expr

index 97e227c..cc76f5c 100644 (file)
@@ -2576,6 +2576,8 @@ static int boxed_registers[] = BOXED_REGISTERS;
     *os_context_lr_addr(context)
 #define ACCESS_INTERIOR_POINTER_npc \
     *os_context_npc_addr(context)
+#define ACCESS_INTERIOR_POINTER_ctr \
+    *os_context_ctr_addr(context)
 
 #define INTERIOR_POINTER_VARS(name) \
     unsigned long name##_offset;    \
@@ -2673,6 +2675,9 @@ scavenge_interrupt_context(os_context_t * context)
 #ifdef ARCH_HAS_NPC_REGISTER
     INTERIOR_POINTER_VARS(npc);
 #endif
+#ifdef LISP_FEATURE_PPC
+    INTERIOR_POINTER_VARS(ctr);
+#endif
 
     PAIR_INTERIOR_POINTER(pc);
 #ifdef reg_LIP
@@ -2684,6 +2689,9 @@ scavenge_interrupt_context(os_context_t * context)
 #ifdef ARCH_HAS_NPC_REGISTER
     PAIR_INTERIOR_POINTER(npc);
 #endif
+#ifdef LISP_FEATURE_PPC
+    PAIR_INTERIOR_POINTER(ctr);
+#endif
 
     /* Scavenge all boxed registers in the context. */
     for (i = 0; i < (sizeof(boxed_registers) / sizeof(int)); i++) {
@@ -2713,6 +2721,9 @@ scavenge_interrupt_context(os_context_t * context)
 #ifdef ARCH_HAS_NPC_REGISTER
     FIXUP_INTERIOR_POINTER(npc);
 #endif
+#ifdef LISP_FEATURE_PPC
+    FIXUP_INTERIOR_POINTER(ctr);
+#endif
 }
 
 void
index fdcf287..6361fd1 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.41.13"
+"1.0.41.14"