14 printf(
"0x%08x 0x%08x: 0x%08x\n",
23cls_pointer_gn(ffi_cif* cif
__UNUSED__,
void* resp,
26 void* a1 = *(
void**)(args[0]);
27 void* a2 = *(
void**)(args[1]);
36 ffi_closure* pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
39 ffi_type* arg_types[3];
46 void* arg1 = (
void*)0x12345678;
47 void* arg2 = (
void*)0x89abcdef;
50 arg_types[0] = &ffi_type_pointer;
51 arg_types[1] = &ffi_type_pointer;
55 arg_types) == FFI_OK);
63 printf(
"res: 0x%08x\n", (
unsigned int) res);
70 printf(
"res: 0x%08x\n", (
unsigned int) res);
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
void ffi_call(ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
void * cls_pointer_fn(void *a1, void *a2)
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)