diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-25 17:37:55 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-18 23:08:35 -0400 |
commit | d4a0be758003f32b9d9d89cfd14b9839ac002f4d (patch) | |
tree | 2ced620f7598d9e71882be08b027a7ce9e448be2 /compiler/GHC/Cmm/Parser.y | |
parent | 2af0ec9059b94e1fa6b37eda60216e0222e1a53d (diff) | |
download | haskell-d4a0be758003f32b9d9d89cfd14b9839ac002f4d.tar.gz |
Move tablesNextToCode field into Platform
tablesNextToCode is a platform setting and doesn't belong into DynFlags
(#17957). Doing this is also a prerequisite to fix #14335 where we deal
with two platforms (target and host) that may have different platform
settings.
Diffstat (limited to 'compiler/GHC/Cmm/Parser.y')
-rw-r--r-- | compiler/GHC/Cmm/Parser.y | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Cmm/Parser.y b/compiler/GHC/Cmm/Parser.y index 41d5d3d6d6..1c9f0ad041 100644 --- a/compiler/GHC/Cmm/Parser.y +++ b/compiler/GHC/Cmm/Parser.y @@ -909,17 +909,18 @@ exprOp name args_code = do exprMacros :: DynFlags -> UniqFM ([CmmExpr] -> CmmExpr) exprMacros dflags = listToUFM [ - ( fsLit "ENTRY_CODE", \ [x] -> entryCode dflags x ), + ( fsLit "ENTRY_CODE", \ [x] -> entryCode platform x ), ( fsLit "INFO_PTR", \ [x] -> closureInfoPtr dflags x ), ( fsLit "STD_INFO", \ [x] -> infoTable dflags x ), ( fsLit "FUN_INFO", \ [x] -> funInfoTable dflags x ), - ( fsLit "GET_ENTRY", \ [x] -> entryCode dflags (closureInfoPtr dflags x) ), + ( fsLit "GET_ENTRY", \ [x] -> entryCode platform (closureInfoPtr dflags x) ), ( fsLit "GET_STD_INFO", \ [x] -> infoTable dflags (closureInfoPtr dflags x) ), ( fsLit "GET_FUN_INFO", \ [x] -> funInfoTable dflags (closureInfoPtr dflags x) ), ( fsLit "INFO_TYPE", \ [x] -> infoTableClosureType dflags x ), ( fsLit "INFO_PTRS", \ [x] -> infoTablePtrs dflags x ), ( fsLit "INFO_NPTRS", \ [x] -> infoTableNonPtrs dflags x ) ] + where platform = targetPlatform dflags -- we understand a subset of C-- primitives: machOps = listToUFM $ @@ -1213,7 +1214,7 @@ doReturn exprs_code = do mkReturnSimple :: DynFlags -> [CmmActual] -> UpdFrameOffset -> CmmAGraph mkReturnSimple dflags actuals updfr_off = mkReturn dflags e actuals updfr_off - where e = entryCode dflags (CmmLoad (CmmStackSlot Old updfr_off) + where e = entryCode platform (CmmLoad (CmmStackSlot Old updfr_off) (gcWord platform)) platform = targetPlatform dflags |