libffi stdcall closures

Timothy Wall twall@users.sf.net
Thu Nov 8 16:09:00 GMT 2007


I'm working on a patch for win32/x86 stdcall closures to support JNA  
(http://jna.dev.java.net), a ctypes-like library for Java.  I'm  
working off of a libffi snapshot from the gcc trunk.

I've got the closure code working now, and I need some pointers on  
adding a win32-only stdcall callback test to the testsuite (or a  
general one if stdcall is supported elsewhere).

I'm running the testsuite under cygwin, which works except for about  
4 failures unrelated to what I'm working on.

Oddly enough, some stdcall closures would work while others would not  
(seems to be tied to the caller environment as opposed to the number  
of closure arguments).   Probably has to do with whether the caller  
is maintaining a frame pointer or whether it relies entirely on the  
stack pointer.

Timothy Wall
http://abbot.sf.net

PS Please CC me explicitly; I'm not subscribed to gcc-patches.




More information about the Gcc-patches mailing list