]> gitweb.factorcode.org Git - factor.git/blob - vm/ffi_test.h
Initial import
[factor.git] / vm / ffi_test.h
1 #if defined(FACTOR_X86)
2         #define F_STDCALL __attribute__((stdcall))
3 #else
4         #define F_STDCALL
5 #endif
6
7 DLLEXPORT void ffi_test_0(void);
8 DLLEXPORT int ffi_test_1(void);
9 DLLEXPORT int ffi_test_2(int x, int y);
10 DLLEXPORT int ffi_test_3(int x, int y, int z, int t);
11 DLLEXPORT float ffi_test_4(void);
12 DLLEXPORT double ffi_test_5(void);
13 DLLEXPORT double ffi_test_6(float x, float y);
14 DLLEXPORT double ffi_test_7(double x, double y);
15 DLLEXPORT double ffi_test_8(double x, float y, double z, float t, int w);
16 DLLEXPORT int ffi_test_9(int a, int b, int c, int d, int e, int f, int g);
17 DLLEXPORT int ffi_test_10(int a, int b, double c, int d, float e, int f, int g, int h);
18 struct foo { int x, y; };
19 DLLEXPORT int ffi_test_11(int a, struct foo b, int c);
20 struct rect { float x, y, w, h; };
21 DLLEXPORT int ffi_test_12(int a, int b, struct rect c, int d, int e, int f);
22 DLLEXPORT int ffi_test_13(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k);
23 DLLEXPORT struct foo ffi_test_14(int x, int y);
24 DLLEXPORT char *ffi_test_15(char *x, char *y);
25 struct bar { long x, y, z; };
26 DLLEXPORT struct bar ffi_test_16(long x, long y, long z);
27 struct tiny { int x; };
28 DLLEXPORT struct tiny ffi_test_17(int x);
29 DLLEXPORT F_STDCALL int ffi_test_18(int x, int y, int z, int t);
30 DLLEXPORT F_STDCALL struct bar ffi_test_19(long x, long y, long z);
31 DLLEXPORT void ffi_test_20(double x1, double x2, double x3,
32         double y1, double y2, double y3,
33         double z1, double z2, double z3);
34 DLLEXPORT long long ffi_test_21(long x, long y);
35 DLLEXPORT long ffi_test_22(long x, long long y, long long z);
36 DLLEXPORT float ffi_test_23(float x[3], float y[3]);
37 struct test_struct_1 { char x; };
38 DLLEXPORT struct test_struct_1 ffi_test_24(void);
39 struct test_struct_2 { char x, y; };
40 DLLEXPORT struct test_struct_2 ffi_test_25(void);
41 struct test_struct_3 { char x, y, z; };
42 DLLEXPORT struct test_struct_3 ffi_test_26(void);
43 struct test_struct_4 { char x, y, z, a; };
44 DLLEXPORT struct test_struct_4 ffi_test_27(void);
45 struct test_struct_5 { char x, y, z, a, b; };
46 DLLEXPORT struct test_struct_5 ffi_test_28(void);
47 struct test_struct_6 { char x, y, z, a, b, c; };
48 DLLEXPORT struct test_struct_6 ffi_test_29(void);
49 struct test_struct_7 { char x, y, z, a, b, c, d; };
50 DLLEXPORT struct test_struct_7 ffi_test_30(void);