diff options
Diffstat (limited to 'compiler/GHC/CmmToAsm/Config.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm/Config.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToAsm/Config.hs b/compiler/GHC/CmmToAsm/Config.hs index 6be6f17342..e6b5489b9e 100644 --- a/compiler/GHC/CmmToAsm/Config.hs +++ b/compiler/GHC/CmmToAsm/Config.hs @@ -2,6 +2,7 @@ module GHC.CmmToAsm.Config ( NCGConfig(..) , ncgWordWidth + , ncgSpillPreallocSize , platformWordWidth ) where @@ -20,7 +21,6 @@ data NCGConfig = NCGConfig , ncgInlineThresholdMemcpy :: !Word -- ^ If inlining `memcpy` produces less than this threshold (in pseudo-instruction unit), do it , ncgInlineThresholdMemset :: !Word -- ^ Ditto for `memset` , ncgSplitSections :: !Bool -- ^ Split sections - , ncgSpillPreallocSize :: !Int -- ^ Size in bytes of the pre-allocated spill space on the C stack , ncgRegsIterative :: !Bool , ncgAsmLinting :: !Bool -- ^ Perform ASM linting pass , ncgDoConstantFolding :: !Bool -- ^ Perform CMM constant folding @@ -35,6 +35,10 @@ data NCGConfig = NCGConfig ncgWordWidth :: NCGConfig -> Width ncgWordWidth config = platformWordWidth (ncgPlatform config) +-- | Size in bytes of the pre-allocated spill space on the C stack +ncgSpillPreallocSize :: NCGConfig -> Int +ncgSpillPreallocSize config = pc_RESERVED_C_STACK_BYTES (platformConstants (ncgPlatform config)) + -- | Return Word size platformWordWidth :: Platform -> Width platformWordWidth platform = case platformWordSize platform of |