diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-08-28 16:09:50 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-08-31 16:43:58 +0100 |
commit | de3a8f7631b5276c30c90a256e8135a8ff3095e7 (patch) | |
tree | 4c90507007f4ead15548f2002a0ff5d237f95a6e /compiler/codeGen/CgHeapery.lhs | |
parent | 8aabe8d06f7202c9a6cd1133e0b1ebc81338eed9 (diff) | |
download | haskell-de3a8f7631b5276c30c90a256e8135a8ff3095e7.tar.gz |
Cleanup: add mkIntExpr and zeroExpr utils
Diffstat (limited to 'compiler/codeGen/CgHeapery.lhs')
-rw-r--r-- | compiler/codeGen/CgHeapery.lhs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/codeGen/CgHeapery.lhs b/compiler/codeGen/CgHeapery.lhs index 2ce37cf565..98d08f9ea1 100644 --- a/compiler/codeGen/CgHeapery.lhs +++ b/compiler/codeGen/CgHeapery.lhs @@ -462,8 +462,8 @@ do_checks _ hp _ _ _ "structures in the code."]) do_checks stk hp reg_save_code rts_lbl live - = do_checks' (CmmLit (mkIntCLit (stk*wORD_SIZE))) - (CmmLit (mkIntCLit (hp*wORD_SIZE))) + = do_checks' (mkIntExpr (stk*wORD_SIZE)) + (mkIntExpr (hp*wORD_SIZE)) (stk /= 0) (hp /= 0) reg_save_code rts_lbl live -- The offsets are now in *bytes* @@ -528,7 +528,7 @@ hpChkGen :: CmmExpr -> CmmExpr -> CmmExpr -> Code hpChkGen bytes liveness reentry = do dflags <- getDynFlags let platform = targetPlatform dflags - do_checks' (CmmLit (mkIntCLit 0)) bytes False True assigns + do_checks' zeroExpr bytes False True assigns stg_gc_gen (Just (activeStgRegs platform)) where assigns = mkStmts [ mk_vanilla_assignment 9 liveness, @@ -538,7 +538,7 @@ hpChkGen bytes liveness reentry -- we want to assign to Sp[0] on failure (used in AutoApply.cmm:BUILD_PAP). hpChkNodePointsAssignSp0 :: CmmExpr -> CmmExpr -> Code hpChkNodePointsAssignSp0 bytes sp0 - = do_checks' (CmmLit (mkIntCLit 0)) bytes False True assign + = do_checks' zeroExpr bytes False True assign stg_gc_enter1 (Just [node]) where assign = oneStmt (CmmStore (CmmReg spReg) sp0) @@ -546,7 +546,7 @@ stkChkGen :: CmmExpr -> CmmExpr -> CmmExpr -> Code stkChkGen bytes liveness reentry = do dflags <- getDynFlags let platform = targetPlatform dflags - do_checks' bytes (CmmLit (mkIntCLit 0)) True False assigns + do_checks' bytes zeroExpr True False assigns stg_gc_gen (Just (activeStgRegs platform)) where assigns = mkStmts [ mk_vanilla_assignment 9 liveness, @@ -558,7 +558,7 @@ mk_vanilla_assignment n e stkChkNodePoints :: CmmExpr -> Code stkChkNodePoints bytes - = do_checks' bytes (CmmLit (mkIntCLit 0)) True False noStmts + = do_checks' bytes zeroExpr True False noStmts stg_gc_enter1 (Just [node]) stg_gc_gen :: CmmExpr |