summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmUtils.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-11-29 10:32:26 +0000
committerJohan Tibell <johan.tibell@gmail.com>2014-03-11 20:01:54 +0100
commita70e7b4762c75812254f7781bcd48139c4ec40dd (patch)
tree0a1641c4edf3b78277f86cee225333d211b1f4af /compiler/codeGen/StgCmmUtils.hs
parent22f010e08e58ba40b0ab59ec7a7c02cce0938cce (diff)
downloadhaskell-a70e7b4762c75812254f7781bcd48139c4ec40dd.tar.gz
Represent offsets into heap objects with byte, not word, offsets
I'd like to be able to pack together non-pointer fields that are less than a word in size, and this is a necessary prerequisite.
Diffstat (limited to 'compiler/codeGen/StgCmmUtils.hs')
-rw-r--r--compiler/codeGen/StgCmmUtils.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs
index 45b0f0c785..1c6c3f2eae 100644
--- a/compiler/codeGen/StgCmmUtils.hs
+++ b/compiler/codeGen/StgCmmUtils.hs
@@ -142,7 +142,8 @@ addToMemE rep ptr n
--
-------------------------------------------------------------------------
-mkTaggedObjectLoad :: DynFlags -> LocalReg -> LocalReg -> WordOff -> DynTag -> CmmAGraph
+mkTaggedObjectLoad
+ :: DynFlags -> LocalReg -> LocalReg -> ByteOff -> DynTag -> CmmAGraph
-- (loadTaggedObjectField reg base off tag) generates assignment
-- reg = bitsK[ base + off - tag ]
-- where K is fixed by 'reg'
@@ -150,7 +151,7 @@ mkTaggedObjectLoad dflags reg base offset tag
= mkAssign (CmmLocal reg)
(CmmLoad (cmmOffsetB dflags
(CmmReg (CmmLocal base))
- (wORD_SIZE dflags * offset - tag))
+ (offset - tag))
(localRegType reg))
-------------------------------------------------------------------------