[patch] port libffi to x86/msvc
Timothy Wall
twalljava@dev.java.net
Thu Jan 14 02:21:00 GMT 2010
On Jan 13, 2010, at 6:40 PM, Dan Witte wrote:
>
> Patch descriptions are below. The first patch consolidates the stack
> space allocation code; it's currently fragmented between
> ffi_prep_cif and ffi_prep_cif_machdep depending on X86, X86_DARWIN,
> or X86_WIN64, which made it somewhat hard to read. The second merges
> ffi_call_SYSV and ffi_call_STDCALL since they're identical. The
> third fixes a few MSVC syntax errors and adds the assembly routines.
I haven't looked at the patch yet, but ffi_call_SYSV and
ffi_call_STDCALL are not identical, since stdcall must pop its own
args from the stack. I think I originally wrote it to share code
between two functions, with only a little bit on the ends for stdcall,
but someone added some debug/stack metadata that required the two
functions be distinct, thus the duplicated code.
More information about the Libffi-discuss
mailing list