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