From ba96394e20ad033a10eb790fdf2377e2a8892feb Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 26 Jul 2013 11:22:21 -1000 Subject: 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 --- target-alpha/sys_helper.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'target-alpha/sys_helper.c') 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 */ -- cgit v1.2.1