X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeAsm.lhs;fp=compiler%2Fghci%2FByteCodeAsm.lhs;h=2c7473b80c54eceeac9839075a31581e64e1d756;hp=dfc77e51b20b02698cf14f940431f8e8bc1ef8cf;hb=ca53c38335cdc671f0b1e0949aa1514fc3fd72a5;hpb=4f8d714962667c219de4e684fe069136a0f78729 diff --git a/compiler/ghci/ByteCodeAsm.lhs b/compiler/ghci/ByteCodeAsm.lhs index dfc77e5..2c7473b 100644 --- a/compiler/ghci/ByteCodeAsm.lhs +++ b/compiler/ghci/ByteCodeAsm.lhs @@ -31,6 +31,7 @@ import Constants import FastString import SMRep import Outputable +import Config import Control.Monad ( foldM ) import Control.Monad.ST ( runST ) @@ -44,6 +45,7 @@ import Data.Char ( ord ) import Data.List import Data.Map (Map) import qualified Data.Map as Map +import Distribution.System import GHC.Base ( ByteArray#, MutableByteArray#, RealWorld ) @@ -395,12 +397,11 @@ mkBits findLabel st proto_insns = do st_l1 <- addToSS st_l0 (BCONPtrItbl (getName dcon)) return (sizeSS16 st_l0, (st_i0,st_l1,st_p0)) -#ifdef mingw32_TARGET_OS literal st (MachLabel fs (Just sz) _) + | cTargetOS == Windows = 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)