summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmInfo.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-18 23:22:20 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-18 23:22:20 +0100
commita9b986e2fe285f844e42e573e4887a4e36ba92d4 (patch)
tree30509b6c6aa091125089208631c146ca72793758 /compiler/cmm/CmmInfo.hs
parent3a4c64c1a2953bbc759a6f5c99dad31ab50dc96b (diff)
downloadhaskell-a9b986e2fe285f844e42e573e4887a4e36ba92d4.tar.gz
Make StgWord a portable type too
StgWord is a newtyped Word64, as it needed to be something that has a UArray instance.
Diffstat (limited to 'compiler/cmm/CmmInfo.hs')
-rw-r--r--compiler/cmm/CmmInfo.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
index 4dd74438ac..9d335c6f7b 100644
--- a/compiler/cmm/CmmInfo.hs
+++ b/compiler/cmm/CmmInfo.hs
@@ -321,13 +321,13 @@ mkLivenessBits dflags liveness
bitmap = mkBitmap dflags liveness
small_bitmap = case bitmap of
- [] -> 0
+ [] -> toStgWord dflags 0
[b] -> b
_ -> panic "mkLiveness"
- bitmap_word = fromIntegral n_bits
+ bitmap_word = toStgWord dflags (fromIntegral n_bits)
.|. (small_bitmap `shiftL` bITMAP_BITS_SHIFT dflags)
- lits = mkWordCLit dflags (fromIntegral n_bits) : map (mkWordCLit dflags) bitmap
+ lits = mkWordCLit dflags (toStgWord dflags (fromIntegral n_bits)) : map (mkWordCLit dflags) bitmap
-- The first word is the size. The structure must match
-- StgLargeBitmap in includes/rts/storage/InfoTable.h