diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-10-27 04:10:45 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-11-06 18:49:34 -0800 |
commit | b10700d826c864872deae6c28aca041fc97df79f (patch) | |
tree | 919c22e43e88e94d017c139b83b027960dc926ca /target/hppa/sys_helper.c | |
parent | 8a02b9a68e4cded2b8751d803a3e3aedfce93609 (diff) | |
download | qemu-b10700d826c864872deae6c28aca041fc97df79f.zip qemu-b10700d826c864872deae6c28aca041fc97df79f.tar.gz qemu-b10700d826c864872deae6c28aca041fc97df79f.tar.bz2 |
target/hppa: Update IIAOQ, IIASQ for pa2.0
These registers have a different format for pa2.0.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/sys_helper.c')
-rw-r--r-- | target/hppa/sys_helper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c index 8850576..a59245e 100644 --- a/target/hppa/sys_helper.c +++ b/target/hppa/sys_helper.c @@ -80,6 +80,16 @@ void HELPER(rfi)(CPUHPPAState *env) env->iasq_b = (uint64_t)env->cr_back[0] << 32; env->iaoq_f = env->cr[CR_IIAOQ]; env->iaoq_b = env->cr_back[1]; + + /* + * For pa2.0, IIASQ is the top bits of the virtual address. + * To recreate the space identifier, remove the offset bits. + */ + if (hppa_is_pa20(env)) { + env->iasq_f &= ~env->iaoq_f; + env->iasq_b &= ~env->iaoq_b; + } + cpu_hppa_put_psw(env, env->cr[CR_IPSW]); } |