projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dc8d535
)
MERGE from 6.6: Windows fix for stdcall foreign-import-wrapper, fixes ffi012(ghci)
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 21 Feb 2007 09:29:50 +0000
(09:29 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 21 Feb 2007 09:29:50 +0000
(09:29 +0000)
compiler/ghci/ByteCodeAsm.lhs
patch
|
blob
|
history
diff --git
a/compiler/ghci/ByteCodeAsm.lhs
b/compiler/ghci/ByteCodeAsm.lhs
index
f1f5c8a
..
1491f55
100644
(file)
--- 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))
= 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)
literal st (MachLabel fs _) = litlabel st fs
literal st (MachWord w) = int st (fromIntegral w)
literal st (MachInt j) = int st (fromIntegral j)