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 11/25/2013 09:37 AM, Jakub Jelinek wrote:
> On Mon, Nov 25, 2013 at 09:28:52AM +0000, Andrew Haley wrote:
>> On 11/25/2013 02:45 AM, Hogan, D. (GE Power & Water) wrote:
>>> I'm requesting feedback on an implementation of variadic closures in
>>> libffi.  It currently supports x86 and x86_64.  This change allows for
>>> FMI logging callbacks through JNA in the JFMI[1] and Ptolemy II[2]
>>> projects.  The libffi changes are in a github branch[3].
>>
>> Why is this necessary?  I thought that the variadic calling conventions
>> on x86 were the same as the non-variadic ones.
> 
> On x86 they are, on x86_64 they are not (%rax register must contain the
> number of floating point varargs arguments AFAIK).

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.

Andrew.


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