Sparc: avoid AREG0 for raise_exception and helper_debug

Make raise_exception() and helper_debug() take a parameter for
CPUState instead of relying on global env. Move the functions
to helper.c.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2011-07-03 08:19:42 +00:00
parent 2336c1f197
commit bc2653195a
4 changed files with 70 additions and 72 deletions

View file

@ -871,6 +871,18 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
#endif
/* misc op helpers */
void helper_raise_exception(CPUState *env, int tt)
{
env->exception_index = tt;
cpu_loop_exit(env);
}
void helper_debug(CPUState *env)
{
env->exception_index = EXCP_DEBUG;
cpu_loop_exit(env);
}
void helper_shutdown(void)
{
#if !defined(CONFIG_USER_ONLY)