Lines Matching full:cif
71 if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT)
77 avn = ecif->cif->nargs;
80 for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
157 /* Perform machine dependent cif processing */
158 ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
166 greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0);
168 cif->flags2 = 0;
170 for (i = j = 0; i < cif->nargs; i++)
172 type = (cif->arg_types)[i]->type;
177 cif->bytes += sizeof (UINT64) - sizeof (float);
181 cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++);
191 cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++);
194 cif->flags2 += FFI_TYPE_INT << (2 * j++);
198 size = (cif->arg_types)[i]->size;
200 cif->bytes += sizeof (UINT64) - size;
209 cif->flags2 += FFI_TYPE_INT << (2 * j++);
215 switch (cif->rtype->type)
218 cif->flags = return_type (cif->rtype);
226 cif->flags = cif->rtype->type;
230 cif->flags = FFI_TYPE_INT;
247 void ffi_call(/*@dependent@*/ ffi_cif *cif,
255 ecif.cif = cif;
261 if (cif->rtype->type == FFI_TYPE_STRUCT
262 && return_type (cif->rtype) != FFI_TYPE_STRUCT)
265 (cif->rtype->type == FFI_TYPE_STRUCT))
268 ecif.rvalue = alloca(cif->rtype->size);
274 switch (cif->abi)
278 ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
279 cif->flags, cif->flags2, ecif.rvalue, fn);
288 && cif->rtype->type == FFI_TYPE_STRUCT
289 && return_type (cif->rtype) != FFI_TYPE_STRUCT)
290 memcpy (rvalue, &trvalue, cif->rtype->size);
298 ffi_cif *cif,
304 FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
328 closure->cif = cif;
354 ffi_cif *cif;
356 cif = closure->cif;
357 avalue = alloca (cif->nargs * sizeof (void *));
361 if (return_type (cif->rtype) == FFI_TYPE_STRUCT)
370 cif = closure->cif;
371 avn = cif->nargs;
374 for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
448 (closure->fun) (cif, rvalue, avalue, closure->user_data);
451 return return_type (cif->rtype);