[commit: ghc] newcg: fix the updfr offset in the jump after newCAF (e85a877)
Simon Marlow
marlowsd at gmail.com
Wed Mar 7 16:08:21 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : newcg
http://hackage.haskell.org/trac/ghc/changeset/e85a8771e657d5f62336ff72e256e0d11346c14b
>---------------------------------------------------------------
commit e85a8771e657d5f62336ff72e256e0d11346c14b
Author: Simon Marlow <marlowsd at gmail.com>
Date: Wed Mar 7 14:55:18 2012 +0000
fix the updfr offset in the jump after newCAF
>---------------------------------------------------------------
compiler/codeGen/StgCmmBind.hs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compiler/codeGen/StgCmmBind.hs b/compiler/codeGen/StgCmmBind.hs
index 7dbc995..5838628 100644
--- a/compiler/codeGen/StgCmmBind.hs
+++ b/compiler/codeGen/StgCmmBind.hs
@@ -660,13 +660,14 @@ link_caf _is_upd = do
-- node is live, so save it.
-- see Note [atomic CAF entry] in rts/sm/Storage.c
+ ; updfr <- getUpdFrameOff
; emit =<< mkCmmIfThen
(CmmMachOp mo_wordEq [ CmmReg (CmmLocal ret), CmmLit zeroCLit])
-- re-enter R1. Doing this directly is slightly dodgy; we're
-- assuming lots of things, like the stack pointer hasn't
-- moved since we entered the CAF.
(let target = entryCode (closureInfoPtr (CmmReg nodeReg)) in
- mkJump target [] 0)
+ mkJump target [] updfr)
; return hp_rel }
More information about the Cvs-ghc
mailing list