summaryrefslogtreecommitdiff
path: root/compiler/codeGen/CgCon.lhs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-14 13:57:48 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-14 13:57:48 +0100
commit041e832cf0ef490dd0d4fd24d56a2f7f1adb5c9c (patch)
treed22a1cbf361f5cdf60cd35205638e2419c0db6f3 /compiler/codeGen/CgCon.lhs
parent291da8a0624d3844d30931d0e89f51e3daf03a61 (diff)
downloadhaskell-041e832cf0ef490dd0d4fd24d56a2f7f1adb5c9c.tar.gz
Move some more constants fo platformConstants
Diffstat (limited to 'compiler/codeGen/CgCon.lhs')
-rw-r--r--compiler/codeGen/CgCon.lhs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/codeGen/CgCon.lhs b/compiler/codeGen/CgCon.lhs
index 57fd10d4e4..8afbc8f64e 100644
--- a/compiler/codeGen/CgCon.lhs
+++ b/compiler/codeGen/CgCon.lhs
@@ -36,7 +36,6 @@ import OldCmmUtils
import OldCmm
import SMRep
import CostCentre
-import Constants
import TyCon
import DataCon
import Id
@@ -189,9 +188,9 @@ buildDynCon' dflags platform binder _ con [arg_amode]
, platformOS platform /= OSMinGW32 || not (dopt Opt_PIC dflags)
, (_, CmmLit (CmmInt val _)) <- arg_amode
, let val_int = (fromIntegral val) :: Int
- , val_int <= mAX_INTLIKE && val_int >= mIN_INTLIKE
+ , val_int <= mAX_INTLIKE dflags && val_int >= mIN_INTLIKE dflags
= do { let intlike_lbl = mkCmmGcPtrLabel rtsPackageId (fsLit "stg_INTLIKE_closure")
- offsetW = (val_int - mIN_INTLIKE) * (fixedHdrSize dflags + 1)
+ offsetW = (val_int - mIN_INTLIKE dflags) * (fixedHdrSize dflags + 1)
-- INTLIKE closures consist of a header and one word payload
intlike_amode = CmmLit (cmmLabelOffW intlike_lbl offsetW)
; returnFC (taggedStableIdInfo binder intlike_amode (mkConLFInfo con) con) }
@@ -201,9 +200,9 @@ buildDynCon' dflags platform binder _ con [arg_amode]
, platformOS platform /= OSMinGW32 || not (dopt Opt_PIC dflags)
, (_, CmmLit (CmmInt val _)) <- arg_amode
, let val_int = (fromIntegral val) :: Int
- , val_int <= mAX_CHARLIKE && val_int >= mIN_CHARLIKE
+ , val_int <= mAX_CHARLIKE dflags && val_int >= mIN_CHARLIKE dflags
= do { let charlike_lbl = mkCmmGcPtrLabel rtsPackageId (fsLit "stg_CHARLIKE_closure")
- offsetW = (val_int - mIN_CHARLIKE) * (fixedHdrSize dflags + 1)
+ offsetW = (val_int - mIN_CHARLIKE dflags) * (fixedHdrSize dflags + 1)
-- CHARLIKE closures consist of a header and one word payload
charlike_amode = CmmLit (cmmLabelOffW charlike_lbl offsetW)
; returnFC (taggedStableIdInfo binder charlike_amode (mkConLFInfo con) con) }