diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-18 11:18:47 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-18 11:18:47 +0000 |
commit | bd78c94a3b41f8d2097efc0415fa26e0cd1140ef (patch) | |
tree | 72ce0126788012594c474276392ec0071046f318 /compiler/codeGen | |
parent | 8b18faef8aeaf40150c208272a2fc117611e8ae8 (diff) | |
download | haskell-bd78c94a3b41f8d2097efc0415fa26e0cd1140ef.tar.gz |
Fixes to "Retract Hp *before* checking for HpLim==0"
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/CgForeignCall.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/codeGen/CgForeignCall.hs b/compiler/codeGen/CgForeignCall.hs index cf99f316c3..87c82cb3ba 100644 --- a/compiler/codeGen/CgForeignCall.hs +++ b/compiler/codeGen/CgForeignCall.hs @@ -212,7 +212,11 @@ emitLoadThreadState = do bWord), -- SpLim = tso->stack + RESERVED_STACK_WORDS; CmmAssign spLim (cmmOffsetW (cmmOffset (CmmReg (CmmLocal tso)) tso_STACK) - rESERVED_STACK_WORDS) + rESERVED_STACK_WORDS), + -- HpAlloc = 0; + -- HpAlloc is assumed to be set to non-zero only by a failed + -- a heap check, see HeapStackCheck.cmm:GC_GENERIC + CmmAssign hpAlloc (CmmLit zeroCLit) ] emitOpenNursery -- and load the current cost centre stack from the TSO when profiling: @@ -267,13 +271,14 @@ stgHp = CmmReg hp stgCurrentTSO = CmmReg currentTSO stgCurrentNursery = CmmReg currentNursery -sp, spLim, hp, hpLim, currentTSO, currentNursery :: CmmReg +sp, spLim, hp, hpLim, currentTSO, currentNursery, hpAlloc :: CmmReg sp = CmmGlobal Sp spLim = CmmGlobal SpLim hp = CmmGlobal Hp hpLim = CmmGlobal HpLim currentTSO = CmmGlobal CurrentTSO currentNursery = CmmGlobal CurrentNursery +hpAlloc = CmmGlobal HpAlloc -- ----------------------------------------------------------------------------- -- For certain types passed to foreign calls, we adjust the actual |