summaryrefslogtreecommitdiff
path: root/target-alpha/sys_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-09-16 12:16:38 -0700
committerRichard Henderson <rth@twiddle.net>2015-08-18 11:08:48 -0700
commit591243846f7d0dc59f482a89e241a6ce02d25fae (patch)
tree1590c103a70c076198d0e38b1b993f70b584c36f /target-alpha/sys_helper.c
parent074a9925e1cfd659d5376dcaccd1436d3840e611 (diff)
downloadqemu-591243846f7d0dc59f482a89e241a6ce02d25fae.tar.gz
target-alpha: Use separate TCGv temporaries for the shadow registers
This avoids having to manually swap them around when swapping to and from PALmode. We simply encode the shadow registers into the translation. The VMStateDescription version changes, because the meaning of "shadow" changes in the save file when in PALmode. It would be possible to fix this, but I don't think it's worth the effort. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha/sys_helper.c')
-rw-r--r--target-alpha/sys_helper.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/target-alpha/sys_helper.c b/target-alpha/sys_helper.c
index 1c59e108b9..f01eb96e1c 100644
--- a/target-alpha/sys_helper.c
+++ b/target-alpha/sys_helper.c
@@ -45,10 +45,7 @@ void helper_hw_ret(CPUAlphaState *env, uint64_t a)
env->pc = a & ~3;
env->intr_flag = 0;
env->lock_addr = -1;
- if ((a & 1) == 0) {
- env->pal_mode = 0;
- swap_shadow_regs(env);
- }
+ env->pal_mode = a & 1;
}
void helper_call_pal(CPUAlphaState *env, uint64_t pc, uint64_t entry_ofs)
@@ -56,10 +53,7 @@ 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);
- }
+ env->pal_mode = 1;
}
void helper_tbia(CPUAlphaState *env)