From 0e6d231b8eef0aae3419f1104c98db1f5c25aa99 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 29 Apr 2005 16:18:58 +0000 Subject: [PATCH] [project @ 2005-04-29 16:18:58 by simonmar] (from 1.4.6.1 on 6-4-branch) Fix some incorrect use of int/nat that breaks x86_64 --- ghc/rts/GCCompact.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/rts/GCCompact.h b/ghc/rts/GCCompact.h index 711b57b..6dece4f 100644 --- a/ghc/rts/GCCompact.h +++ b/ghc/rts/GCCompact.h @@ -12,7 +12,7 @@ mark(StgPtr p, bdescr *bd) nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); *bitmap_word |= bit_mask; } @@ -22,17 +22,17 @@ unmark(StgPtr p, bdescr *bd) nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); *bitmap_word &= ~bit_mask; } -INLINE_HEADER int +INLINE_HEADER StgWord is_marked(StgPtr p, bdescr *bd) { nat offset_within_block = p - bd->start; // in words StgPtr bitmap_word = (StgPtr)bd->u.bitmap + (offset_within_block / (sizeof(W_)*BITS_PER_BYTE)); - nat bit_mask = 1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); + StgWord bit_mask = (StgWord)1 << (offset_within_block & (sizeof(W_)*BITS_PER_BYTE - 1)); return (*bitmap_word & bit_mask); } -- 1.7.10.4