iotests/287: Clean up subshell test image
[qemu.git] / include / exec / helper-tcg.h
blob27870509a2080bb8f8547cddbe186f82142daf1c
1 /* Helper file for declaring TCG helper functions.
2 This one defines data structures private to tcg.c. */
4 #ifndef HELPER_TCG_H
5 #define HELPER_TCG_H
7 #include "exec/helper-head.h"
9 /* Need one more level of indirection before stringification
10 to get all the macros expanded first. */
11 #define str(s) #s
13 #define DEF_HELPER_FLAGS_0(NAME, FLAGS, ret) \
14 { .func = HELPER(NAME), .name = str(NAME), \
15 .flags = FLAGS | dh_callflag(ret), \
16 .sizemask = dh_sizemask(ret, 0) },
18 #define DEF_HELPER_FLAGS_1(NAME, FLAGS, ret, t1) \
19 { .func = HELPER(NAME), .name = str(NAME), \
20 .flags = FLAGS | dh_callflag(ret), \
21 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
23 #define DEF_HELPER_FLAGS_2(NAME, FLAGS, ret, t1, t2) \
24 { .func = HELPER(NAME), .name = str(NAME), \
25 .flags = FLAGS | dh_callflag(ret), \
26 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
27 | dh_sizemask(t2, 2) },
29 #define DEF_HELPER_FLAGS_3(NAME, FLAGS, ret, t1, t2, t3) \
30 { .func = HELPER(NAME), .name = str(NAME), \
31 .flags = FLAGS | dh_callflag(ret), \
32 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
33 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) },
35 #define DEF_HELPER_FLAGS_4(NAME, FLAGS, ret, t1, t2, t3, t4) \
36 { .func = HELPER(NAME), .name = str(NAME), \
37 .flags = FLAGS | dh_callflag(ret), \
38 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
39 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) },
41 #define DEF_HELPER_FLAGS_5(NAME, FLAGS, ret, t1, t2, t3, t4, t5) \
42 { .func = HELPER(NAME), .name = str(NAME), \
43 .flags = FLAGS | dh_callflag(ret), \
44 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
45 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
46 | dh_sizemask(t5, 5) },
48 #define DEF_HELPER_FLAGS_6(NAME, FLAGS, ret, t1, t2, t3, t4, t5, t6) \
49 { .func = HELPER(NAME), .name = str(NAME), \
50 .flags = FLAGS | dh_callflag(ret), \
51 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
52 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
53 | dh_sizemask(t5, 5) | dh_sizemask(t6, 6) },
55 #define DEF_HELPER_FLAGS_7(NAME, FLAGS, ret, t1, t2, t3, t4, t5, t6, t7) \
56 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
57 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
58 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
59 | dh_sizemask(t5, 5) | dh_sizemask(t6, 6) | dh_sizemask(t7, 7) },
61 #include "helper.h"
62 #include "trace/generated-helpers.h"
63 #include "tcg-runtime.h"
64 #include "plugin-helpers.h"
66 #undef str
67 #undef DEF_HELPER_FLAGS_0
68 #undef DEF_HELPER_FLAGS_1
69 #undef DEF_HELPER_FLAGS_2
70 #undef DEF_HELPER_FLAGS_3
71 #undef DEF_HELPER_FLAGS_4
72 #undef DEF_HELPER_FLAGS_5
73 #undef DEF_HELPER_FLAGS_6
74 #undef DEF_HELPER_FLAGS_7
76 #endif /* HELPER_TCG_H */