23 result.
a = a1.
a + a2.
a;
24 result.
b = a1.
b + a2.
b;
25 result.
c = a1.
c + a2.
c;
26 result.
d = a1.
d + a2.
d;
29 printf(
"%g %d %d %g %g %d %d %g: %g %d %d %g\n", a1.
a, a1.
b, a1.
c, a1.
d,
30 a2.
a, a2.
b, a2.
c, a2.
d,
31 result.
a, result.
b, result.
c, result.
d);
37 void* userdata __UNUSED__)
51 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
53 ffi_type* cls_struct_fields[5];
54 ffi_type cls_struct_type;
55 ffi_type* dbl_arg_types[3];
61 cls_struct_type.size = 0;
62 cls_struct_type.alignment = 0;
63 cls_struct_type.type = FFI_TYPE_STRUCT;
64 cls_struct_type.elements = cls_struct_fields;
66 cls_struct_fields[0] = &ffi_type_double;
69 cls_struct_fields[3] = &ffi_type_double;
70 cls_struct_fields[4] =
NULL;
72 dbl_arg_types[0] = &cls_struct_type;
73 dbl_arg_types[1] = &cls_struct_type;
74 dbl_arg_types[2] =
NULL;
77 dbl_arg_types) == FFI_OK);
85 printf(
"res: %g %d %d %g\n", res_dbl.
a, res_dbl.
b, res_dbl.
c, res_dbl.
d);
92 printf(
"res: %g %d %d %g\n", res_dbl.
a, res_dbl.
b, res_dbl.
c, res_dbl.
d);
static void cls_struct_18byte_gn(ffi_cif *cif __UNUSED__, void *resp, void **args, void *userdata __UNUSED__)
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)
cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1, struct cls_struct_18byte a2)
struct cls_struct_18byte cls_struct_18byte
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)