From b2b9ba4a8872f1dcc69e2801fb42c2543bf36b52 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 21 Feb 2007 09:29:50 +0000 Subject: [PATCH] MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci) --- compiler/ghci/ByteCodeAsm.lhs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index f1f5c8a..1491f55 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -370,6 +370,12 @@ mkBits findLabel st proto_insns = do st_I1 <- addToSS st_I0 (getName dcon) return (sizeSS st_I0, (st_i0,st_l0,st_p0,st_I1)) +#ifdef mingw32_TARGET_OS + literal st (MachLabel fs (Just sz)) + = litlabel st (appendFS fs (mkFastString ('@':show sz))) + -- On Windows, stdcall labels have a suffix indicating the no. of + -- arg words, e.g. foo@8. testcase: ffi012(ghci) +#endif literal st (MachLabel fs _) = litlabel st fs literal st (MachWord w) = int st (fromIntegral w) literal st (MachInt j) = int st (fromIntegral j) -- 1.7.10.4