This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] port libffi to x86/msvc



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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]