Revision a7812ae4 target-mips/helper.h
b/target-mips/helper.h | ||
---|---|---|
1 |
#ifndef DEF_HELPER |
|
2 |
#define DEF_HELPER(ret, name, params) ret name params; |
|
3 |
#endif |
|
1 |
#include "def-helper.h" |
|
2 |
|
|
3 |
/* FIXME: We should rename the helper functions and remove this hack. */ |
|
4 |
#undef HELPER |
|
5 |
#define HELPER(name) do_##name |
|
4 | 6 |
|
5 |
DEF_HELPER(void, do_raise_exception_err, (int excp, int err)) |
|
6 |
DEF_HELPER(void, do_raise_exception, (int excp)) |
|
7 |
DEF_HELPER(void, do_interrupt_restart, (void)) |
|
7 |
|
|
8 |
DEF_HELPER_2(raise_exception_err, void, i32, int) |
|
9 |
DEF_HELPER_1(raise_exception, void, i32) |
|
10 |
DEF_HELPER_0(interrupt_restart, void) |
|
8 | 11 |
|
9 | 12 |
#ifdef TARGET_MIPS64 |
10 |
DEF_HELPER(target_ulong, do_ldl, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
11 |
DEF_HELPER(target_ulong, do_ldr, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
12 |
DEF_HELPER(void, do_sdl, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
13 |
DEF_HELPER(void, do_sdr, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
13 |
DEF_HELPER_3(ldl, tl, tl, tl, int)
|
|
14 |
DEF_HELPER_3(ldr, tl, tl, tl, int)
|
|
15 |
DEF_HELPER_3(sdl, void, tl, tl, int)
|
|
16 |
DEF_HELPER_3(sdr, void, tl, tl, int)
|
|
14 | 17 |
#endif |
15 |
DEF_HELPER(target_ulong, do_lwl, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
16 |
DEF_HELPER(target_ulong, do_lwr, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
17 |
DEF_HELPER(void, do_swl, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
18 |
DEF_HELPER(void, do_swr, (target_ulong t0, target_ulong t1, int mem_idx))
|
|
18 |
DEF_HELPER_3(lwl, tl, tl, tl, int)
|
|
19 |
DEF_HELPER_3(lwr, tl, tl, tl, int)
|
|
20 |
DEF_HELPER_3(swl, void, tl, tl, int)
|
|
21 |
DEF_HELPER_3(swr, void, tl, tl, int)
|
|
19 | 22 |
|
20 |
DEF_HELPER(target_ulong, do_clo, (target_ulong t0))
|
|
21 |
DEF_HELPER(target_ulong, do_clz, (target_ulong t0))
|
|
23 |
DEF_HELPER_1(clo, tl, tl)
|
|
24 |
DEF_HELPER_1(clz, tl, tl)
|
|
22 | 25 |
#ifdef TARGET_MIPS64 |
23 |
DEF_HELPER(target_ulong, do_dclo, (target_ulong t0))
|
|
24 |
DEF_HELPER(target_ulong, do_dclz, (target_ulong t0))
|
|
25 |
DEF_HELPER(void, do_dmult, (target_ulong t0, target_ulong t1))
|
|
26 |
DEF_HELPER(void, do_dmultu, (target_ulong t0, target_ulong t1))
|
|
26 |
DEF_HELPER_1(dclo, tl, tl)
|
|
27 |
DEF_HELPER_1(dclz, tl, tl)
|
|
28 |
DEF_HELPER_2(dmult, void, tl, tl)
|
|
29 |
DEF_HELPER_2(dmultu, void, tl, tl)
|
|
27 | 30 |
#endif |
28 | 31 |
|
29 |
DEF_HELPER(target_ulong, do_muls, (target_ulong t0, target_ulong t1))
|
|
30 |
DEF_HELPER(target_ulong, do_mulsu, (target_ulong t0, target_ulong t1))
|
|
31 |
DEF_HELPER(target_ulong, do_macc, (target_ulong t0, target_ulong t1))
|
|
32 |
DEF_HELPER(target_ulong, do_maccu, (target_ulong t0, target_ulong t1))
|
|
33 |
DEF_HELPER(target_ulong, do_msac, (target_ulong t0, target_ulong t1))
|
|
34 |
DEF_HELPER(target_ulong, do_msacu, (target_ulong t0, target_ulong t1))
|
|
35 |
DEF_HELPER(target_ulong, do_mulhi, (target_ulong t0, target_ulong t1))
|
|
36 |
DEF_HELPER(target_ulong, do_mulhiu, (target_ulong t0, target_ulong t1))
|
|
37 |
DEF_HELPER(target_ulong, do_mulshi, (target_ulong t0, target_ulong t1))
|
|
38 |
DEF_HELPER(target_ulong, do_mulshiu, (target_ulong t0, target_ulong t1))
|
|
39 |
DEF_HELPER(target_ulong, do_macchi, (target_ulong t0, target_ulong t1))
|
|
40 |
DEF_HELPER(target_ulong, do_macchiu, (target_ulong t0, target_ulong t1))
|
|
41 |
DEF_HELPER(target_ulong, do_msachi, (target_ulong t0, target_ulong t1))
|
|
42 |
DEF_HELPER(target_ulong, do_msachiu, (target_ulong t0, target_ulong t1))
|
|
32 |
DEF_HELPER_2(muls, tl, tl, tl)
|
|
33 |
DEF_HELPER_2(mulsu, tl, tl, tl)
|
|
34 |
DEF_HELPER_2(macc, tl, tl, tl)
|
|
35 |
DEF_HELPER_2(maccu, tl, tl, tl)
|
|
36 |
DEF_HELPER_2(msac, tl, tl, tl)
|
|
37 |
DEF_HELPER_2(msacu, tl, tl, tl)
|
|
38 |
DEF_HELPER_2(mulhi, tl, tl, tl)
|
|
39 |
DEF_HELPER_2(mulhiu, tl, tl, tl)
|
|
40 |
DEF_HELPER_2(mulshi, tl, tl, tl)
|
|
41 |
DEF_HELPER_2(mulshiu, tl, tl, tl)
|
|
42 |
DEF_HELPER_2(macchi, tl, tl, tl)
|
|
43 |
DEF_HELPER_2(macchiu, tl, tl, tl)
|
|
44 |
DEF_HELPER_2(msachi, tl, tl, tl)
|
|
45 |
DEF_HELPER_2(msachiu, tl, tl, tl)
|
|
43 | 46 |
|
44 | 47 |
#ifndef CONFIG_USER_ONLY |
45 | 48 |
/* CP0 helpers */ |
46 |
DEF_HELPER(target_ulong, do_mfc0_mvpcontrol, (void))
|
|
47 |
DEF_HELPER(target_ulong, do_mfc0_mvpconf0, (void))
|
|
48 |
DEF_HELPER(target_ulong, do_mfc0_mvpconf1, (void))
|
|
49 |
DEF_HELPER(target_ulong, do_mfc0_random, (void))
|
|
50 |
DEF_HELPER(target_ulong, do_mfc0_tcstatus, (void))
|
|
51 |
DEF_HELPER(target_ulong, do_mftc0_tcstatus, (void))
|
|
52 |
DEF_HELPER(target_ulong, do_mfc0_tcbind, (void))
|
|
53 |
DEF_HELPER(target_ulong, do_mftc0_tcbind, (void))
|
|
54 |
DEF_HELPER(target_ulong, do_mfc0_tcrestart, (void))
|
|
55 |
DEF_HELPER(target_ulong, do_mftc0_tcrestart, (void))
|
|
56 |
DEF_HELPER(target_ulong, do_mfc0_tchalt, (void))
|
|
57 |
DEF_HELPER(target_ulong, do_mftc0_tchalt, (void))
|
|
58 |
DEF_HELPER(target_ulong, do_mfc0_tccontext, (void))
|
|
59 |
DEF_HELPER(target_ulong, do_mftc0_tccontext, (void))
|
|
60 |
DEF_HELPER(target_ulong, do_mfc0_tcschedule, (void))
|
|
61 |
DEF_HELPER(target_ulong, do_mftc0_tcschedule, (void))
|
|
62 |
DEF_HELPER(target_ulong, do_mfc0_tcschefback, (void))
|
|
63 |
DEF_HELPER(target_ulong, do_mftc0_tcschefback, (void))
|
|
64 |
DEF_HELPER(target_ulong, do_mfc0_count, (void))
|
|
65 |
DEF_HELPER(target_ulong, do_mftc0_entryhi, (void))
|
|
66 |
DEF_HELPER(target_ulong, do_mftc0_status, (void))
|
|
67 |
DEF_HELPER(target_ulong, do_mfc0_lladdr, (void))
|
|
68 |
DEF_HELPER(target_ulong, do_mfc0_watchlo, (uint32_t sel))
|
|
69 |
DEF_HELPER(target_ulong, do_mfc0_watchhi, (uint32_t sel))
|
|
70 |
DEF_HELPER(target_ulong, do_mfc0_debug, (void))
|
|
71 |
DEF_HELPER(target_ulong, do_mftc0_debug, (void))
|
|
49 |
DEF_HELPER_0(mfc0_mvpcontrol, tl)
|
|
50 |
DEF_HELPER_0(mfc0_mvpconf0, tl)
|
|
51 |
DEF_HELPER_0(mfc0_mvpconf1, tl)
|
|
52 |
DEF_HELPER_0(mfc0_random, tl)
|
|
53 |
DEF_HELPER_0(mfc0_tcstatus, tl)
|
|
54 |
DEF_HELPER_0(mftc0_tcstatus, tl)
|
|
55 |
DEF_HELPER_0(mfc0_tcbind, tl)
|
|
56 |
DEF_HELPER_0(mftc0_tcbind, tl)
|
|
57 |
DEF_HELPER_0(mfc0_tcrestart, tl)
|
|
58 |
DEF_HELPER_0(mftc0_tcrestart, tl)
|
|
59 |
DEF_HELPER_0(mfc0_tchalt, tl)
|
|
60 |
DEF_HELPER_0(mftc0_tchalt, tl)
|
|
61 |
DEF_HELPER_0(mfc0_tccontext, tl)
|
|
62 |
DEF_HELPER_0(mftc0_tccontext, tl)
|
|
63 |
DEF_HELPER_0(mfc0_tcschedule, tl)
|
|
64 |
DEF_HELPER_0(mftc0_tcschedule, tl)
|
|
65 |
DEF_HELPER_0(mfc0_tcschefback, tl)
|
|
66 |
DEF_HELPER_0(mftc0_tcschefback, tl)
|
|
67 |
DEF_HELPER_0(mfc0_count, tl)
|
|
68 |
DEF_HELPER_0(mftc0_entryhi, tl)
|
|
69 |
DEF_HELPER_0(mftc0_status, tl)
|
|
70 |
DEF_HELPER_0(mfc0_lladdr, tl)
|
|
71 |
DEF_HELPER_1(mfc0_watchlo, tl, i32)
|
|
72 |
DEF_HELPER_1(mfc0_watchhi, tl, i32)
|
|
73 |
DEF_HELPER_0(mfc0_debug, tl)
|
|
74 |
DEF_HELPER_0(mftc0_debug, tl)
|
|
72 | 75 |
#ifdef TARGET_MIPS64 |
73 |
DEF_HELPER(target_ulong, do_dmfc0_tcrestart, (void))
|
|
74 |
DEF_HELPER(target_ulong, do_dmfc0_tchalt, (void))
|
|
75 |
DEF_HELPER(target_ulong, do_dmfc0_tccontext, (void))
|
|
76 |
DEF_HELPER(target_ulong, do_dmfc0_tcschedule, (void))
|
|
77 |
DEF_HELPER(target_ulong, do_dmfc0_tcschefback, (void))
|
|
78 |
DEF_HELPER(target_ulong, do_dmfc0_lladdr, (void))
|
|
79 |
DEF_HELPER(target_ulong, do_dmfc0_watchlo, (uint32_t sel))
|
|
76 |
DEF_HELPER_0(dmfc0_tcrestart, tl)
|
|
77 |
DEF_HELPER_0(dmfc0_tchalt, tl)
|
|
78 |
DEF_HELPER_0(dmfc0_tccontext, tl)
|
|
79 |
DEF_HELPER_0(dmfc0_tcschedule, tl)
|
|
80 |
DEF_HELPER_0(dmfc0_tcschefback, tl)
|
|
81 |
DEF_HELPER_0(dmfc0_lladdr, tl)
|
|
82 |
DEF_HELPER_1(dmfc0_watchlo, tl, i32)
|
|
80 | 83 |
#endif /* TARGET_MIPS64 */ |
81 | 84 |
|
82 |
DEF_HELPER(void, do_mtc0_index, (target_ulong t0))
|
|
83 |
DEF_HELPER(void, do_mtc0_mvpcontrol, (target_ulong t0))
|
|
84 |
DEF_HELPER(void, do_mtc0_vpecontrol, (target_ulong t0))
|
|
85 |
DEF_HELPER(void, do_mtc0_vpeconf0, (target_ulong t0))
|
|
86 |
DEF_HELPER(void, do_mtc0_vpeconf1, (target_ulong t0))
|
|
87 |
DEF_HELPER(void, do_mtc0_yqmask, (target_ulong t0))
|
|
88 |
DEF_HELPER(void, do_mtc0_vpeopt, (target_ulong t0))
|
|
89 |
DEF_HELPER(void, do_mtc0_entrylo0, (target_ulong t0))
|
|
90 |
DEF_HELPER(void, do_mtc0_tcstatus, (target_ulong t0))
|
|
91 |
DEF_HELPER(void, do_mttc0_tcstatus, (target_ulong t0))
|
|
92 |
DEF_HELPER(void, do_mtc0_tcbind, (target_ulong t0))
|
|
93 |
DEF_HELPER(void, do_mttc0_tcbind, (target_ulong t0))
|
|
94 |
DEF_HELPER(void, do_mtc0_tcrestart, (target_ulong t0))
|
|
95 |
DEF_HELPER(void, do_mttc0_tcrestart, (target_ulong t0))
|
|
96 |
DEF_HELPER(void, do_mtc0_tchalt, (target_ulong t0))
|
|
97 |
DEF_HELPER(void, do_mttc0_tchalt, (target_ulong t0))
|
|
98 |
DEF_HELPER(void, do_mtc0_tccontext, (target_ulong t0))
|
|
99 |
DEF_HELPER(void, do_mttc0_tccontext, (target_ulong t0))
|
|
100 |
DEF_HELPER(void, do_mtc0_tcschedule, (target_ulong t0))
|
|
101 |
DEF_HELPER(void, do_mttc0_tcschedule, (target_ulong t0))
|
|
102 |
DEF_HELPER(void, do_mtc0_tcschefback, (target_ulong t0))
|
|
103 |
DEF_HELPER(void, do_mttc0_tcschefback, (target_ulong t0))
|
|
104 |
DEF_HELPER(void, do_mtc0_entrylo1, (target_ulong t0))
|
|
105 |
DEF_HELPER(void, do_mtc0_context, (target_ulong t0))
|
|
106 |
DEF_HELPER(void, do_mtc0_pagemask, (target_ulong t0))
|
|
107 |
DEF_HELPER(void, do_mtc0_pagegrain, (target_ulong t0))
|
|
108 |
DEF_HELPER(void, do_mtc0_wired, (target_ulong t0))
|
|
109 |
DEF_HELPER(void, do_mtc0_srsconf0, (target_ulong t0))
|
|
110 |
DEF_HELPER(void, do_mtc0_srsconf1, (target_ulong t0))
|
|
111 |
DEF_HELPER(void, do_mtc0_srsconf2, (target_ulong t0))
|
|
112 |
DEF_HELPER(void, do_mtc0_srsconf3, (target_ulong t0))
|
|
113 |
DEF_HELPER(void, do_mtc0_srsconf4, (target_ulong t0))
|
|
114 |
DEF_HELPER(void, do_mtc0_hwrena, (target_ulong t0))
|
|
115 |
DEF_HELPER(void, do_mtc0_count, (target_ulong t0))
|
|
116 |
DEF_HELPER(void, do_mtc0_entryhi, (target_ulong t0))
|
|
117 |
DEF_HELPER(void, do_mttc0_entryhi, (target_ulong t0))
|
|
118 |
DEF_HELPER(void, do_mtc0_compare, (target_ulong t0))
|
|
119 |
DEF_HELPER(void, do_mtc0_status, (target_ulong t0))
|
|
120 |
DEF_HELPER(void, do_mttc0_status, (target_ulong t0))
|
|
121 |
DEF_HELPER(void, do_mtc0_intctl, (target_ulong t0))
|
|
122 |
DEF_HELPER(void, do_mtc0_srsctl, (target_ulong t0))
|
|
123 |
DEF_HELPER(void, do_mtc0_cause, (target_ulong t0))
|
|
124 |
DEF_HELPER(void, do_mtc0_ebase, (target_ulong t0))
|
|
125 |
DEF_HELPER(void, do_mtc0_config0, (target_ulong t0))
|
|
126 |
DEF_HELPER(void, do_mtc0_config2, (target_ulong t0))
|
|
127 |
DEF_HELPER(void, do_mtc0_watchlo, (target_ulong t0, uint32_t sel))
|
|
128 |
DEF_HELPER(void, do_mtc0_watchhi, (target_ulong t0, uint32_t sel))
|
|
129 |
DEF_HELPER(void, do_mtc0_xcontext, (target_ulong t0))
|
|
130 |
DEF_HELPER(void, do_mtc0_framemask, (target_ulong t0))
|
|
131 |
DEF_HELPER(void, do_mtc0_debug, (target_ulong t0))
|
|
132 |
DEF_HELPER(void, do_mttc0_debug, (target_ulong t0))
|
|
133 |
DEF_HELPER(void, do_mtc0_performance0, (target_ulong t0))
|
|
134 |
DEF_HELPER(void, do_mtc0_taglo, (target_ulong t0))
|
|
135 |
DEF_HELPER(void, do_mtc0_datalo, (target_ulong t0))
|
|
136 |
DEF_HELPER(void, do_mtc0_taghi, (target_ulong t0))
|
|
137 |
DEF_HELPER(void, do_mtc0_datahi, (target_ulong t0))
|
|
85 |
DEF_HELPER_1(mtc0_index, void, tl)
|
|
86 |
DEF_HELPER_1(mtc0_mvpcontrol, void, tl)
|
|
87 |
DEF_HELPER_1(mtc0_vpecontrol, void, tl)
|
|
88 |
DEF_HELPER_1(mtc0_vpeconf0, void, tl)
|
|
89 |
DEF_HELPER_1(mtc0_vpeconf1, void, tl)
|
|
90 |
DEF_HELPER_1(mtc0_yqmask, void, tl)
|
|
91 |
DEF_HELPER_1(mtc0_vpeopt, void, tl)
|
|
92 |
DEF_HELPER_1(mtc0_entrylo0, void, tl)
|
|
93 |
DEF_HELPER_1(mtc0_tcstatus, void, tl)
|
|
94 |
DEF_HELPER_1(mttc0_tcstatus, void, tl)
|
|
95 |
DEF_HELPER_1(mtc0_tcbind, void, tl)
|
|
96 |
DEF_HELPER_1(mttc0_tcbind, void, tl)
|
|
97 |
DEF_HELPER_1(mtc0_tcrestart, void, tl)
|
|
98 |
DEF_HELPER_1(mttc0_tcrestart, void, tl)
|
|
99 |
DEF_HELPER_1(mtc0_tchalt, void, tl)
|
|
100 |
DEF_HELPER_1(mttc0_tchalt, void, tl)
|
|
101 |
DEF_HELPER_1(mtc0_tccontext, void, tl)
|
|
102 |
DEF_HELPER_1(mttc0_tccontext, void, tl)
|
|
103 |
DEF_HELPER_1(mtc0_tcschedule, void, tl)
|
|
104 |
DEF_HELPER_1(mttc0_tcschedule, void, tl)
|
|
105 |
DEF_HELPER_1(mtc0_tcschefback, void, tl)
|
|
106 |
DEF_HELPER_1(mttc0_tcschefback, void, tl)
|
|
107 |
DEF_HELPER_1(mtc0_entrylo1, void, tl)
|
|
108 |
DEF_HELPER_1(mtc0_context, void, tl)
|
|
109 |
DEF_HELPER_1(mtc0_pagemask, void, tl)
|
|
110 |
DEF_HELPER_1(mtc0_pagegrain, void, tl)
|
|
111 |
DEF_HELPER_1(mtc0_wired, void, tl)
|
|
112 |
DEF_HELPER_1(mtc0_srsconf0, void, tl)
|
|
113 |
DEF_HELPER_1(mtc0_srsconf1, void, tl)
|
|
114 |
DEF_HELPER_1(mtc0_srsconf2, void, tl)
|
|
115 |
DEF_HELPER_1(mtc0_srsconf3, void, tl)
|
|
116 |
DEF_HELPER_1(mtc0_srsconf4, void, tl)
|
|
117 |
DEF_HELPER_1(mtc0_hwrena, void, tl)
|
|
118 |
DEF_HELPER_1(mtc0_count, void, tl)
|
|
119 |
DEF_HELPER_1(mtc0_entryhi, void, tl)
|
|
120 |
DEF_HELPER_1(mttc0_entryhi, void, tl)
|
|
121 |
DEF_HELPER_1(mtc0_compare, void, tl)
|
|
122 |
DEF_HELPER_1(mtc0_status, void, tl)
|
|
123 |
DEF_HELPER_1(mttc0_status, void, tl)
|
|
124 |
DEF_HELPER_1(mtc0_intctl, void, tl)
|
|
125 |
DEF_HELPER_1(mtc0_srsctl, void, tl)
|
|
126 |
DEF_HELPER_1(mtc0_cause, void, tl)
|
|
127 |
DEF_HELPER_1(mtc0_ebase, void, tl)
|
|
128 |
DEF_HELPER_1(mtc0_config0, void, tl)
|
|
129 |
DEF_HELPER_1(mtc0_config2, void, tl)
|
|
130 |
DEF_HELPER_2(mtc0_watchlo, void, tl, i32)
|
|
131 |
DEF_HELPER_2(mtc0_watchhi, void, tl, i32)
|
|
132 |
DEF_HELPER_1(mtc0_xcontext, void, tl)
|
|
133 |
DEF_HELPER_1(mtc0_framemask, void, tl)
|
|
134 |
DEF_HELPER_1(mtc0_debug, void, tl)
|
|
135 |
DEF_HELPER_1(mttc0_debug, void, tl)
|
|
136 |
DEF_HELPER_1(mtc0_performance0, void, tl)
|
|
137 |
DEF_HELPER_1(mtc0_taglo, void, tl)
|
|
138 |
DEF_HELPER_1(mtc0_datalo, void, tl)
|
|
139 |
DEF_HELPER_1(mtc0_taghi, void, tl)
|
|
140 |
DEF_HELPER_1(mtc0_datahi, void, tl)
|
|
138 | 141 |
|
139 | 142 |
/* MIPS MT functions */ |
140 |
DEF_HELPER(target_ulong, do_mftgpr, (uint32_t sel))
|
|
141 |
DEF_HELPER(target_ulong, do_mftlo, (uint32_t sel))
|
|
142 |
DEF_HELPER(target_ulong, do_mfthi, (uint32_t sel))
|
|
143 |
DEF_HELPER(target_ulong, do_mftacx, (uint32_t sel))
|
|
144 |
DEF_HELPER(target_ulong, do_mftdsp, (void))
|
|
145 |
DEF_HELPER(void, do_mttgpr, (target_ulong t0, uint32_t sel))
|
|
146 |
DEF_HELPER(void, do_mttlo, (target_ulong t0, uint32_t sel))
|
|
147 |
DEF_HELPER(void, do_mtthi, (target_ulong t0, uint32_t sel))
|
|
148 |
DEF_HELPER(void, do_mttacx, (target_ulong t0, uint32_t sel))
|
|
149 |
DEF_HELPER(void, do_mttdsp, (target_ulong t0))
|
|
150 |
DEF_HELPER(target_ulong, do_dmt, (target_ulong t0))
|
|
151 |
DEF_HELPER(target_ulong, do_emt, (target_ulong t0))
|
|
152 |
DEF_HELPER(target_ulong, do_dvpe, (target_ulong t0))
|
|
153 |
DEF_HELPER(target_ulong, do_evpe, (target_ulong t0))
|
|
143 |
DEF_HELPER_1(mftgpr, tl, i32);
|
|
144 |
DEF_HELPER_1(mftlo, tl, i32)
|
|
145 |
DEF_HELPER_1(mfthi, tl, i32)
|
|
146 |
DEF_HELPER_1(mftacx, tl, i32)
|
|
147 |
DEF_HELPER_0(mftdsp, tl)
|
|
148 |
DEF_HELPER_2(mttgpr, void, tl, i32)
|
|
149 |
DEF_HELPER_2(mttlo, void, tl, i32)
|
|
150 |
DEF_HELPER_2(mtthi, void, tl, i32)
|
|
151 |
DEF_HELPER_2(mttacx, void, tl, i32)
|
|
152 |
DEF_HELPER_1(mttdsp, void, tl)
|
|
153 |
DEF_HELPER_1(dmt, tl, tl)
|
|
154 |
DEF_HELPER_1(emt, tl, tl)
|
|
155 |
DEF_HELPER_1(dvpe, tl, tl)
|
|
156 |
DEF_HELPER_1(evpe, tl, tl)
|
|
154 | 157 |
#endif /* !CONFIG_USER_ONLY */ |
155 |
DEF_HELPER(void, do_fork, (target_ulong t0, target_ulong t1))
|
|
156 |
DEF_HELPER(target_ulong, do_yield, (target_ulong t0))
|
|
158 |
DEF_HELPER_2(fork, void, tl, tl)
|
|
159 |
DEF_HELPER_1(yield, tl, tl)
|
|
157 | 160 |
|
158 | 161 |
/* CP1 functions */ |
159 |
DEF_HELPER(target_ulong, do_cfc1, (uint32_t reg))
|
|
160 |
DEF_HELPER(void, do_ctc1, (target_ulong t0, uint32_t reg))
|
|
162 |
DEF_HELPER_1(cfc1, tl, i32)
|
|
163 |
DEF_HELPER_2(ctc1, void, tl, i32)
|
|
161 | 164 |
|
162 |
DEF_HELPER(uint64_t, do_float_cvtd_s, (uint32_t fst0))
|
|
163 |
DEF_HELPER(uint64_t, do_float_cvtd_w, (uint32_t wt0))
|
|
164 |
DEF_HELPER(uint64_t, do_float_cvtd_l, (uint64_t dt0))
|
|
165 |
DEF_HELPER(uint64_t, do_float_cvtl_d, (uint64_t fd0))
|
|
166 |
DEF_HELPER(uint64_t, do_float_cvtl_s, (uint32_t fst0))
|
|
167 |
DEF_HELPER(uint64_t, do_float_cvtps_pw, (uint64_t dt0))
|
|
168 |
DEF_HELPER(uint64_t, do_float_cvtpw_ps, (uint64_t fdt0))
|
|
169 |
DEF_HELPER(uint32_t, do_float_cvts_d, (uint64_t fd0))
|
|
170 |
DEF_HELPER(uint32_t, do_float_cvts_w, (uint32_t wt0))
|
|
171 |
DEF_HELPER(uint32_t, do_float_cvts_l, (uint64_t dt0))
|
|
172 |
DEF_HELPER(uint32_t, do_float_cvts_pl, (uint32_t wt0))
|
|
173 |
DEF_HELPER(uint32_t, do_float_cvts_pu, (uint32_t wth0))
|
|
174 |
DEF_HELPER(uint32_t, do_float_cvtw_s, (uint32_t fst0))
|
|
175 |
DEF_HELPER(uint32_t, do_float_cvtw_d, (uint64_t fd0))
|
|
165 |
DEF_HELPER_1(float_cvtd_s, i64, i32)
|
|
166 |
DEF_HELPER_1(float_cvtd_w, i64, i32)
|
|
167 |
DEF_HELPER_1(float_cvtd_l, i64, i64)
|
|
168 |
DEF_HELPER_1(float_cvtl_d, i64, i64)
|
|
169 |
DEF_HELPER_1(float_cvtl_s, i64, i32)
|
|
170 |
DEF_HELPER_1(float_cvtps_pw, i64, i64)
|
|
171 |
DEF_HELPER_1(float_cvtpw_ps, i64, i64)
|
|
172 |
DEF_HELPER_1(float_cvts_d, i32, i64)
|
|
173 |
DEF_HELPER_1(float_cvts_w, i32, i32)
|
|
174 |
DEF_HELPER_1(float_cvts_l, i32, i64)
|
|
175 |
DEF_HELPER_1(float_cvts_pl, i32, i32)
|
|
176 |
DEF_HELPER_1(float_cvts_pu, i32, i32)
|
|
177 |
DEF_HELPER_1(float_cvtw_s, i32, i32)
|
|
178 |
DEF_HELPER_1(float_cvtw_d, i32, i64)
|
|
176 | 179 |
|
177 |
DEF_HELPER(uint64_t, do_float_addr_ps, (uint64_t fdt0, uint64_t fdt1))
|
|
178 |
DEF_HELPER(uint64_t, do_float_mulr_ps, (uint64_t fdt0, uint64_t fdt1))
|
|
180 |
DEF_HELPER_2(float_addr_ps, i64, i64, i64)
|
|
181 |
DEF_HELPER_2(float_mulr_ps, i64, i64, i64)
|
|
179 | 182 |
|
180 |
#define FOP_PROTO(op) \
|
|
181 |
DEF_HELPER(uint64_t, do_float_ ## op ## l_s, (uint32_t fst0)) \
|
|
182 |
DEF_HELPER(uint64_t, do_float_ ## op ## l_d, (uint64_t fdt0)) \
|
|
183 |
DEF_HELPER(uint32_t, do_float_ ## op ## w_s, (uint32_t fst0)) \
|
|
184 |
DEF_HELPER(uint32_t, do_float_ ## op ## w_d, (uint64_t fdt0))
|
|
183 |
#define FOP_PROTO(op) \ |
|
184 |
DEF_HELPER_1(float_ ## op ## l_s, i64, i32) \
|
|
185 |
DEF_HELPER_1(float_ ## op ## l_d, i64, i64) \
|
|
186 |
DEF_HELPER_1(float_ ## op ## w_s, i32, i32) \
|
|
187 |
DEF_HELPER_1(float_ ## op ## w_d, i32, i64)
|
|
185 | 188 |
FOP_PROTO(round) |
186 | 189 |
FOP_PROTO(trunc) |
187 | 190 |
FOP_PROTO(ceil) |
188 | 191 |
FOP_PROTO(floor) |
189 | 192 |
#undef FOP_PROTO |
190 | 193 |
|
191 |
#define FOP_PROTO(op) \
|
|
192 |
DEF_HELPER(uint32_t, do_float_ ## op ## _s, (uint32_t fst0)) \
|
|
193 |
DEF_HELPER(uint64_t, do_float_ ## op ## _d, (uint64_t fdt0))
|
|
194 |
#define FOP_PROTO(op) \ |
|
195 |
DEF_HELPER_1(float_ ## op ## _s, i32, i32) \
|
|
196 |
DEF_HELPER_1(float_ ## op ## _d, i64, i64)
|
|
194 | 197 |
FOP_PROTO(sqrt) |
195 | 198 |
FOP_PROTO(rsqrt) |
196 | 199 |
FOP_PROTO(recip) |
197 | 200 |
#undef FOP_PROTO |
198 | 201 |
|
199 |
#define FOP_PROTO(op) \
|
|
200 |
DEF_HELPER(uint32_t, do_float_ ## op ## _s, (uint32_t fst0)) \
|
|
201 |
DEF_HELPER(uint64_t, do_float_ ## op ## _d, (uint64_t fdt0)) \
|
|
202 |
DEF_HELPER(uint64_t, do_float_ ## op ## _ps, (uint64_t fdt0))
|
|
202 |
#define FOP_PROTO(op) \ |
|
203 |
DEF_HELPER_1(float_ ## op ## _s, i32, i32) \
|
|
204 |
DEF_HELPER_1(float_ ## op ## _d, i64, i64) \
|
|
205 |
DEF_HELPER_1(float_ ## op ## _ps, i64, i64)
|
|
203 | 206 |
FOP_PROTO(abs) |
204 | 207 |
FOP_PROTO(chs) |
205 | 208 |
FOP_PROTO(recip1) |
206 | 209 |
FOP_PROTO(rsqrt1) |
207 | 210 |
#undef FOP_PROTO |
208 | 211 |
|
209 |
#define FOP_PROTO(op) \
|
|
210 |
DEF_HELPER(uint32_t, do_float_ ## op ## _s, (uint32_t fst0, uint32_t fst2)) \
|
|
211 |
DEF_HELPER(uint64_t, do_float_ ## op ## _d, (uint64_t fdt0, uint64_t fdt2)) \
|
|
212 |
DEF_HELPER(uint64_t, do_float_ ## op ## _ps, (uint64_t fdt0, uint64_t fdt2))
|
|
212 |
#define FOP_PROTO(op) \ |
|
213 |
DEF_HELPER_2(float_ ## op ## _s, i32, i32, i32) \
|
|
214 |
DEF_HELPER_2(float_ ## op ## _d, i64, i64, i64) \
|
|
215 |
DEF_HELPER_2(float_ ## op ## _ps, i64, i64, i64)
|
|
213 | 216 |
FOP_PROTO(add) |
214 | 217 |
FOP_PROTO(sub) |
215 | 218 |
FOP_PROTO(mul) |
... | ... | |
218 | 221 |
FOP_PROTO(rsqrt2) |
219 | 222 |
#undef FOP_PROTO |
220 | 223 |
|
221 |
#define FOP_PROTO(op) \ |
|
222 |
DEF_HELPER(uint32_t, do_float_ ## op ## _s, (uint32_t fst0, uint32_t fst1, \ |
|
223 |
uint32_t fst2)) \ |
|
224 |
DEF_HELPER(uint64_t, do_float_ ## op ## _d, (uint64_t fdt0, uint64_t fdt1, \ |
|
225 |
uint64_t fdt2)) \ |
|
226 |
DEF_HELPER(uint64_t, do_float_ ## op ## _ps, (uint64_t fdt0, uint64_t fdt1, \ |
|
227 |
uint64_t fdt2)) |
|
224 |
#define FOP_PROTO(op) \ |
|
225 |
DEF_HELPER_3(float_ ## op ## _s, i32, i32, i32, i32) \ |
|
226 |
DEF_HELPER_3(float_ ## op ## _d, i64, i64, i64, i64) \ |
|
227 |
DEF_HELPER_3(float_ ## op ## _ps, i64, i64, i64, i64) |
|
228 | 228 |
FOP_PROTO(muladd) |
229 | 229 |
FOP_PROTO(mulsub) |
230 | 230 |
FOP_PROTO(nmuladd) |
231 | 231 |
FOP_PROTO(nmulsub) |
232 | 232 |
#undef FOP_PROTO |
233 | 233 |
|
234 |
#define FOP_PROTO(op) \
|
|
235 |
DEF_HELPER(void, do_cmp_d_ ## op, (uint64_t fdt0, uint64_t fdt1, int cc)) \
|
|
236 |
DEF_HELPER(void, do_cmpabs_d_ ## op, (uint64_t fdt0, uint64_t fdt1, int cc)) \
|
|
237 |
DEF_HELPER(void, do_cmp_s_ ## op, (uint32_t fst0, uint32_t fst1, int cc)) \
|
|
238 |
DEF_HELPER(void, do_cmpabs_s_ ## op, (uint32_t fst0, uint32_t fst1, int cc)) \
|
|
239 |
DEF_HELPER(void, do_cmp_ps_ ## op, (uint64_t fdt0, uint64_t fdt1, int cc)) \
|
|
240 |
DEF_HELPER(void, do_cmpabs_ps_ ## op, (uint64_t fdt0, uint64_t fdt1, int cc))
|
|
234 |
#define FOP_PROTO(op) \ |
|
235 |
DEF_HELPER_3(cmp_d_ ## op, void, i64, i64, int) \
|
|
236 |
DEF_HELPER_3(cmpabs_d_ ## op, void, i64, i64, int) \
|
|
237 |
DEF_HELPER_3(cmp_s_ ## op, void, i32, i32, int) \
|
|
238 |
DEF_HELPER_3(cmpabs_s_ ## op, void, i32, i32, int) \
|
|
239 |
DEF_HELPER_3(cmp_ps_ ## op, void, i64, i64, int) \
|
|
240 |
DEF_HELPER_3(cmpabs_ps_ ## op, void, i64, i64, int)
|
|
241 | 241 |
FOP_PROTO(f) |
242 | 242 |
FOP_PROTO(un) |
243 | 243 |
FOP_PROTO(eq) |
... | ... | |
258 | 258 |
|
259 | 259 |
/* Special functions */ |
260 | 260 |
#ifndef CONFIG_USER_ONLY |
261 |
DEF_HELPER(target_ulong, do_di, (void)) |
|
262 |
DEF_HELPER(target_ulong, do_ei, (void)) |
|
263 |
DEF_HELPER(void, do_eret, (void)) |
|
264 |
DEF_HELPER(void, do_deret, (void)) |
|
261 |
DEF_HELPER_0(tlbwi, void) |
|
262 |
DEF_HELPER_0(tlbwr, void) |
|
263 |
DEF_HELPER_0(tlbp, void) |
|
264 |
DEF_HELPER_0(tlbr, void) |
|
265 |
DEF_HELPER_0(di, tl) |
|
266 |
DEF_HELPER_0(ei, tl) |
|
267 |
DEF_HELPER_0(eret, void) |
|
268 |
DEF_HELPER_0(deret, void) |
|
265 | 269 |
#endif /* !CONFIG_USER_ONLY */ |
266 |
DEF_HELPER(target_ulong, do_rdhwr_cpunum, (void)) |
|
267 |
DEF_HELPER(target_ulong, do_rdhwr_synci_step, (void)) |
|
268 |
DEF_HELPER(target_ulong, do_rdhwr_cc, (void)) |
|
269 |
DEF_HELPER(target_ulong, do_rdhwr_ccres, (void)) |
|
270 |
DEF_HELPER(void, do_pmon, (int function)) |
|
271 |
DEF_HELPER(void, do_wait, (void)) |
|
270 |
DEF_HELPER_0(rdhwr_cpunum, tl) |
|
271 |
DEF_HELPER_0(rdhwr_synci_step, tl) |
|
272 |
DEF_HELPER_0(rdhwr_cc, tl) |
|
273 |
DEF_HELPER_0(rdhwr_ccres, tl) |
|
274 |
DEF_HELPER_1(pmon, void, int) |
|
275 |
DEF_HELPER_0(wait, void) |
|
276 |
|
|
277 |
#include "def-helper.h" |
Also available in: Unified diff