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] Add variadic support


On 23 February 2011 13:25, Chung-Lin Tang <cltang@linaro.org> wrote:
> On 2011/2/23 09:11 PM, David Gilbert wrote:
>> In ARM's ffi_prep_cif_machdep I have:
>>
>> +#ifdef __ARM_PCS_VFP
>> + ?/* VFP uses the standard ABI for variadic functions */
>> + ?if ((cif->abi == FFI_VFP) && (cif->nfixedargs != 0))
>> + ? ?cif->abi = FFI_SYSV;
>> +#endif
>>
>> and that's the only active change that's needed.
>
> I suggest removing the #ifdef __ARM_PCS_VFP #ifdef. ?We always have
> support for both FFI_SYSV and FFI_VFP compiled in, so it doesn't make
> sense to leave this bit of logic out when we are under __ARM_PCS.

I could do, although cif->nfixedargs is also not present except in the
VFP case, so
it would still need an ifdef.

I did that since I thought it best not to change the layout of the CIF
structure for
existing ARM builds.

Dave


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