root / target-mips / helper.h @ c596defd
History | View | Annotate | Download (7 kB)
1 |
#ifndef DEF_HELPER
|
---|---|
2 |
#define DEF_HELPER(ret, name, params) ret name params;
|
3 |
#endif
|
4 |
|
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)) |
8 |
|
9 |
DEF_HELPER(void, do_clo, (void)) |
10 |
DEF_HELPER(void, do_clz, (void)) |
11 |
#ifdef TARGET_MIPS64
|
12 |
DEF_HELPER(void, do_dclo, (void)) |
13 |
DEF_HELPER(void, do_dclz, (void)) |
14 |
#endif
|
15 |
|
16 |
/* CP0 helpers */
|
17 |
#ifndef CONFIG_USER_ONLY
|
18 |
DEF_HELPER(void, do_mfc0_mvpcontrol, (void)) |
19 |
DEF_HELPER(void, do_mfc0_mvpconf0, (void)) |
20 |
DEF_HELPER(void, do_mfc0_mvpconf1, (void)) |
21 |
DEF_HELPER(void, do_mfc0_random, (void)) |
22 |
DEF_HELPER(void, do_mfc0_tcstatus, (void)) |
23 |
DEF_HELPER(void, do_mftc0_tcstatus, (void)) |
24 |
DEF_HELPER(void, do_mfc0_tcbind, (void)) |
25 |
DEF_HELPER(void, do_mftc0_tcbind, (void)) |
26 |
DEF_HELPER(void, do_mfc0_tcrestart, (void)) |
27 |
DEF_HELPER(void, do_mftc0_tcrestart, (void)) |
28 |
DEF_HELPER(void, do_mfc0_tchalt, (void)) |
29 |
DEF_HELPER(void, do_mftc0_tchalt, (void)) |
30 |
DEF_HELPER(void, do_mfc0_tccontext, (void)) |
31 |
DEF_HELPER(void, do_mftc0_tccontext, (void)) |
32 |
DEF_HELPER(void, do_mfc0_tcschedule, (void)) |
33 |
DEF_HELPER(void, do_mftc0_tcschedule, (void)) |
34 |
DEF_HELPER(void, do_mfc0_tcschefback, (void)) |
35 |
DEF_HELPER(void, do_mftc0_tcschefback, (void)) |
36 |
DEF_HELPER(void, do_mfc0_count, (void)) |
37 |
DEF_HELPER(void, do_mftc0_entryhi, (void)) |
38 |
DEF_HELPER(void, do_mftc0_status, (void)) |
39 |
DEF_HELPER(void, do_mfc0_lladdr, (void)) |
40 |
DEF_HELPER(void, do_mfc0_watchlo, (uint32_t sel))
|
41 |
DEF_HELPER(void, do_mfc0_watchhi, (uint32_t sel))
|
42 |
DEF_HELPER(void, do_mfc0_debug, (void)) |
43 |
DEF_HELPER(void, do_mftc0_debug, (void)) |
44 |
#ifdef TARGET_MIPS64
|
45 |
DEF_HELPER(void, do_dmfc0_tcrestart, (void)) |
46 |
DEF_HELPER(void, do_dmfc0_tchalt, (void)) |
47 |
DEF_HELPER(void, do_dmfc0_tccontext, (void)) |
48 |
DEF_HELPER(void, do_dmfc0_tcschedule, (void)) |
49 |
DEF_HELPER(void, do_dmfc0_tcschefback, (void)) |
50 |
DEF_HELPER(void, do_dmfc0_lladdr, (void)) |
51 |
DEF_HELPER(void, do_dmfc0_watchlo, (uint32_t sel))
|
52 |
#endif /* TARGET_MIPS64 */ |
53 |
|
54 |
DEF_HELPER(void, do_mtc0_index, (void)) |
55 |
DEF_HELPER(void, do_mtc0_mvpcontrol, (void)) |
56 |
DEF_HELPER(void, do_mtc0_vpecontrol, (void)) |
57 |
DEF_HELPER(void, do_mtc0_vpeconf0, (void)) |
58 |
DEF_HELPER(void, do_mtc0_vpeconf1, (void)) |
59 |
DEF_HELPER(void, do_mtc0_yqmask, (void)) |
60 |
DEF_HELPER(void, do_mtc0_vpeopt, (void)) |
61 |
DEF_HELPER(void, do_mtc0_entrylo0, (void)) |
62 |
DEF_HELPER(void, do_mtc0_tcstatus, (void)) |
63 |
DEF_HELPER(void, do_mttc0_tcstatus, (void)) |
64 |
DEF_HELPER(void, do_mtc0_tcbind, (void)) |
65 |
DEF_HELPER(void, do_mttc0_tcbind, (void)) |
66 |
DEF_HELPER(void, do_mtc0_tcrestart, (void)) |
67 |
DEF_HELPER(void, do_mttc0_tcrestart, (void)) |
68 |
DEF_HELPER(void, do_mtc0_tchalt, (void)) |
69 |
DEF_HELPER(void, do_mttc0_tchalt, (void)) |
70 |
DEF_HELPER(void, do_mtc0_tccontext, (void)) |
71 |
DEF_HELPER(void, do_mttc0_tccontext, (void)) |
72 |
DEF_HELPER(void, do_mtc0_tcschedule, (void)) |
73 |
DEF_HELPER(void, do_mttc0_tcschedule, (void)) |
74 |
DEF_HELPER(void, do_mtc0_tcschefback, (void)) |
75 |
DEF_HELPER(void, do_mttc0_tcschefback, (void)) |
76 |
DEF_HELPER(void, do_mtc0_entrylo1, (void)) |
77 |
DEF_HELPER(void, do_mtc0_context, (void)) |
78 |
DEF_HELPER(void, do_mtc0_pagemask, (void)) |
79 |
DEF_HELPER(void, do_mtc0_pagegrain, (void)) |
80 |
DEF_HELPER(void, do_mtc0_wired, (void)) |
81 |
DEF_HELPER(void, do_mtc0_srsconf0, (void)) |
82 |
DEF_HELPER(void, do_mtc0_srsconf1, (void)) |
83 |
DEF_HELPER(void, do_mtc0_srsconf2, (void)) |
84 |
DEF_HELPER(void, do_mtc0_srsconf3, (void)) |
85 |
DEF_HELPER(void, do_mtc0_srsconf4, (void)) |
86 |
DEF_HELPER(void, do_mtc0_hwrena, (void)) |
87 |
DEF_HELPER(void, do_mtc0_count, (void)) |
88 |
DEF_HELPER(void, do_mtc0_entryhi, (void)) |
89 |
DEF_HELPER(void, do_mttc0_entryhi, (void)) |
90 |
DEF_HELPER(void, do_mtc0_compare, (void)) |
91 |
DEF_HELPER(void, do_mtc0_status, (void)) |
92 |
DEF_HELPER(void, do_mttc0_status, (void)) |
93 |
DEF_HELPER(void, do_mtc0_intctl, (void)) |
94 |
DEF_HELPER(void, do_mtc0_srsctl, (void)) |
95 |
DEF_HELPER(void, do_mtc0_cause, (void)) |
96 |
DEF_HELPER(void, do_mtc0_ebase, (void)) |
97 |
DEF_HELPER(void, do_mtc0_config0, (void)) |
98 |
DEF_HELPER(void, do_mtc0_config2, (void)) |
99 |
DEF_HELPER(void, do_mtc0_watchlo, (uint32_t sel))
|
100 |
DEF_HELPER(void, do_mtc0_watchhi, (uint32_t sel))
|
101 |
DEF_HELPER(void, do_mtc0_xcontext, (void)) |
102 |
DEF_HELPER(void, do_mtc0_framemask, (void)) |
103 |
DEF_HELPER(void, do_mtc0_debug, (void)) |
104 |
DEF_HELPER(void, do_mttc0_debug, (void)) |
105 |
DEF_HELPER(void, do_mtc0_performance0, (void)) |
106 |
DEF_HELPER(void, do_mtc0_taglo, (void)) |
107 |
DEF_HELPER(void, do_mtc0_datalo, (void)) |
108 |
DEF_HELPER(void, do_mtc0_taghi, (void)) |
109 |
DEF_HELPER(void, do_mtc0_datahi, (void)) |
110 |
#endif /* !CONFIG_USER_ONLY */ |
111 |
|
112 |
/* MIPS MT functions */
|
113 |
DEF_HELPER(void, do_mftgpr, (uint32_t sel))
|
114 |
DEF_HELPER(void, do_mftlo, (uint32_t sel))
|
115 |
DEF_HELPER(void, do_mfthi, (uint32_t sel))
|
116 |
DEF_HELPER(void, do_mftacx, (uint32_t sel))
|
117 |
DEF_HELPER(void, do_mftdsp, (void)) |
118 |
DEF_HELPER(void, do_mttgpr, (uint32_t sel))
|
119 |
DEF_HELPER(void, do_mttlo, (uint32_t sel))
|
120 |
DEF_HELPER(void, do_mtthi, (uint32_t sel))
|
121 |
DEF_HELPER(void, do_mttacx, (uint32_t sel))
|
122 |
DEF_HELPER(void, do_mttdsp, (void)) |
123 |
DEF_HELPER(void, do_dmt, (void)) |
124 |
DEF_HELPER(void, do_emt, (void)) |
125 |
DEF_HELPER(void, do_dvpe, (void)) |
126 |
DEF_HELPER(void, do_evpe, (void)) |
127 |
DEF_HELPER(void, do_fork, (void)) |
128 |
DEF_HELPER(void, do_yield, (void)) |
129 |
|
130 |
/* CP1 functions */
|
131 |
DEF_HELPER(void, do_cfc1, (uint32_t reg))
|
132 |
DEF_HELPER(void, do_ctc1, (uint32_t reg))
|
133 |
|
134 |
DEF_HELPER(void, do_float_cvtd_s, (void)) |
135 |
DEF_HELPER(void, do_float_cvtd_w, (void)) |
136 |
DEF_HELPER(void, do_float_cvtd_l, (void)) |
137 |
DEF_HELPER(void, do_float_cvtl_d, (void)) |
138 |
DEF_HELPER(void, do_float_cvtl_s, (void)) |
139 |
DEF_HELPER(void, do_float_cvtps_pw, (void)) |
140 |
DEF_HELPER(void, do_float_cvtpw_ps, (void)) |
141 |
DEF_HELPER(void, do_float_cvts_d, (void)) |
142 |
DEF_HELPER(void, do_float_cvts_w, (void)) |
143 |
DEF_HELPER(void, do_float_cvts_l, (void)) |
144 |
DEF_HELPER(void, do_float_cvts_pl, (void)) |
145 |
DEF_HELPER(void, do_float_cvts_pu, (void)) |
146 |
DEF_HELPER(void, do_float_cvtw_s, (void)) |
147 |
DEF_HELPER(void, do_float_cvtw_d, (void)) |
148 |
|
149 |
DEF_HELPER(void, do_float_addr_ps, (void)) |
150 |
DEF_HELPER(void, do_float_mulr_ps, (void)) |
151 |
|
152 |
#define FOP_PROTO(op) \
|
153 |
DEF_HELPER(void, do_float_ ## op ## _s, (void)) \ |
154 |
DEF_HELPER(void, do_float_ ## op ## _d, (void)) |
155 |
FOP_PROTO(roundl) |
156 |
FOP_PROTO(roundw) |
157 |
FOP_PROTO(truncl) |
158 |
FOP_PROTO(truncw) |
159 |
FOP_PROTO(ceill) |
160 |
FOP_PROTO(ceilw) |
161 |
FOP_PROTO(floorl) |
162 |
FOP_PROTO(floorw) |
163 |
FOP_PROTO(rsqrt) |
164 |
FOP_PROTO(recip) |
165 |
#undef FOP_PROTO
|
166 |
|
167 |
#define FOP_PROTO(op) \
|
168 |
DEF_HELPER(void, do_float_ ## op ## _s, (void)) \ |
169 |
DEF_HELPER(void, do_float_ ## op ## _d, (void)) \ |
170 |
DEF_HELPER(void, do_float_ ## op ## _ps, (void)) |
171 |
FOP_PROTO(add) |
172 |
FOP_PROTO(sub) |
173 |
FOP_PROTO(mul) |
174 |
FOP_PROTO(div) |
175 |
FOP_PROTO(recip1) |
176 |
FOP_PROTO(recip2) |
177 |
FOP_PROTO(rsqrt1) |
178 |
FOP_PROTO(rsqrt2) |
179 |
#undef FOP_PROTO
|
180 |
|
181 |
#define FOP_PROTO(op) \
|
182 |
DEF_HELPER(void, do_cmp_d_ ## op, (long cc)) \ |
183 |
DEF_HELPER(void, do_cmpabs_d_ ## op, (long cc)) \ |
184 |
DEF_HELPER(void, do_cmp_s_ ## op, (long cc)) \ |
185 |
DEF_HELPER(void, do_cmpabs_s_ ## op, (long cc)) \ |
186 |
DEF_HELPER(void, do_cmp_ps_ ## op, (long cc)) \ |
187 |
DEF_HELPER(void, do_cmpabs_ps_ ## op, (long cc)) |
188 |
FOP_PROTO(f) |
189 |
FOP_PROTO(un) |
190 |
FOP_PROTO(eq) |
191 |
FOP_PROTO(ueq) |
192 |
FOP_PROTO(olt) |
193 |
FOP_PROTO(ult) |
194 |
FOP_PROTO(ole) |
195 |
FOP_PROTO(ule) |
196 |
FOP_PROTO(sf) |
197 |
FOP_PROTO(ngle) |
198 |
FOP_PROTO(seq) |
199 |
FOP_PROTO(ngl) |
200 |
FOP_PROTO(lt) |
201 |
FOP_PROTO(nge) |
202 |
FOP_PROTO(le) |
203 |
FOP_PROTO(ngt) |
204 |
#undef FOP_PROTO
|
205 |
|
206 |
/* Special functions */
|
207 |
DEF_HELPER(void, do_pmon, (int function)) |
208 |
DEF_HELPER(void, do_wait, (void)) |