tests: virtio-9p: code refactoring
[qemu.git] / include / exec / helper-tcg.h
1 /* Helper file for declaring TCG helper functions.
2 This one defines data structures private to tcg.c. */
3
4 #ifndef HELPER_TCG_H
5 #define HELPER_TCG_H
6
7 #include "exec/helper-head.h"
8
9 #define DEF_HELPER_FLAGS_0(NAME, FLAGS, ret) \
10 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
11 .sizemask = dh_sizemask(ret, 0) },
12
13 #define DEF_HELPER_FLAGS_1(NAME, FLAGS, ret, t1) \
14 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
15 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
16
17 #define DEF_HELPER_FLAGS_2(NAME, FLAGS, ret, t1, t2) \
18 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
19 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
20 | dh_sizemask(t2, 2) },
21
22 #define DEF_HELPER_FLAGS_3(NAME, FLAGS, ret, t1, t2, t3) \
23 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
24 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
25 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) },
26
27 #define DEF_HELPER_FLAGS_4(NAME, FLAGS, ret, t1, t2, t3, t4) \
28 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
29 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
30 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) },
31
32 #define DEF_HELPER_FLAGS_5(NAME, FLAGS, ret, t1, t2, t3, t4, t5) \
33 { .func = HELPER(NAME), .name = #NAME, .flags = FLAGS, \
34 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
35 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
36 | dh_sizemask(t5, 5) },
37
38 #include "helper.h"
39 #include "trace/generated-helpers.h"
40 #include "tcg-runtime.h"
41
42 #undef DEF_HELPER_FLAGS_0
43 #undef DEF_HELPER_FLAGS_1
44 #undef DEF_HELPER_FLAGS_2
45 #undef DEF_HELPER_FLAGS_3
46 #undef DEF_HELPER_FLAGS_4
47 #undef DEF_HELPER_FLAGS_5
48
49 #endif /* HELPER_TCG_H */