xref: /qemu/target/mips/helper.h (revision f1aa63203d53945faa708c821c9d4491e5cc8a27)
17dd9e556Sths #ifndef DEF_HELPER
27dd9e556Sths #define DEF_HELPER(ret, name, params) ret name params;
37dd9e556Sths #endif
430898801Sths 
57dd9e556Sths DEF_HELPER(void, do_raise_exception_err, (int excp, int err))
67dd9e556Sths DEF_HELPER(void, do_raise_exception, (int excp))
77dd9e556Sths DEF_HELPER(void, do_interrupt_restart, (void))
87dd9e556Sths 
97dd9e556Sths DEF_HELPER(void, do_clo, (void))
107dd9e556Sths DEF_HELPER(void, do_clz, (void))
117dd9e556Sths #ifdef TARGET_MIPS64
127dd9e556Sths DEF_HELPER(void, do_dclo, (void))
137dd9e556Sths DEF_HELPER(void, do_dclz, (void))
147dd9e556Sths #endif
15f1aa6320Sths 
16f1aa6320Sths /* CP0 helpers */
17f1aa6320Sths #ifndef CONFIG_USER_ONLY
18f1aa6320Sths DEF_HELPER(void, do_mfc0_mvpcontrol, (void))
19f1aa6320Sths DEF_HELPER(void, do_mfc0_mvpconf0, (void))
20f1aa6320Sths DEF_HELPER(void, do_mfc0_mvpconf1, (void))
21f1aa6320Sths DEF_HELPER(void, do_mfc0_random, (void))
22f1aa6320Sths DEF_HELPER(void, do_mfc0_tcstatus, (void))
23f1aa6320Sths DEF_HELPER(void, do_mftc0_tcstatus, (void))
24f1aa6320Sths DEF_HELPER(void, do_mfc0_tcbind, (void))
25f1aa6320Sths DEF_HELPER(void, do_mftc0_tcbind, (void))
26f1aa6320Sths DEF_HELPER(void, do_mfc0_tcrestart, (void))
27f1aa6320Sths DEF_HELPER(void, do_mftc0_tcrestart, (void))
28f1aa6320Sths DEF_HELPER(void, do_mfc0_tchalt, (void))
29f1aa6320Sths DEF_HELPER(void, do_mftc0_tchalt, (void))
30f1aa6320Sths DEF_HELPER(void, do_mfc0_tccontext, (void))
31f1aa6320Sths DEF_HELPER(void, do_mftc0_tccontext, (void))
32f1aa6320Sths DEF_HELPER(void, do_mfc0_tcschedule, (void))
33f1aa6320Sths DEF_HELPER(void, do_mftc0_tcschedule, (void))
34f1aa6320Sths DEF_HELPER(void, do_mfc0_tcschefback, (void))
35f1aa6320Sths DEF_HELPER(void, do_mftc0_tcschefback, (void))
36f1aa6320Sths DEF_HELPER(void, do_mfc0_count, (void))
37f1aa6320Sths DEF_HELPER(void, do_mftc0_entryhi, (void))
38f1aa6320Sths DEF_HELPER(void, do_mftc0_status, (void))
39f1aa6320Sths DEF_HELPER(void, do_mfc0_lladdr, (void))
40f1aa6320Sths DEF_HELPER(void, do_mfc0_watchlo, (uint32_t sel))
41f1aa6320Sths DEF_HELPER(void, do_mfc0_watchhi, (uint32_t sel))
42f1aa6320Sths DEF_HELPER(void, do_mfc0_debug, (void))
43f1aa6320Sths DEF_HELPER(void, do_mftc0_debug, (void))
44f1aa6320Sths #ifdef TARGET_MIPS64
45f1aa6320Sths DEF_HELPER(void, do_dmfc0_tcrestart, (void))
46f1aa6320Sths DEF_HELPER(void, do_dmfc0_tchalt, (void))
47f1aa6320Sths DEF_HELPER(void, do_dmfc0_tccontext, (void))
48f1aa6320Sths DEF_HELPER(void, do_dmfc0_tcschedule, (void))
49f1aa6320Sths DEF_HELPER(void, do_dmfc0_tcschefback, (void))
50f1aa6320Sths DEF_HELPER(void, do_dmfc0_lladdr, (void))
51f1aa6320Sths DEF_HELPER(void, do_dmfc0_watchlo, (uint32_t sel))
52f1aa6320Sths #endif /* TARGET_MIPS64 */
53f1aa6320Sths 
54f1aa6320Sths DEF_HELPER(void, do_mtc0_index, (void))
55f1aa6320Sths DEF_HELPER(void, do_mtc0_mvpcontrol, (void))
56f1aa6320Sths DEF_HELPER(void, do_mtc0_vpecontrol, (void))
57f1aa6320Sths DEF_HELPER(void, do_mtc0_vpeconf0, (void))
58f1aa6320Sths DEF_HELPER(void, do_mtc0_vpeconf1, (void))
59f1aa6320Sths DEF_HELPER(void, do_mtc0_yqmask, (void))
60f1aa6320Sths DEF_HELPER(void, do_mtc0_vpeopt, (void))
61f1aa6320Sths DEF_HELPER(void, do_mtc0_entrylo0, (void))
62f1aa6320Sths DEF_HELPER(void, do_mtc0_tcstatus, (void))
63f1aa6320Sths DEF_HELPER(void, do_mttc0_tcstatus, (void))
64f1aa6320Sths DEF_HELPER(void, do_mtc0_tcbind, (void))
65f1aa6320Sths DEF_HELPER(void, do_mttc0_tcbind, (void))
66f1aa6320Sths DEF_HELPER(void, do_mtc0_tcrestart, (void))
67f1aa6320Sths DEF_HELPER(void, do_mttc0_tcrestart, (void))
68f1aa6320Sths DEF_HELPER(void, do_mtc0_tchalt, (void))
69f1aa6320Sths DEF_HELPER(void, do_mttc0_tchalt, (void))
70f1aa6320Sths DEF_HELPER(void, do_mtc0_tccontext, (void))
71f1aa6320Sths DEF_HELPER(void, do_mttc0_tccontext, (void))
72f1aa6320Sths DEF_HELPER(void, do_mtc0_tcschedule, (void))
73f1aa6320Sths DEF_HELPER(void, do_mttc0_tcschedule, (void))
74f1aa6320Sths DEF_HELPER(void, do_mtc0_tcschefback, (void))
75f1aa6320Sths DEF_HELPER(void, do_mttc0_tcschefback, (void))
76f1aa6320Sths DEF_HELPER(void, do_mtc0_entrylo1, (void))
77f1aa6320Sths DEF_HELPER(void, do_mtc0_context, (void))
78f1aa6320Sths DEF_HELPER(void, do_mtc0_pagemask, (void))
79f1aa6320Sths DEF_HELPER(void, do_mtc0_pagegrain, (void))
80f1aa6320Sths DEF_HELPER(void, do_mtc0_wired, (void))
81f1aa6320Sths DEF_HELPER(void, do_mtc0_srsconf0, (void))
82f1aa6320Sths DEF_HELPER(void, do_mtc0_srsconf1, (void))
83f1aa6320Sths DEF_HELPER(void, do_mtc0_srsconf2, (void))
84f1aa6320Sths DEF_HELPER(void, do_mtc0_srsconf3, (void))
85f1aa6320Sths DEF_HELPER(void, do_mtc0_srsconf4, (void))
86f1aa6320Sths DEF_HELPER(void, do_mtc0_hwrena, (void))
87f1aa6320Sths DEF_HELPER(void, do_mtc0_count, (void))
88f1aa6320Sths DEF_HELPER(void, do_mtc0_entryhi, (void))
89f1aa6320Sths DEF_HELPER(void, do_mttc0_entryhi, (void))
90f1aa6320Sths DEF_HELPER(void, do_mtc0_compare, (void))
91f1aa6320Sths DEF_HELPER(void, do_mtc0_status, (void))
92f1aa6320Sths DEF_HELPER(void, do_mttc0_status, (void))
93f1aa6320Sths DEF_HELPER(void, do_mtc0_intctl, (void))
94f1aa6320Sths DEF_HELPER(void, do_mtc0_srsctl, (void))
95f1aa6320Sths DEF_HELPER(void, do_mtc0_cause, (void))
96f1aa6320Sths DEF_HELPER(void, do_mtc0_ebase, (void))
97f1aa6320Sths DEF_HELPER(void, do_mtc0_config0, (void))
98f1aa6320Sths DEF_HELPER(void, do_mtc0_config2, (void))
99f1aa6320Sths DEF_HELPER(void, do_mtc0_watchlo, (uint32_t sel))
100f1aa6320Sths DEF_HELPER(void, do_mtc0_watchhi, (uint32_t sel))
101f1aa6320Sths DEF_HELPER(void, do_mtc0_xcontext, (void))
102f1aa6320Sths DEF_HELPER(void, do_mtc0_framemask, (void))
103f1aa6320Sths DEF_HELPER(void, do_mtc0_debug, (void))
104f1aa6320Sths DEF_HELPER(void, do_mttc0_debug, (void))
105f1aa6320Sths DEF_HELPER(void, do_mtc0_performance0, (void))
106f1aa6320Sths DEF_HELPER(void, do_mtc0_taglo, (void))
107f1aa6320Sths DEF_HELPER(void, do_mtc0_datalo, (void))
108f1aa6320Sths DEF_HELPER(void, do_mtc0_taghi, (void))
109f1aa6320Sths DEF_HELPER(void, do_mtc0_datahi, (void))
110f1aa6320Sths #endif /* !CONFIG_USER_ONLY */
111f1aa6320Sths 
112f1aa6320Sths /* MIPS MT functions */
113f1aa6320Sths DEF_HELPER(void, do_mftgpr, (uint32_t sel))
114f1aa6320Sths DEF_HELPER(void, do_mftlo, (uint32_t sel))
115f1aa6320Sths DEF_HELPER(void, do_mfthi, (uint32_t sel))
116f1aa6320Sths DEF_HELPER(void, do_mftacx, (uint32_t sel))
117f1aa6320Sths DEF_HELPER(void, do_mftdsp, (void))
118f1aa6320Sths DEF_HELPER(void, do_mttgpr, (uint32_t sel))
119f1aa6320Sths DEF_HELPER(void, do_mttlo, (uint32_t sel))
120f1aa6320Sths DEF_HELPER(void, do_mtthi, (uint32_t sel))
121f1aa6320Sths DEF_HELPER(void, do_mttacx, (uint32_t sel))
122f1aa6320Sths DEF_HELPER(void, do_mttdsp, (void))
123f1aa6320Sths DEF_HELPER(void, do_dmt, (void))
124f1aa6320Sths DEF_HELPER(void, do_emt, (void))
125f1aa6320Sths DEF_HELPER(void, do_dvpe, (void))
126f1aa6320Sths DEF_HELPER(void, do_evpe, (void))
127f1aa6320Sths DEF_HELPER(void, do_fork, (void))
128f1aa6320Sths DEF_HELPER(void, do_yield, (void))
129f1aa6320Sths 
130f1aa6320Sths /* CP1 functions */
131f1aa6320Sths DEF_HELPER(void, do_cfc1, (uint32_t reg))
132f1aa6320Sths DEF_HELPER(void, do_ctc1, (uint32_t reg))
133