aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/helper.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-07-03 08:19:42 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-10-23 15:08:22 +0000
commitbc2653195a98ffdf44372c5ea655d5c05ea714b8 (patch)
tree4d9a1d7eed8ccffbffbf69fee596b4f3729599a3 /target-sparc/helper.c
parent2336c1f1970a5c5cfd34a1785af646c960b6f43f (diff)
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>
Diffstat (limited to 'target-sparc/helper.c')
-rw-r--r--target-sparc/helper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index e9182ac602..7a25605fa7 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -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)