summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmm.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-10-11 10:35:14 +0100
committerSimon Marlow <marlowsd@gmail.com>2013-10-11 10:37:02 +0100
commit83be3d7b8881eca63adf834e425e6799e572bd1f (patch)
treec810919459e70599b51e094be3d7e8024c4f1307 /compiler/codeGen/StgCmm.hs
parent8ea8c371f345e3a265d425b37e793d8b553a1588 (diff)
downloadhaskell-83be3d7b8881eca63adf834e425e6799e572bd1f.tar.gz
Fix a bug in the canned selector code when profiling.
Diffstat (limited to 'compiler/codeGen/StgCmm.hs')
-rw-r--r--compiler/codeGen/StgCmm.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmm.hs b/compiler/codeGen/StgCmm.hs
index bf950c4158..a92f80439b 100644
--- a/compiler/codeGen/StgCmm.hs
+++ b/compiler/codeGen/StgCmm.hs
@@ -233,7 +233,12 @@ cgDataCon data_con
$ mk_code ticky_code
mk_code ticky_code
- = -- NB: We don't set CC when entering data (WDP 94/06)
+ = -- NB: the closure pointer is assumed *untagged* on
+ -- entry to a constructor. If the pointer is tagged,
+ -- then we should not be entering it. This assumption
+ -- is used in ldvEnter and when tagging the pointer to
+ -- return it.
+ -- NB 2: We don't set CC when entering data (WDP 94/06)
do { _ <- ticky_code
; ldvEnter (CmmReg nodeReg)
; tickyReturnOldCon (length arg_things)