• Home
  • Raw
  • Download

Lines Matching refs:cif

70   for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)  in ffi_prep_args_v8()
150 if (ecif->cif->rtype->type == FFI_TYPE_STRUCT && in ffi_prep_args_v9()
151 ecif->cif->rtype->size > 32) in ffi_prep_args_v9()
158 for (i = 0, p_arg = ecif->cif->arg_types; i < ecif->cif->nargs; in ffi_prep_args_v9()
252 ffi_status ffi_prep_cif_machdep(ffi_cif *cif) in ffi_prep_cif_machdep() argument
256 if (cif->abi != FFI_V9) in ffi_prep_cif_machdep()
263 if (cif->rtype->type != FFI_TYPE_STRUCT) in ffi_prep_cif_machdep()
264 cif->bytes += wordsize; in ffi_prep_cif_machdep()
269 if (cif->bytes < 4*6+4) in ffi_prep_cif_machdep()
270 cif->bytes = 4*6+4; in ffi_prep_cif_machdep()
279 if (cif->bytes < 8*6) in ffi_prep_cif_machdep()
280 cif->bytes = 8*6; in ffi_prep_cif_machdep()
286 cif->bytes += 16 * wordsize; in ffi_prep_cif_machdep()
291 cif->bytes = ALIGN(cif->bytes, 2 * wordsize); in ffi_prep_cif_machdep()
294 switch (cif->rtype->type) in ffi_prep_cif_machdep()
302 cif->flags = cif->rtype->type; in ffi_prep_cif_machdep()
306 if (cif->abi == FFI_V9 && cif->rtype->size > 32) in ffi_prep_cif_machdep()
307 cif->flags = FFI_TYPE_VOID; in ffi_prep_cif_machdep()
309 cif->flags = FFI_TYPE_STRUCT; in ffi_prep_cif_machdep()
316 if (cif->abi == FFI_V9) in ffi_prep_cif_machdep()
317 cif->flags = FFI_TYPE_INT; in ffi_prep_cif_machdep()
319 cif->flags = cif->rtype->type; in ffi_prep_cif_machdep()
324 if (cif->abi == FFI_V9) in ffi_prep_cif_machdep()
325 cif->flags = FFI_TYPE_INT; in ffi_prep_cif_machdep()
327 cif->flags = FFI_TYPE_SINT64; in ffi_prep_cif_machdep()
331 cif->flags = FFI_TYPE_INT; in ffi_prep_cif_machdep()
383 void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) in ffi_call() argument
388 ecif.cif = cif; in ffi_call()
395 if (cif->rtype->type == FFI_TYPE_STRUCT) in ffi_call()
397 if (cif->rtype->size <= 32) in ffi_call()
403 ecif.rvalue = alloca(cif->rtype->size); in ffi_call()
407 switch (cif->abi) in ffi_call()
414 if (rvalue && (cif->rtype->type == FFI_TYPE_STRUCT in ffi_call()
416 || cif->flags == FFI_TYPE_LONGDOUBLE in ffi_call()
433 if (cif->rtype->size < 0x7f) in ffi_call()
434 call_struct[5] = cif->rtype->size; /* unimp */ in ffi_call()
447 ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, in ffi_call()
448 cif->flags, rvalue, call_struct); in ffi_call()
453 ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, in ffi_call()
454 cif->flags, rvalue, fn); in ffi_call()
459 ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, in ffi_call()
460 cif->flags, rvalue, fn); in ffi_call()
466 ffi_call_v9(ffi_prep_args_v9, &ecif, cif->bytes, in ffi_call()
467 cif->flags, rval, fn); in ffi_call()
468 if (rvalue && rval && cif->rtype->type == FFI_TYPE_STRUCT) in ffi_call()
469 ffi_v9_layout_struct(cif->rtype, 0, (char *)rvalue, (char *)rval, ((char *)rval)+32); in ffi_call()
490 ffi_cif* cif, in ffi_prep_closure_loc() argument
500 if (cif->abi != FFI_V9) in ffi_prep_closure_loc()
510 if (cif->abi != FFI_V8) in ffi_prep_closure_loc()
519 closure->cif = cif; in ffi_prep_closure_loc()
543 ffi_cif *cif; in ffi_closure_sparc_inner_v8() local
548 cif = closure->cif; in ffi_closure_sparc_inner_v8()
549 arg_types = cif->arg_types; in ffi_closure_sparc_inner_v8()
550 avalue = alloca(cif->nargs * sizeof(void *)); in ffi_closure_sparc_inner_v8()
554 if (cif->flags == FFI_TYPE_STRUCT in ffi_closure_sparc_inner_v8()
556 || cif->flags == FFI_TYPE_LONGDOUBLE in ffi_closure_sparc_inner_v8()
565 for (i = 0; i < cif->nargs; i++) in ffi_closure_sparc_inner_v8()
598 (closure->fun) (cif, rvalue, avalue, closure->user_data); in ffi_closure_sparc_inner_v8()
601 return cif->rtype->type; in ffi_closure_sparc_inner_v8()
608 ffi_cif *cif; in ffi_closure_sparc_inner_v9() local
613 cif = closure->cif; in ffi_closure_sparc_inner_v9()
614 arg_types = cif->arg_types; in ffi_closure_sparc_inner_v9()
615 avalue = alloca(cif->nargs * sizeof(void *)); in ffi_closure_sparc_inner_v9()
619 if (cif->flags == FFI_TYPE_VOID in ffi_closure_sparc_inner_v9()
620 && cif->rtype->type == FFI_TYPE_STRUCT) in ffi_closure_sparc_inner_v9()
632 for (i = 0; i < cif->nargs; i++) in ffi_closure_sparc_inner_v9()
677 (closure->fun) (cif, rvalue, avalue, closure->user_data); in ffi_closure_sparc_inner_v9()
680 return cif->rtype->type; in ffi_closure_sparc_inner_v9()