14 (
int)*(
int *)args[0] + (
int)(*(
int *)args[1])
15 + (int)(*(
int *)args[2]) + (
int)(*(
int *)args[3])
18 printf(
"%d %d %d %d: %d\n",
19 (
int)*(
int *)args[0], (
int)(*(
int *)args[1]),
20 (
int)(*(
int *)args[2]), (
int)(*(
int *)args[3]),
31 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
32 ffi_type * cl_arg_types[17];
35 cl_arg_types[0] = &ffi_type_uint;
36 cl_arg_types[1] = &ffi_type_uint;
37 cl_arg_types[2] = &ffi_type_uint;
38 cl_arg_types[3] = &ffi_type_uint;
39 cl_arg_types[4] =
NULL;
43 &ffi_type_sint, cl_arg_types) == FFI_OK);
46 (
void *) 3 , code) == FFI_OK);
51 printf(
"res: %d\n",res);
static void closure_test(ffi_cif *cif __UNUSED__, void *resp, void **args, void *userdata)
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
int(ABI_ATTR * closure_test_type0)(int, int, int, int)
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)