target/arm: Restore SPSEL to correct CONTROL register on exception return
[qemu/kevin.git] / include / exec / helper-tcg.h
blobb0c5bafa999467d84c5aee97041eb732863b8d17
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), .flags = FLAGS, \
15 .sizemask = dh_sizemask(ret, 0) },
17 #define DEF_HELPER_FLAGS_1(NAME, FLAGS, ret, t1) \
18 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
19 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) },
21 #define DEF_HELPER_FLAGS_2(NAME, FLAGS, ret, t1, t2) \
22 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
23 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
24 | dh_sizemask(t2, 2) },
26 #define DEF_HELPER_FLAGS_3(NAME, FLAGS, ret, t1, t2, t3) \
27 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
28 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
29 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) },
31 #define DEF_HELPER_FLAGS_4(NAME, FLAGS, ret, t1, t2, t3, t4) \
32 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
33 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
34 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) },
36 #define DEF_HELPER_FLAGS_5(NAME, FLAGS, ret, t1, t2, t3, t4, t5) \
37 { .func = HELPER(NAME), .name = str(NAME), .flags = FLAGS, \
38 .sizemask = dh_sizemask(ret, 0) | dh_sizemask(t1, 1) \
39 | dh_sizemask(t2, 2) | dh_sizemask(t3, 3) | dh_sizemask(t4, 4) \
40 | dh_sizemask(t5, 5) },
42 #include "helper.h"
43 #include "trace/generated-helpers.h"
44 #include "tcg-runtime.h"
46 #undef str
47 #undef DEF_HELPER_FLAGS_0
48 #undef DEF_HELPER_FLAGS_1
49 #undef DEF_HELPER_FLAGS_2
50 #undef DEF_HELPER_FLAGS_3
51 #undef DEF_HELPER_FLAGS_4
52 #undef DEF_HELPER_FLAGS_5
54 #endif /* HELPER_TCG_H */