Lines Matching full:cif
50 if (ecif->cif->flags == FFI_TYPE_STRUCT)
58 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
117 /* Perform machine dependent cif processing */
118 ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
121 switch (cif->rtype->type)
138 cif->flags = (unsigned) cif->rtype->type;
142 cif->flags = FFI_TYPE_SINT64;
147 if (cif->rtype->size == 1)
149 cif->flags = FFI_TYPE_SMALL_STRUCT_1B; /* same as char size */
151 else if (cif->rtype->size == 2)
153 cif->flags = FFI_TYPE_SMALL_STRUCT_2B; /* same as short size */
155 else if (cif->rtype->size == 4)
157 cif->flags = FFI_TYPE_INT; /* same as int type */
159 else if (cif->rtype->size == 8)
161 cif->flags = FFI_TYPE_SINT64; /* same as int64 type */
165 cif->flags = FFI_TYPE_STRUCT;
171 cif->flags = FFI_TYPE_INT;
176 cif->bytes = (cif->bytes + 15) & ~0xF;
191 void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
195 ecif.cif = cif;
202 (cif->flags == FFI_TYPE_STRUCT))
204 ecif.rvalue = alloca(cif->rtype->size);
210 switch (cif->abi)
213 ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
218 ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags,
232 void** args, ffi_cif* cif);
253 ffi_cif *cif;
256 cif = closure->cif;
257 arg_area = (void**) alloca (cif->nargs * sizeof (void*));
265 ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
267 (closure->fun) (cif, *respp, arg_area, closure->user_data);
269 return cif->flags;
274 ffi_cif *cif)
283 if ( cif->flags == FFI_TYPE_STRUCT ) {
290 for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
339 /* the cif must already be prep'ed */
343 ffi_cif* cif,
348 if (cif->abi == FFI_SYSV)
355 else if (cif->abi == FFI_STDCALL)
359 (void*)codeloc, cif->bytes);
367 closure->cif = cif;
380 ffi_cif* cif,
387 if (cif->abi != FFI_SYSV) {
396 for (i = cif->nargs-1; i >= 0; i--)
398 FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT);
399 FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE);
406 closure->cif = cif;
416 memcpy (stack, ecif->avalue, ecif->cif->bytes);
435 ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
440 ecif.cif = cif;
447 (cif->rtype->type == FFI_TYPE_STRUCT))
449 ecif.rvalue = alloca(cif->rtype->size);
455 switch (cif->abi)
458 ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
463 ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,