• Home
  • Raw
  • Download

Lines Matching refs:cif

95   if ( ecif->cif->rstruct_flag != 0 )  in ffi_prep_args()
97 if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) in ffi_prep_args()
107 for (i = 0, p_arg = ecif->cif->arg_types; i < ecif->cif->nargs; i++, p_arg++) in ffi_prep_args()
131 type = (ecif->cif->abi == FFI_N64 in ffi_prep_args()
132 || ecif->cif->abi == FFI_N64_SOFT_FLOAT) in ffi_prep_args()
135 if (i < 8 && (ecif->cif->abi == FFI_N32_SOFT_FLOAT in ffi_prep_args()
136 || ecif->cif->abi == FFI_N64_SOFT_FLOAT)) in ffi_prep_args()
325 ffi_status ffi_prep_cif_machdep(ffi_cif *cif) in ffi_prep_cif_machdep() argument
327 cif->flags = 0; in ffi_prep_cif_machdep()
334 if (cif->rtype->type != FFI_TYPE_STRUCT && cif->abi == FFI_O32) in ffi_prep_cif_machdep()
336 if (cif->nargs > 0) in ffi_prep_cif_machdep()
338 switch ((cif->arg_types)[0]->type) in ffi_prep_cif_machdep()
342 cif->flags += (cif->arg_types)[0]->type; in ffi_prep_cif_machdep()
349 if (cif->nargs > 1) in ffi_prep_cif_machdep()
353 if (cif->flags) in ffi_prep_cif_machdep()
355 switch ((cif->arg_types)[1]->type) in ffi_prep_cif_machdep()
359 cif->flags += (cif->arg_types)[1]->type << FFI_FLAG_BITS; in ffi_prep_cif_machdep()
372 if (cif->abi == FFI_O32_SOFT_FLOAT) in ffi_prep_cif_machdep()
374 switch (cif->rtype->type) in ffi_prep_cif_machdep()
378 cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
384 cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
389 cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
396 switch (cif->rtype->type) in ffi_prep_cif_machdep()
402 cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
407 cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
411 cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2); in ffi_prep_cif_machdep()
423 unsigned count = (cif->nargs < 8) ? cif->nargs : 8; in ffi_prep_cif_machdep()
427 int soft_float = (cif->abi == FFI_N32_SOFT_FLOAT in ffi_prep_cif_machdep()
428 || cif->abi == FFI_N64_SOFT_FLOAT); in ffi_prep_cif_machdep()
430 if (cif->rtype->type == FFI_TYPE_STRUCT) in ffi_prep_cif_machdep()
432 struct_flags = calc_n32_return_struct_flags(soft_float, cif->rtype); in ffi_prep_cif_machdep()
440 count = (cif->nargs < 7) ? cif->nargs : 7; in ffi_prep_cif_machdep()
442 cif->rstruct_flag = !0; in ffi_prep_cif_machdep()
445 cif->rstruct_flag = 0; in ffi_prep_cif_machdep()
448 cif->rstruct_flag = 0; in ffi_prep_cif_machdep()
452 type = (cif->arg_types)[index]->type; in ffi_prep_cif_machdep()
471 cif->flags += in ffi_prep_cif_machdep()
472 ((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS)); in ffi_prep_cif_machdep()
485 cif->flags += in ffi_prep_cif_machdep()
488 cif->flags += in ffi_prep_cif_machdep()
496 cif->flags += calc_n32_struct_flags(soft_float, in ffi_prep_cif_machdep()
497 (cif->arg_types)[index], in ffi_prep_cif_machdep()
510 switch (cif->rtype->type) in ffi_prep_cif_machdep()
524 cif->flags += FFI_TYPE_STRUCT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
525 cif->flags += struct_flags << (4 + (FFI_FLAG_BITS * 8)); in ffi_prep_cif_machdep()
535 if (cif->abi == FFI_N32_SOFT_FLOAT || cif->abi == FFI_N32) in ffi_prep_cif_machdep()
536 cif->flags += FFI_TYPE_SINT32 << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
538 cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
544 cif->flags += FFI_TYPE_SINT32 << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
550 cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
552 cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
560 cif->flags += FFI_TYPE_STRUCT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
561 cif->flags += FFI_TYPE_SMALLSTRUCT2 << (4 + (FFI_FLAG_BITS * 8)); in ffi_prep_cif_machdep()
565 cif->flags += FFI_TYPE_STRUCT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
566 cif->flags += (FFI_TYPE_DOUBLE in ffi_prep_cif_machdep()
572 cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); in ffi_prep_cif_machdep()
591 void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) in ffi_call() argument
595 ecif.cif = cif; in ffi_call()
602 (cif->rtype->type == FFI_TYPE_STRUCT)) in ffi_call()
603 ecif.rvalue = alloca(cif->rtype->size); in ffi_call()
607 switch (cif->abi) in ffi_call()
612 ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, in ffi_call()
613 cif->flags, ecif.rvalue, fn); in ffi_call()
626 if (cif->rtype->type == FFI_TYPE_STRUCT && cif->rtype->size < 16) in ffi_call()
634 else if (cif->rtype->type == FFI_TYPE_FLOAT in ffi_call()
635 && (cif->abi == FFI_N64_SOFT_FLOAT in ffi_call()
636 || cif->abi == FFI_N32_SOFT_FLOAT)) in ffi_call()
644 ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, in ffi_call()
645 cif->flags, rvalue_copy, fn); in ffi_call()
647 memcpy(ecif.rvalue, rvalue_copy + copy_offset, cif->rtype->size); in ffi_call()
667 ffi_cif *cif, in ffi_prep_closure_loc() argument
677 if (cif->abi != FFI_O32 && cif->abi != FFI_O32_SOFT_FLOAT) in ffi_prep_closure_loc()
682 if (cif->abi != FFI_N32 in ffi_prep_closure_loc()
683 && cif->abi != FFI_N32_SOFT_FLOAT) in ffi_prep_closure_loc()
686 if (cif->abi != FFI_N64 in ffi_prep_closure_loc()
687 && cif->abi != FFI_N64_SOFT_FLOAT) in ffi_prep_closure_loc()
735 closure->cif = cif; in ffi_prep_closure_loc()
769 ffi_cif *cif; in ffi_closure_mips_inner_O32() local
775 cif = closure->cif; in ffi_closure_mips_inner_O32()
776 avalue = alloca (cif->nargs * sizeof (ffi_arg)); in ffi_closure_mips_inner_O32()
777 avaluep = alloca (cif->nargs * sizeof (ffi_arg)); in ffi_closure_mips_inner_O32()
779 seen_int = (cif->abi == FFI_O32_SOFT_FLOAT); in ffi_closure_mips_inner_O32()
782 if ((cif->flags >> (FFI_FLAG_BITS * 2)) == FFI_TYPE_STRUCT) in ffi_closure_mips_inner_O32()
789 avn = cif->nargs; in ffi_closure_mips_inner_O32()
790 arg_types = cif->arg_types; in ffi_closure_mips_inner_O32()
843 (closure->fun) (cif, rvalue, avaluep, closure->user_data); in ffi_closure_mips_inner_O32()
845 if (cif->abi == FFI_O32_SOFT_FLOAT) in ffi_closure_mips_inner_O32()
847 switch (cif->rtype->type) in ffi_closure_mips_inner_O32()
854 return cif->rtype->type; in ffi_closure_mips_inner_O32()
859 return cif->rtype->type; in ffi_closure_mips_inner_O32()
923 ffi_cif *cif; in ffi_closure_mips_inner_N32() local
931 cif = closure->cif; in ffi_closure_mips_inner_N32()
932 soft_float = cif->abi == FFI_N64_SOFT_FLOAT in ffi_closure_mips_inner_N32()
933 || cif->abi == FFI_N32_SOFT_FLOAT; in ffi_closure_mips_inner_N32()
934 avalue = alloca (cif->nargs * sizeof (ffi_arg)); in ffi_closure_mips_inner_N32()
935 avaluep = alloca (cif->nargs * sizeof (ffi_arg)); in ffi_closure_mips_inner_N32()
939 if (cif->rstruct_flag) in ffi_closure_mips_inner_N32()
950 avn = cif->nargs; in ffi_closure_mips_inner_N32()
951 arg_types = cif->arg_types; in ffi_closure_mips_inner_N32()
983 type = (cif->abi == FFI_N64 || cif->abi == FFI_N64_SOFT_FLOAT) in ffi_closure_mips_inner_N32()
1027 copy_struct_N32(avaluep[i], 0, cif->abi, arg_types[i], in ffi_closure_mips_inner_N32()
1043 (closure->fun) (cif, rvalue, avaluep, closure->user_data); in ffi_closure_mips_inner_N32()
1045 return cif->flags >> (FFI_FLAG_BITS * 8); in ffi_closure_mips_inner_N32()