|
[ ghc-Bugs-604466 ] x86 NCG bug with stdcall f.i. "wrapper": msg#00078lang.haskell.glasgow.bugs
Bugs item #604466, was opened at 2002-09-04 03:08 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604466&group_id=8032 Category: Compiler (FFI) Group: 5.04 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Simon Marlow (simonmar) Assigned to: Simon Marlow (simonmar) >Summary: x86 NCG bug with stdcall f.i. "wrapper" Initial Comment: Original message from Sven Panne: HOpenGL did it once again... :-} The NCG for x86 doesn't honour the calling convention for "wrappers": -- example module ------------------------------------ module CB where import Foreign.C.Types ( CInt ) import Foreign.Ptr ( FunPtr ) type Callback = CInt -> IO () foreign import ccall "wrapper" makeCallback1 :: Callback -> IO (FunPtr Callback) foreign import stdcall "wrapper" makeCallback2 :: Callback -> IO (FunPtr Callback) -- shell transcript ---------------------------------- $ rm -f *.o ; ghc -c -fffi CB.hs ; nm *.o|grep _CB_d U _CB_dS1 U _CB_dS2 <= !!!!!!!!!! @8 is missing 00000008 T _CB_dS1 00000070 T _CB_dS2@8 $ rm -f *.o ; ghc -c -fffi CB.hs -O ; nm *.o|grep _CB_d U _CB_dUu@8 U _CB_dUv 00000070 T _CB_dUu@8 ------------------------------------------------------ I'd be grateful if this would be be fixed for the next patchlevel release. Cheers, S. ---------------------------------------------------------------------- >Comment By: Sigbjorn Finne (sigbjorn) Date: 2003-03-28 07:10 Message: Logged In: YES user_id=232905 ghc-HEAD-03282003's x86 NCG attributes stdcall labels correctly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=604466&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: -fwarn-unused-matches, Malcolm Wallace |
|---|---|
| Next by Date: | RE: -fwarn-unused-matches, Simon Peyton-Jones |
| Previous by Thread: | -fwarn-unused-matches, Serge D. Mechveliani |
| Next by Thread: | GHC rejects empty case, Lauri Alanko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |