2 * QEMU MIPS sysemu helpers
4 * Copyright (c) 2004-2005 Jocelyn Mayer
5 * Copyright (c) 2006 Marius Groeger (FPU operations)
6 * Copyright (c) 2006 Thiemo Seufer (MIPS32R2 support)
7 * Copyright (c) 2009 CodeSourcery (MIPS16 and microMIPS support)
9 * SPDX-License-Identifier: LGPL-2.1-or-later
12 DEF_HELPER_1(do_semihosting, void, env)
15 DEF_HELPER_1(mfc0_mvpcontrol, tl, env)
16 DEF_HELPER_1(mfc0_mvpconf0, tl, env)
17 DEF_HELPER_1(mfc0_mvpconf1, tl, env)
18 DEF_HELPER_1(mftc0_vpecontrol, tl, env)
19 DEF_HELPER_1(mftc0_vpeconf0, tl, env)
20 DEF_HELPER_1(mfc0_random, tl, env)
21 DEF_HELPER_1(mfc0_tcstatus, tl, env)
22 DEF_HELPER_1(mftc0_tcstatus, tl, env)
23 DEF_HELPER_1(mfc0_tcbind, tl, env)
24 DEF_HELPER_1(mftc0_tcbind, tl, env)
25 DEF_HELPER_1(mfc0_tcrestart, tl, env)
26 DEF_HELPER_1(mftc0_tcrestart, tl, env)
27 DEF_HELPER_1(mfc0_tchalt, tl, env)
28 DEF_HELPER_1(mftc0_tchalt, tl, env)
29 DEF_HELPER_1(mfc0_tccontext, tl, env)
30 DEF_HELPER_1(mftc0_tccontext, tl, env)
31 DEF_HELPER_1(mfc0_tcschedule, tl, env)
32 DEF_HELPER_1(mftc0_tcschedule, tl, env)
33 DEF_HELPER_1(mfc0_tcschefback, tl, env)
34 DEF_HELPER_1(mftc0_tcschefback, tl, env)
35 DEF_HELPER_1(mfc0_count, tl, env)
36 DEF_HELPER_1(mfc0_saar, tl, env)
37 DEF_HELPER_1(mfhc0_saar, tl, env)
38 DEF_HELPER_1(mftc0_entryhi, tl, env)
39 DEF_HELPER_1(mftc0_status, tl, env)
40 DEF_HELPER_1(mftc0_cause, tl, env)
41 DEF_HELPER_1(mftc0_epc, tl, env)
42 DEF_HELPER_1(mftc0_ebase, tl, env)
43 DEF_HELPER_2(mftc0_configx, tl, env, tl)
44 DEF_HELPER_1(mfc0_lladdr, tl, env)
45 DEF_HELPER_1(mfc0_maar, tl, env)
46 DEF_HELPER_1(mfhc0_maar, tl, env)
47 DEF_HELPER_2(mfc0_watchlo, tl, env, i32)
48 DEF_HELPER_2(mfc0_watchhi, tl, env, i32)
49 DEF_HELPER_2(mfhc0_watchhi, tl, env, i32)
50 DEF_HELPER_1(mfc0_debug, tl, env)
51 DEF_HELPER_1(mftc0_debug, tl, env)
53 DEF_HELPER_1(dmfc0_tcrestart, tl, env)
54 DEF_HELPER_1(dmfc0_tchalt, tl, env)
55 DEF_HELPER_1(dmfc0_tccontext, tl, env)
56 DEF_HELPER_1(dmfc0_tcschedule, tl, env)
57 DEF_HELPER_1(dmfc0_tcschefback, tl, env)
58 DEF_HELPER_1(dmfc0_lladdr, tl, env)
59 DEF_HELPER_1(dmfc0_maar, tl, env)
60 DEF_HELPER_2(dmfc0_watchlo, tl, env, i32)
61 DEF_HELPER_2(dmfc0_watchhi, tl, env, i32)
62 DEF_HELPER_1(dmfc0_saar, tl, env)
63 #endif /* TARGET_MIPS64 */
65 DEF_HELPER_2(mtc0_index, void, env, tl)
66 DEF_HELPER_2(mtc0_mvpcontrol, void, env, tl)
67 DEF_HELPER_2(mtc0_vpecontrol, void, env, tl)
68 DEF_HELPER_2(mttc0_vpecontrol, void, env, tl)
69 DEF_HELPER_2(mtc0_vpeconf0, void, env, tl)
70 DEF_HELPER_2(mttc0_vpeconf0, void, env, tl)
71 DEF_HELPER_2(mtc0_vpeconf1, void, env, tl)
72 DEF_HELPER_2(mtc0_yqmask, void, env, tl)
73 DEF_HELPER_2(mtc0_vpeopt, void, env, tl)
74 DEF_HELPER_2(mtc0_entrylo0, void, env, tl)
75 DEF_HELPER_2(mtc0_tcstatus, void, env, tl)
76 DEF_HELPER_2(mttc0_tcstatus, void, env, tl)
77 DEF_HELPER_2(mtc0_tcbind, void, env, tl)
78 DEF_HELPER_2(mttc0_tcbind, void, env, tl)
79 DEF_HELPER_2(mtc0_tcrestart, void, env, tl)
80 DEF_HELPER_2(mttc0_tcrestart, void, env, tl)
81 DEF_HELPER_2(mtc0_tchalt, void, env, tl)
82 DEF_HELPER_2(mttc0_tchalt, void, env, tl)
83 DEF_HELPER_2(mtc0_tccontext, void, env, tl)
84 DEF_HELPER_2(mttc0_tccontext, void, env, tl)
85 DEF_HELPER_2(mtc0_tcschedule, void, env, tl)
86 DEF_HELPER_2(mttc0_tcschedule, void, env, tl)
87 DEF_HELPER_2(mtc0_tcschefback, void, env, tl)
88 DEF_HELPER_2(mttc0_tcschefback, void, env, tl)
89 DEF_HELPER_2(mtc0_entrylo1, void, env, tl)
90 DEF_HELPER_2(mtc0_context, void, env, tl)
91 DEF_HELPER_2(mtc0_memorymapid, void, env, tl)
92 DEF_HELPER_2(mtc0_pagemask, void, env, tl)
93 DEF_HELPER_2(mtc0_pagegrain, void, env, tl)
94 DEF_HELPER_2(mtc0_segctl0, void, env, tl)
95 DEF_HELPER_2(mtc0_segctl1, void, env, tl)
96 DEF_HELPER_2(mtc0_segctl2, void, env, tl)
97 DEF_HELPER_2(mtc0_pwfield, void, env, tl)
98 DEF_HELPER_2(mtc0_pwsize, void, env, tl)
99 DEF_HELPER_2(mtc0_wired, void, env, tl)
100 DEF_HELPER_2(mtc0_srsconf0, void, env, tl)
101 DEF_HELPER_2(mtc0_srsconf1, void, env, tl)
102 DEF_HELPER_2(mtc0_srsconf2, void, env, tl)
103 DEF_HELPER_2(mtc0_srsconf3, void, env, tl)
104 DEF_HELPER_2(mtc0_srsconf4, void, env, tl)
105 DEF_HELPER_2(mtc0_hwrena, void, env, tl)
106 DEF_HELPER_2(mtc0_pwctl, void, env, tl)
107 DEF_HELPER_2(mtc0_count, void, env, tl)
108 DEF_HELPER_2(mtc0_saari, void, env, tl)
109 DEF_HELPER_2(mtc0_saar, void, env, tl)
110 DEF_HELPER_2(mthc0_saar, void, env, tl)
111 DEF_HELPER_2(mtc0_entryhi, void, env, tl)
112 DEF_HELPER_2(mttc0_entryhi, void, env, tl)
113 DEF_HELPER_2(mtc0_compare, void, env, tl)
114 DEF_HELPER_2(mtc0_status, void, env, tl)
115 DEF_HELPER_2(mttc0_status, void, env, tl)
116 DEF_HELPER_2(mtc0_intctl, void, env, tl)
117 DEF_HELPER_2(mtc0_srsctl, void, env, tl)
118 DEF_HELPER_2(mtc0_cause, void, env, tl)
119 DEF_HELPER_2(mttc0_cause, void, env, tl)
120 DEF_HELPER_2(mtc0_ebase, void, env, tl)
121 DEF_HELPER_2(mttc0_ebase, void, env, tl)
122 DEF_HELPER_2(mtc0_config0, void, env, tl)
123 DEF_HELPER_2(mtc0_config2, void, env, tl)
124 DEF_HELPER_2(mtc0_config3, void, env, tl)
125 DEF_HELPER_2(mtc0_config4, void, env, tl)
126 DEF_HELPER_2(mtc0_config5, void, env, tl)
127 DEF_HELPER_2(mtc0_lladdr, void, env, tl)
128 DEF_HELPER_2(mtc0_maar, void, env, tl)
129 DEF_HELPER_2(mthc0_maar, void, env, tl)
130 DEF_HELPER_2(mtc0_maari, void, env, tl)
131 DEF_HELPER_3(mtc0_watchlo, void, env, tl, i32)
132 DEF_HELPER_3(mtc0_watchhi, void, env, tl, i32)
133 DEF_HELPER_3(mthc0_watchhi, void, env, tl, i32)
134 DEF_HELPER_2(mtc0_xcontext, void, env, tl)
135 DEF_HELPER_2(mtc0_framemask, void, env, tl)
136 DEF_HELPER_2(mtc0_debug, void, env, tl)
137 DEF_HELPER_2(mttc0_debug, void, env, tl)
138 DEF_HELPER_2(mtc0_performance0, void, env, tl)
139 DEF_HELPER_2(mtc0_errctl, void, env, tl)
140 DEF_HELPER_2(mtc0_taglo, void, env, tl)
141 DEF_HELPER_2(mtc0_datalo, void, env, tl)
142 DEF_HELPER_2(mtc0_taghi, void, env, tl)
143 DEF_HELPER_2(mtc0_datahi, void, env, tl)
145 #if defined(TARGET_MIPS64)
146 DEF_HELPER_2(dmtc0_entrylo0, void, env, i64)
147 DEF_HELPER_2(dmtc0_entrylo1, void, env, i64)
150 /* MIPS MT functions */
151 DEF_HELPER_2(mftgpr, tl, env, i32)
152 DEF_HELPER_2(mftlo, tl, env, i32)
153 DEF_HELPER_2(mfthi, tl, env, i32)
154 DEF_HELPER_2(mftacx, tl, env, i32)
155 DEF_HELPER_1(mftdsp, tl, env)
156 DEF_HELPER_3(mttgpr, void, env, tl, i32)
157 DEF_HELPER_3(mttlo, void, env, tl, i32)
158 DEF_HELPER_3(mtthi, void, env, tl, i32)
159 DEF_HELPER_3(mttacx, void, env, tl, i32)
160 DEF_HELPER_2(mttdsp, void, env, tl)
161 DEF_HELPER_0(dmt, tl)
162 DEF_HELPER_0(emt, tl)
163 DEF_HELPER_1(dvpe, tl, env)
164 DEF_HELPER_1(evpe, tl, env)
166 /* R6 Multi-threading */
167 DEF_HELPER_1(dvp, tl, env)
168 DEF_HELPER_1(evp, tl, env)
171 DEF_HELPER_1(tlbwi, void, env)
172 DEF_HELPER_1(tlbwr, void, env)
173 DEF_HELPER_1(tlbp, void, env)
174 DEF_HELPER_1(tlbr, void, env)
175 DEF_HELPER_1(tlbinv, void, env)
176 DEF_HELPER_1(tlbinvf, void, env)
177 DEF_HELPER_3(ginvt, void, env, tl, i32)
180 DEF_HELPER_1(di, tl, env)
181 DEF_HELPER_1(ei, tl, env)
182 DEF_HELPER_1(eret, void, env)
183 DEF_HELPER_1(eretnc, void, env)
184 DEF_HELPER_1(deret, void, env)
185 DEF_HELPER_3(cache, void, env, tl, i32)