mirror of
https://github.com/partic2/libffi
synced 2026-11-10 01:57:19 +00:00
Add David Gilbert's variadic function call support
This commit is contained in:
@@ -196,6 +196,18 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
/* Perform machine dependent cif processing for variadic calls */
|
||||
ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
|
||||
unsigned int nfixedargs,
|
||||
unsigned int ntotalargs)
|
||||
{
|
||||
/* VFP variadic calls actually use the SYSV ABI */
|
||||
if (cif->abi == FFI_VFP)
|
||||
cif->abi = FFI_SYSV;
|
||||
|
||||
return ffi_prep_cif_machdep(cif);
|
||||
}
|
||||
|
||||
/* Prototypes for assembly functions, in sysv.S */
|
||||
extern void ffi_call_SYSV (void (*fn)(void), extended_cif *, unsigned, unsigned, unsigned *);
|
||||
extern void ffi_call_VFP (void (*fn)(void), extended_cif *, unsigned, unsigned, unsigned *);
|
||||
|
||||
+2
-1
@@ -55,6 +55,8 @@ typedef enum ffi_abi {
|
||||
#define FFI_TYPE_STRUCT_VFP_FLOAT (FFI_TYPE_LAST + 1)
|
||||
#define FFI_TYPE_STRUCT_VFP_DOUBLE (FFI_TYPE_LAST + 2)
|
||||
|
||||
#define FFI_TARGET_SPECIFIC_VARIADIC
|
||||
|
||||
/* ---- Definitions for closures ----------------------------------------- */
|
||||
|
||||
#define FFI_CLOSURES 1
|
||||
@@ -62,4 +64,3 @@ typedef enum ffi_abi {
|
||||
#define FFI_NATIVE_RAW_API 0
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user