summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgHeapery.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-16 17:45:03 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-16 17:45:03 +0100
commit17910899dacc892fd652d9206340d2bc2b2c5fc1 (patch)
treec39b870bea8c77390c19e6d9694d38aa931fc2ed /compiler/codeGen/CgHeapery.lhs
parenta62b56ef0b9d1750289ffd3f77b578dc73452374 (diff)
downloadhaskell-17910899dacc892fd652d9206340d2bc2b2c5fc1.tar.gz
Move wORD_SIZE into platformConstants
Diffstat (limited to 'compiler/codeGen/CgHeapery.lhs')
-rw-r--r--compiler/codeGen/CgHeapery.lhs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/codeGen/CgHeapery.lhs b/compiler/codeGen/CgHeapery.lhs
index f3cb7796f4..c7f6f294ce 100644
--- a/compiler/codeGen/CgHeapery.lhs
+++ b/compiler/codeGen/CgHeapery.lhs
@@ -42,7 +42,6 @@ import TyCon
import CostCentre
import Util
import Module
-import Constants
import Outputable
import DynFlags
import FastString
@@ -103,8 +102,9 @@ setRealHp new_realHp
getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
getHpRelOffset virtual_offset
- = do { hp_usg <- getHpUsage
- ; return (cmmRegOffW hpReg (hpRel (realHp hp_usg) virtual_offset)) }
+ = do { dflags <- getDynFlags
+ ; hp_usg <- getHpUsage
+ ; return (cmmRegOffW dflags hpReg (hpRel (realHp hp_usg) virtual_offset)) }
\end{code}
@@ -165,7 +165,7 @@ mkVirtHeapOffsets dflags is_thunk things
| otherwise = fixedHdrSize dflags
computeOffset wds_so_far (rep, thing)
- = (wds_so_far + cgRepSizeW rep, (thing, hdr_size + wds_so_far))
+ = (wds_so_far + cgRepSizeW dflags rep, (thing, hdr_size + wds_so_far))
\end{code}
@@ -244,7 +244,7 @@ mkStaticClosure dflags info_lbl ccs payload padding_wds static_link_field saved_
padLitToWord :: DynFlags -> CmmLit -> [CmmLit]
padLitToWord dflags lit = lit : padding pad_length
where width = typeWidth (cmmLitType dflags lit)
- pad_length = wORD_SIZE - widthInBytes width :: Int
+ pad_length = wORD_SIZE dflags - widthInBytes width :: Int
padding n | n <= 0 = []
| n `rem` 2 /= 0 = CmmInt 0 W8 : padding (n-1)
@@ -461,8 +461,8 @@ do_checks stk hp reg_save_code rts_lbl live
"See: http://hackage.haskell.org/trac/ghc/ticket/4505",
"Suggestion: read data from a file instead of having large static data",
"structures in the code."])
- else do_checks' (mkIntExpr dflags (stk * wORD_SIZE))
- (mkIntExpr dflags (hp * wORD_SIZE))
+ else do_checks' (mkIntExpr dflags (stk * wORD_SIZE dflags))
+ (mkIntExpr dflags (hp * wORD_SIZE dflags))
(stk /= 0) (hp /= 0) reg_save_code rts_lbl live
-- The offsets are now in *bytes*