Lines Matching refs:cif

47     if (ecif->cif->flags == FFI_TYPE_STRUCT)
55 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
114 /* Perform machine dependent cif processing */
115 ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
118 switch (cif->rtype->type)
133 cif->flags = (unsigned) cif->rtype->type;
137 cif->flags = FFI_TYPE_SINT64;
142 if (cif->rtype->size == 1)
144 cif->flags = FFI_TYPE_SINT8; /* same as char size */
146 else if (cif->rtype->size == 2)
148 cif->flags = FFI_TYPE_SINT16; /* same as short size */
150 else if (cif->rtype->size == 4)
152 cif->flags = FFI_TYPE_INT; /* same as int type */
154 else if (cif->rtype->size == 8)
156 cif->flags = FFI_TYPE_SINT64; /* same as int64 type */
160 cif->flags = FFI_TYPE_STRUCT;
166 cif->flags = FFI_TYPE_INT;
171 cif->bytes = (cif->bytes + 15) & ~0xF;
186 void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
190 ecif.cif = cif;
197 (cif->flags == FFI_TYPE_STRUCT))
199 ecif.rvalue = alloca(cif->rtype->size);
205 switch (cif->abi)
208 ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
213 ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, cif->flags,
227 void** args, ffi_cif* cif);
244 ffi_cif *cif;
247 cif = closure->cif;
248 arg_area = (void**) alloca (cif->nargs * sizeof (void*));
256 ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
258 (closure->fun) (cif, *respp, arg_area, closure->user_data);
260 return cif->flags;
265 ffi_cif *cif)
274 if ( cif->flags == FFI_TYPE_STRUCT ) {
281 for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
317 /* the cif must already be prep'ed */
320 ffi_cif* cif,
324 if (cif->abi != FFI_SYSV)
331 closure->cif = cif;
344 ffi_cif* cif,
351 FFI_ASSERT (cif->abi == FFI_SYSV);
358 for (i = cif->nargs-1; i >= 0; i--)
360 FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT);
361 FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE);
368 closure->cif = cif;
378 memcpy (stack, ecif->avalue, ecif->cif->bytes);
397 ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
402 ecif.cif = cif;
409 (cif->rtype->type == FFI_TYPE_STRUCT))
411 ecif.rvalue = alloca(cif->rtype->size);
417 switch (cif->abi)
420 ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
425 ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,