Some 64-bit fixes for the new GC code.
/* -----------------------------------------------------------------------------
- * $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
*
#if defined(RTS_GTK_FRONTPANEL)
#include "FrontPanel.h"
#endif
-#include <stddef.h>
/* STATIC OBJECT LIST.
*
/* -----------------------------------------------------------------------------
- * $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
*
{
StgPtr q;
const StgInfoTable* info;
- StgWord32 bitmap;
+ StgWord bitmap;
// highly similar to scavenge_stack, but we do pointer threading here.
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:
}
continue;
- // large bitmap (> 32 entries)
+ // large bitmap (> 32 entries, or 64 on a 64-bit machine)
case RET_BIG:
case RET_VEC_BIG:
{
for (i=0; i<large_bitmap->size; 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);
/* -----------------------------------------------------------------------------
- * $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
*
#ifndef STORAGEPRIV_H
#define STORAGEPRIV_H
+#include <stddef.h>
+
#define END_OF_STATIC_LIST stgCast(StgClosure*,1)
extern generation *generations;
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;