Lines Matching refs:cif

664   arg_init (&state, ALIGN(ecif->cif->bytes, 16));
666 for (i = 0; i < ecif->cif->nargs; i++)
668 ffi_type *ty = ecif->cif->arg_types[i];
744 if (i + 1 == ecif->cif->aarch64_nfixedargs)
754 return ecif->cif->aarch64_flags;
758 ffi_prep_cif_machdep (ffi_cif *cif)
761 cif->bytes =
762 (cif->bytes + (AARCH64_STACK_ALIGN - 1)) & ~ (AARCH64_STACK_ALIGN - 1);
768 cif->aarch64_flags = 0;
770 if (is_v_register_candidate (cif->rtype))
772 cif->aarch64_flags |= AARCH64_FFI_WITH_V;
777 for (i = 0; i < cif->nargs; i++)
778 if (is_v_register_candidate (cif->arg_types[i]))
780 cif->aarch64_flags |= AARCH64_FFI_WITH_V;
786 cif->aarch64_nfixedargs = 0;
794 /* Perform Apple-specific cif processing for variadic calls */
795 ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
801 status = ffi_prep_cif_machdep (cif);
803 cif->aarch64_nfixedargs = nfixedargs;
813 ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
817 ecif.cif = cif;
821 switch (cif->abi)
831 that space hence the ALIGN applied to cif->bytes.*/
832 stack_bytes = ALIGN(cif->bytes, 16);
835 if (is_register_candidate (cif->rtype))
838 switch (cif->rtype->type)
857 void *addr = get_basic_type_addr (cif->rtype->type,
859 copy_basic_type (rvalue, addr, cif->rtype->type);
864 if (is_hfa (cif->rtype))
867 unsigned short type = get_homogeneous_type (cif->rtype);
868 unsigned elems = element_count (cif->rtype);
876 else if ((cif->rtype->size + 7) / 8 < N_X_ARG_REG)
878 size_t size = ALIGN (cif->rtype->size, sizeof (UINT64));
929 ffi_cif* cif,
934 if (cif->abi != FFI_SYSV)
938 cif->aarch64_flags);
940 closure->cif = cif;
967 ffi_cif *cif = closure->cif;
968 void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
973 arg_init (&state, ALIGN(cif->bytes, 16));
975 for (i = 0; i < cif->nargs; i++)
977 ffi_type *ty = cif->arg_types[i];
1107 if (is_register_candidate (cif->rtype))
1115 rvalue = alloca (cif->rtype->size);
1116 (closure->fun) (cif, rvalue, avalue, closure->user_data);
1120 switch (cif->rtype->type)
1141 void *addr = get_basic_type_addr (cif->rtype->type, context, 0);
1142 copy_basic_type (addr, rvalue, cif->rtype->type);
1146 if (is_hfa (cif->rtype))
1149 unsigned short type = get_homogeneous_type (cif->rtype);
1150 unsigned elems = element_count (cif->rtype);
1158 else if ((cif->rtype->size + 7) / 8 < N_X_ARG_REG)
1160 size_t size = ALIGN (cif->rtype->size, sizeof (UINT64)) ;
1176 (closure->fun) (cif, rvalue, avalue, closure->user_data);