diff options
Diffstat (limited to 'compiler/codeGen/CgStackery.lhs')
-rw-r--r-- | compiler/codeGen/CgStackery.lhs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/codeGen/CgStackery.lhs b/compiler/codeGen/CgStackery.lhs index a869795caa..217586a9d1 100644 --- a/compiler/codeGen/CgStackery.lhs +++ b/compiler/codeGen/CgStackery.lhs @@ -38,6 +38,7 @@ import OldCmm import OldCmmUtils import CLabel import Constants +import DynFlags import Util import OrdList import Outputable @@ -286,7 +287,8 @@ pushSpecUpdateFrame lbl updatee code when debugIsOn $ do { EndOfBlockInfo _ sequel <- getEndOfBlockInfo ; ; MASSERT(case sequel of { OnStack -> True; _ -> False}) } - ; allocStackTop (fixedHdrSize + + ; dflags <- getDynFlags + ; allocStackTop (fixedHdrSize dflags + sIZEOF_StgUpdateFrame_NoHdr `quot` wORD_SIZE) ; vsp <- getVirtSp ; setStackFrame vsp @@ -311,14 +313,16 @@ emitPushUpdateFrame = emitSpecPushUpdateFrame mkUpdInfoLabel emitSpecPushUpdateFrame :: CLabel -> CmmExpr -> CmmExpr -> Code emitSpecPushUpdateFrame lbl frame_addr updatee = do + dflags <- getDynFlags stmtsC [ -- Set the info word CmmStore frame_addr (mkLblExpr lbl) , -- And the updatee - CmmStore (cmmOffsetB frame_addr off_updatee) updatee ] + CmmStore (cmmOffsetB frame_addr (off_updatee dflags)) updatee ] initUpdFrameProf frame_addr -off_updatee :: ByteOff -off_updatee = fixedHdrSize*wORD_SIZE + oFFSET_StgUpdateFrame_updatee +off_updatee :: DynFlags -> ByteOff +off_updatee dflags + = fixedHdrSize dflags * wORD_SIZE + oFFSET_StgUpdateFrame_updatee \end{code} |