From 04ea2996e1f0e9f2f9db0eb67c226ca1107e6f02 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Fri, 23 Mar 2018 12:12:55 -0700 Subject: [PATCH] When ntend is non-zero it is already a native pointer, not a stack offset --- src/gcmain3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gcmain3.c b/src/gcmain3.c index 27b2429..709f4c6 100644 --- a/src/gcmain3.c +++ b/src/gcmain3.c @@ -60,7 +60,7 @@ static char *id = "$Id: gcmain3.c,v 1.4 1999/05/31 23:35:31 sybalsky Exp $ Copyr #define MAXHTCNT 63 #define PADDING 4 #define FNOVERHEADWORDS 8 -#define ADD_OFFSET(ptr, dloffset) ((LispPTR *)((DLword *)(ptr) + (dloffset))) +#define ADD_OFFSET(ptr, dloffset) ((LispPTR *)(((DLword *)(ptr)) + (dloffset))) #ifdef BIGVM #define BIND_BITS(value) ((unsigned int)(value) >> 28) @@ -372,7 +372,8 @@ LispPTR gcmapunscan(void) { GETGC((GCENTRY *)link) = offset & (~STKREFBIT); } } - if ((offset = ((struct htcoll *)link)->next_free)) { + offset = ((struct htcoll *)link)->next_free; + if (offset) { prev = link; link = (GCENTRY *)(HTcoll + offset); goto scnlp; @@ -500,7 +501,7 @@ LispPTR gcscanstack(void) { if (ntend != 0) { obascframe = bascframe; - bascframe = (Bframe *)Addr68k_from_StkOffset(ntend); + bascframe = (Bframe *)ntend; // Addr68k_from_StkOffset(ntend); if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr,