From 73eb728fcb30c51ef157e28f6ee0de20fd2f339c Mon Sep 17 00:00:00 2001 From: ken Date: Thu, 2 Aug 2001 15:33:35 +0000 Subject: [PATCH] [project @ 2001-08-02 15:33:35 by ken] Some 64-bit fixes for the new GC code. --- ghc/rts/GC.c | 3 +-- ghc/rts/GCCompact.c | 10 +++++----- ghc/rts/StoragePriv.h | 6 ++++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 74a3e94..9d0b79e 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.111 2001/07/30 12:54:12 simonmar Exp $ + * $Id: GC.c,v 1.112 2001/08/02 15:33:35 ken Exp $ * * (c) The GHC Team 1998-1999 * @@ -40,7 +40,6 @@ #if defined(RTS_GTK_FRONTPANEL) #include "FrontPanel.h" #endif -#include /* STATIC OBJECT LIST. * diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index 9ddd414..d8cef76 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GCCompact.c,v 1.5 2001/07/30 12:57:01 simonmar Exp $ + * $Id: GCCompact.c,v 1.6 2001/08/02 15:33:35 ken Exp $ * * (c) The GHC Team 2001 * @@ -173,7 +173,7 @@ thread_stack(StgPtr p, StgPtr stack_end) { StgPtr q; const StgInfoTable* info; - StgWord32 bitmap; + StgWord bitmap; // highly similar to scavenge_stack, but we do pointer threading here. @@ -213,7 +213,7 @@ thread_stack(StgPtr p, StgPtr stack_end) p++; continue; - // small bitmap (< 32 entries, or 64 on a 64-bit machine) + // small bitmap (<= 32 entries, or 64 on a 64-bit machine) case UPDATE_FRAME: case STOP_FRAME: case CATCH_FRAME: @@ -234,7 +234,7 @@ thread_stack(StgPtr p, StgPtr stack_end) } continue; - // large bitmap (> 32 entries) + // large bitmap (> 32 entries, or 64 on a 64-bit machine) case RET_BIG: case RET_VEC_BIG: { @@ -247,7 +247,7 @@ thread_stack(StgPtr p, StgPtr stack_end) for (i=0; isize; i++) { bitmap = large_bitmap->bitmap[i]; - q = p + sizeof(W_) * 8; + q = p + BITS_IN(W_); while (bitmap != 0) { if ((bitmap & 1) == 0) { thread(p); diff --git a/ghc/rts/StoragePriv.h b/ghc/rts/StoragePriv.h index f953613..40b606b 100644 --- a/ghc/rts/StoragePriv.h +++ b/ghc/rts/StoragePriv.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StoragePriv.h,v 1.15 2001/07/23 17:23:20 simonmar Exp $ + * $Id: StoragePriv.h,v 1.16 2001/08/02 15:33:35 ken Exp $ * * (c) The GHC Team, 1998-1999 * @@ -10,6 +10,8 @@ #ifndef STORAGEPRIV_H #define STORAGEPRIV_H +#include + #define END_OF_STATIC_LIST stgCast(StgClosure*,1) extern generation *generations; @@ -21,7 +23,7 @@ extern generation *oldest_gen; extern void newCAF(StgClosure*); extern void move_TSO(StgTSO *src, StgTSO *dest); -extern StgTSO *relocate_stack(StgTSO *dest, int diff); +extern StgTSO *relocate_stack(StgTSO *dest, ptrdiff_t diff); extern StgClosure *static_objects; extern StgClosure *scavenged_static_objects; -- 1.7.10.4