summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmCon.hs
diff options
context:
space:
mode:
authorBen.Lippmeier@anu.edu.au <unknown>2009-11-14 06:04:55 +0000
committerBen.Lippmeier@anu.edu.au <unknown>2009-11-14 06:04:55 +0000
commit8c84944d5782f2ee60d96c02977f15ba9e7ab935 (patch)
tree60e3d7766fc4057286f6a12f56398f5d761cbe98 /compiler/codeGen/StgCmmCon.hs
parentfcf0225457abec189ea630163fa56bc48c2d796d (diff)
downloadhaskell-8c84944d5782f2ee60d96c02977f15ba9e7ab935.tar.gz
Don't share low valued Int and Char closures with Windows DLLs
Diffstat (limited to 'compiler/codeGen/StgCmmCon.hs')
-rw-r--r--compiler/codeGen/StgCmmCon.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs
index 452a352bab..18c2509ccd 100644
--- a/compiler/codeGen/StgCmmCon.hs
+++ b/compiler/codeGen/StgCmmCon.hs
@@ -147,8 +147,13 @@ work with any old argument, but for @Int@-like ones the argument has
to be a literal. Reason: @Char@ like closures have an argument type
which is guaranteed in range.
-Because of this, we use can safely return an addressing mode. -}
+Because of this, we use can safely return an addressing mode.
+We don't support this optimisation when compiling into Windows DLLs yet
+because they don't support cross package data references well.
+-}
+
+#if !(defined(__PIC__) && defined(mingw32_HOST_OS))
buildDynCon binder _cc con [arg]
| maybeIntLikeCon con
, StgLitArg (MachInt val) <- arg
@@ -172,6 +177,7 @@ buildDynCon binder _cc con [arg]
-- CHARLIKE closures consist of a header and one word payload
charlike_amode = cmmLabelOffW charlike_lbl offsetW
; return (litIdInfo binder (mkConLFInfo con) charlike_amode, mkNop) }
+#endif
-------- buildDynCon: the general case -----------
buildDynCon binder ccs con args