summaryrefslogtreecommitdiff
path: root/compiler/ghci/ByteCodeAsm.lhs
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-02-21 09:29:50 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-02-21 09:29:50 +0000
commitb2b9ba4a8872f1dcc69e2801fb42c2543bf36b52 (patch)
tree6bf1bb7a565c186f6ddc0e93576298c78598b0e5 /compiler/ghci/ByteCodeAsm.lhs
parentdc8d5354bfd92e09973d11c4c3d8728f2da107ba (diff)
downloadhaskell-b2b9ba4a8872f1dcc69e2801fb42c2543bf36b52.tar.gz
MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)
Diffstat (limited to 'compiler/ghci/ByteCodeAsm.lhs')
-rw-r--r--compiler/ghci/ByteCodeAsm.lhs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs
index f1f5c8a12f..1491f55a46 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)