Lines Matching refs:cif
69 if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT) in ffi_prep_args()
75 avn = ecif->cif->nargs; in ffi_prep_args()
78 for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++) in ffi_prep_args()
156 ffi_status ffi_prep_cif_machdep(ffi_cif *cif) in ffi_prep_cif_machdep() argument
165 greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0); in ffi_prep_cif_machdep()
167 cif->flags2 = 0; in ffi_prep_cif_machdep()
169 for (i = j = 0; i < cif->nargs; i++) in ffi_prep_cif_machdep()
171 type = (cif->arg_types)[i]->type; in ffi_prep_cif_machdep()
176 cif->bytes += sizeof (UINT64) - sizeof (float); in ffi_prep_cif_machdep()
186 cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); in ffi_prep_cif_machdep()
195 cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); in ffi_prep_cif_machdep()
198 cif->flags2 += FFI_TYPE_INT << (2 * j++); in ffi_prep_cif_machdep()
202 size = (cif->arg_types)[i]->size; in ffi_prep_cif_machdep()
204 cif->bytes += sizeof (UINT64) - size; in ffi_prep_cif_machdep()
213 cif->flags2 += FFI_TYPE_INT << (2 * j++); in ffi_prep_cif_machdep()
219 switch (cif->rtype->type) in ffi_prep_cif_machdep()
222 cif->flags = return_type (cif->rtype); in ffi_prep_cif_machdep()
230 cif->flags = cif->rtype->type; in ffi_prep_cif_machdep()
234 cif->flags = FFI_TYPE_INT; in ffi_prep_cif_machdep()
251 void ffi_call(/*@dependent@*/ ffi_cif *cif, in ffi_call() argument
259 ecif.cif = cif; in ffi_call()
265 if (cif->rtype->type == FFI_TYPE_STRUCT in ffi_call()
266 && return_type (cif->rtype) != FFI_TYPE_STRUCT) in ffi_call()
269 (cif->rtype->type == FFI_TYPE_STRUCT)) in ffi_call()
271 ecif.rvalue = alloca(cif->rtype->size); in ffi_call()
276 switch (cif->abi) in ffi_call()
279 ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, cif->flags2, in ffi_call()
288 && cif->rtype->type == FFI_TYPE_STRUCT in ffi_call()
289 && return_type (cif->rtype) != FFI_TYPE_STRUCT) in ffi_call()
290 memcpy (rvalue, &trvalue, cif->rtype->size); in ffi_call()
298 ffi_cif *cif, in ffi_prep_closure_loc() argument
305 if (cif->abi != FFI_SYSV) in ffi_prep_closure_loc()
330 closure->cif = cif; in ffi_prep_closure_loc()
357 ffi_cif *cif; in ffi_closure_helper_SYSV() local
360 cif = closure->cif; in ffi_closure_helper_SYSV()
361 avalue = alloca (cif->nargs * sizeof (void *)); in ffi_closure_helper_SYSV()
365 if (return_type (cif->rtype) == FFI_TYPE_STRUCT) in ffi_closure_helper_SYSV()
374 cif = closure->cif; in ffi_closure_helper_SYSV()
375 avn = cif->nargs; in ffi_closure_helper_SYSV()
378 for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++) in ffi_closure_helper_SYSV()
464 (closure->fun) (cif, rvalue, avalue, closure->user_data); in ffi_closure_helper_SYSV()
467 return return_type (cif->rtype); in ffi_closure_helper_SYSV()