From 922fe0d6da0e4bdcd366f5101395670aabd14e62 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Fri, 6 Aug 2010 18:49:23 +0000 Subject: [PATCH] 1.0.41.14: ppc: Treat counter register as an interior pointer during GC. * 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 | 11 +++++++++++ version.lisp-expr | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c index 97e227c..cc76f5c 100644 --- a/src/runtime/gc-common.c +++ b/src/runtime/gc-common.c @@ -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 diff --git a/version.lisp-expr b/version.lisp-expr index fdcf287..6361fd1 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4