diff options
| author | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
| commit | e6ef5ab66f51a8b821a4ae8646faca19cf600d94 (patch) | |
| tree | 0ac8f5178caa80f1fabc3da22e46db8cb19a553a /compiler/cmm/CmmParse.y | |
| parent | 8e7fb28fc89eb9b99c747698f41995c269cd1090 (diff) | |
| download | haskell-e6ef5ab66f51a8b821a4ae8646faca19cf600d94.tar.gz | |
Make tablesNextToCode "dynamic"
This is a bit odd by itself, but it's a stepping stone on the way to
putting "target unregisterised" into the settings file.
Diffstat (limited to 'compiler/cmm/CmmParse.y')
| -rw-r--r-- | compiler/cmm/CmmParse.y | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y index f14aa9c987..cd8dc6c711 100644 --- a/compiler/cmm/CmmParse.y +++ b/compiler/cmm/CmmParse.y @@ -656,11 +656,11 @@ exprOp name args_code = do exprMacros :: DynFlags -> UniqFM ([CmmExpr] -> CmmExpr) exprMacros dflags = listToUFM [ - ( fsLit "ENTRY_CODE", \ [x] -> entryCode x ), + ( fsLit "ENTRY_CODE", \ [x] -> entryCode dflags x ), ( fsLit "INFO_PTR", \ [x] -> closureInfoPtr x ), ( fsLit "STD_INFO", \ [x] -> infoTable dflags x ), ( fsLit "FUN_INFO", \ [x] -> funInfoTable dflags x ), - ( fsLit "GET_ENTRY", \ [x] -> entryCode (closureInfoPtr x) ), + ( fsLit "GET_ENTRY", \ [x] -> entryCode dflags (closureInfoPtr x) ), ( fsLit "GET_STD_INFO", \ [x] -> infoTable dflags (closureInfoPtr x) ), ( fsLit "GET_FUN_INFO", \ [x] -> funInfoTable dflags (closureInfoPtr x) ), ( fsLit "INFO_TYPE", \ [x] -> infoTableClosureType dflags x ), @@ -932,13 +932,14 @@ doStore rep addr_code val_code -- Return an unboxed tuple. emitRetUT :: [(CgRep,CmmExpr)] -> Code emitRetUT args = do + dflags <- getDynFlags tickyUnboxedTupleReturn (length args) -- TICK (sp, stmts, live) <- pushUnboxedTuple 0 args emitSimultaneously stmts -- NB. the args might overlap with the stack slots -- or regs that we assign to, so better use -- simultaneous assignments here (#3546) when (sp /= 0) $ stmtC (CmmAssign spReg (cmmRegOffW spReg (-sp))) - stmtC $ CmmJump (entryCode (CmmLoad (cmmRegOffW spReg sp) bWord)) (Just live) + stmtC $ CmmJump (entryCode dflags (CmmLoad (cmmRegOffW spReg sp) bWord)) (Just live) -- ----------------------------------------------------------------------------- -- If-then-else and boolean expressions |
