From 8c84944d5782f2ee60d96c02977f15ba9e7ab935 Mon Sep 17 00:00:00 2001 From: "Ben.Lippmeier@anu.edu.au" Date: Sat, 14 Nov 2009 06:04:55 +0000 Subject: Don't share low valued Int and Char closures with Windows DLLs --- compiler/codeGen/CgCon.lhs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'compiler/codeGen/CgCon.lhs') diff --git a/compiler/codeGen/CgCon.lhs b/compiler/codeGen/CgCon.lhs index 89a4e84400..36c851d5ba 100644 --- a/compiler/codeGen/CgCon.lhs +++ b/compiler/codeGen/CgCon.lhs @@ -165,7 +165,13 @@ which is guaranteed in range. 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. + \begin{code} + + +#if !(defined(__PIC__) && defined(mingw32_HOST_OS)) buildDynCon binder _ con [arg_amode] | maybeIntLikeCon con , (_, CmmLit (CmmInt val _)) <- arg_amode @@ -187,6 +193,8 @@ buildDynCon binder _ con [arg_amode] -- 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) } +#endif + \end{code} Now the general case. -- cgit v1.2.1