aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/sys_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-07-26 11:22:21 -1000
committerRichard Henderson <rth@twiddle.net>2013-08-16 11:17:23 -0700
commitba96394e20ad033a10eb790fdf2377e2a8892feb (patch)
treef0d6cbcdb686eeb8bd5db26443844eb94c1d2ccf /target-alpha/sys_helper.c
parentf202039811d8746b0586d2fd5f61de6c8cf68056 (diff)
target-alpha: Implement call_pal without an exception
The destination of the call_pal, and the cpu state, is very predictable; there's no need for exiting the cpu loop. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/sys_helper.c')
-rw-r--r--target-alpha/sys_helper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-alpha/sys_helper.c b/target-alpha/sys_helper.c
index bd94597d36..ce51ed6002 100644
--- a/target-alpha/sys_helper.c
+++ b/target-alpha/sys_helper.c
@@ -51,6 +51,17 @@ void helper_hw_ret(CPUAlphaState *env, uint64_t a)
}
}
+void helper_call_pal(CPUAlphaState *env, uint64_t pc, uint64_t entry_ofs)
+{
+ int pal_mode = env->pal_mode;
+ env->exc_addr = pc | pal_mode;
+ env->pc = env->palbr + entry_ofs;
+ if (!pal_mode) {
+ env->pal_mode = 1;
+ swap_shadow_regs(env);
+ }
+}
+
void helper_tbia(CPUAlphaState *env)
{
tlb_flush(env, 1);
@@ -91,4 +102,5 @@ void helper_set_alarm(CPUAlphaState *env, uint64_t expire)
qemu_del_timer(cpu->alarm_timer);
}
}
+
#endif /* CONFIG_USER_ONLY */