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: RFC: variadic closures in x86/x86_64


On Mon, Nov 25, 2013 at 10:10:37AM +0000, Andrew Haley wrote:
> Sure, but we don't need a new libffi interface to do that.  We need
> only to set %rax.  And we can just do that anyway; it doesn't hurt.
> 
> I must be missing something.

The claim to fame looks to be the ability to call variadic functions
without describing the arguments via ffi_prep_cif_var at the point of
call.  Instead you do so in the function consuming the args.  I'm not
sure what that gains you..

The patch suffers from the same flaw as my first attempt at adding
variadic argument support for PowerPC64 ELFv2, namely that you cannot
add fields to ffi_cif without breaking ABI compatibility.
Applications linked against an older version of libffi.so will supply
the old ffi_cif to a new shared library..

Oh, and gcc still contains the first attempt since no one has yet
approved an import from libffi to cure the problem.

-- 
Alan Modra
Australia Development Lab, IBM


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