Lines Matching refs:cif
80 if(ecif->cif->flags == FFI_TYPE_STRUCT) in ffi_prep_args()
86 for(i = 0, p_arg = ecif->cif->arg_types; i < ecif->cif->nargs; in ffi_prep_args()
177 ffi_status ffi_prep_cif_machdep(ffi_cif *cif) in ffi_prep_cif_machdep() argument
182 cif->bytes = (cif->bytes + 7) & ~7; in ffi_prep_cif_machdep()
185 cif->rstruct_flag = 0; in ffi_prep_cif_machdep()
188 switch(cif->rtype->type) in ffi_prep_cif_machdep()
192 cif->flags = (unsigned)FFI_TYPE_UINT8; in ffi_prep_cif_machdep()
196 cif->flags = (unsigned)FFI_TYPE_UINT16; in ffi_prep_cif_machdep()
202 cif->flags = (unsigned)FFI_TYPE_UINT32; in ffi_prep_cif_machdep()
207 cif->flags = (unsigned)FFI_TYPE_UINT64; in ffi_prep_cif_machdep()
210 cif->rstruct_flag = 1; in ffi_prep_cif_machdep()
211 if(!pass_struct_on_stack(cif->rtype)) in ffi_prep_cif_machdep()
213 if(cif->rtype->size <= 1) in ffi_prep_cif_machdep()
214 cif->flags = (unsigned)FFI_TYPE_UINT8; in ffi_prep_cif_machdep()
215 else if(cif->rtype->size <= 2) in ffi_prep_cif_machdep()
216 cif->flags = (unsigned)FFI_TYPE_UINT16; in ffi_prep_cif_machdep()
217 else if(cif->rtype->size <= 4) in ffi_prep_cif_machdep()
218 cif->flags = (unsigned)FFI_TYPE_UINT32; in ffi_prep_cif_machdep()
219 else if(cif->rtype->size <= 8) in ffi_prep_cif_machdep()
220 cif->flags = (unsigned)FFI_TYPE_UINT64; in ffi_prep_cif_machdep()
222 cif->flags = (unsigned)cif->rtype->type; in ffi_prep_cif_machdep()
225 cif->flags = (unsigned)cif->rtype->type; in ffi_prep_cif_machdep()
228 cif->flags = (unsigned)cif->rtype->type; in ffi_prep_cif_machdep()
235 void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) in ffi_call() argument
242 ecif.cif = cif; in ffi_call()
245 for(i = 0, p_arg = cif->arg_types; i < cif->nargs; i++, p_arg++) in ffi_call()
252 if((rvalue == NULL) && (cif->flags == FFI_TYPE_STRUCT)) in ffi_call()
253 ecif.rvalue = alloca(cif->rtype->size); in ffi_call()
257 switch(cif->abi) in ffi_call()
260 ffi_call_SYSV(ffi_prep_args, &ecif, size, cif->flags, in ffi_call()
261 ecif.rvalue, cif->rstruct_flag, fn); in ffi_call()
270 void **avalue, ffi_cif *cif) in ffi_prep_incoming_args_SYSV() argument
281 for(i = 0; i < cif->nargs + 7; i++) in ffi_prep_incoming_args_SYSV()
288 if(cif->flags == FFI_TYPE_STRUCT) in ffi_prep_incoming_args_SYSV()
296 for(i = 0, p_arg = cif->arg_types; i < cif->nargs; i++, p_arg++) in ffi_prep_incoming_args_SYSV()
358 for(i = 0; i < cif->nargs; i++) in ffi_prep_incoming_args_SYSV()
370 ffi_cif *cif; in ffi_closure_SYSV_inner() local
375 cif = closure->cif; in ffi_closure_SYSV_inner()
377 for(i = 0, p_arg = cif->arg_types; i < cif->nargs; i++, p_arg++) in ffi_closure_SYSV_inner()
387 ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); in ffi_closure_SYSV_inner()
389 (closure->fun)(cif, *respp, arg_area, closure->user_data); in ffi_closure_SYSV_inner()
391 return cif->flags; in ffi_closure_SYSV_inner()
394 ffi_status ffi_prep_closure_loc(ffi_closure* closure, ffi_cif* cif, in ffi_prep_closure_loc() argument
398 if (cif->abi != FFI_SYSV) in ffi_prep_closure_loc()
404 unsigned int __rstruct_flag = (unsigned int)(cif->rstruct_flag); in ffi_prep_closure_loc()
417 closure->cif = cif; in ffi_prep_closure_loc()