28 printf(
"%u: %.1f :", x, y);
33 double arg=va_arg(ap,
double);
35 printf(
" %d:%.1f ", i, arg);
39 printf(
" total: %.1f\n", total);
48 ffi_type *arg_types[5];
51 unsigned int firstarg;
60 printf(
"compiled: %.1f\n", resfp);
63 arg_types[0] = &ffi_type_uint;
64 arg_types[1] = &ffi_type_double;
67 &ffi_type_double, arg_types) == FFI_OK);
71 values[0] = &firstarg;
72 values[1] = &doubles[0];
75 printf(
"ffi: %.1f\n", resfp);
82 printf(
"compiled: %.1f\n", resfp);
85 arg_types[0] = &ffi_type_uint;
86 arg_types[1] = &ffi_type_double;
87 arg_types[2] = &ffi_type_double;
88 arg_types[3] = &ffi_type_double;
91 &ffi_type_double, arg_types) == FFI_OK);
97 values[0] = &firstarg;
98 values[1] = &doubles[0];
99 values[2] = &doubles[1];
100 values[3] = &doubles[2];
103 printf(
"ffi: %.1f\n", resfp);
ffi_status ffi_prep_cif_var(ffi_cif *cif, ffi_abi abi, unsigned int nfixedargs, unsigned int ntotalargs, ffi_type *rtype, ffi_type **atypes)
double float_va_fn(unsigned int x, double y,...)
void ffi_call(ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)