From: Simon Marlow Date: Wed, 21 Feb 2007 09:29:50 +0000 (+0000) Subject: MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci) X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b2b9ba4a8872f1dcc69e2801fb42c2543bf36b52 MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci) --- 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)