diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-04-01 14:52:39 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-04-09 07:43:31 -1000 |
commit | 26d937237f363297e5f70efcb001b15b1cb0fc2b (patch) | |
tree | 3677546dffbaab9a2f02745d54577b83bad77ad9 /target/hppa/sys_helper.c | |
parent | 2ee80bce4f7cf2ef78f996ea608755d4e97c94de (diff) | |
download | qemu-26d937237f363297e5f70efcb001b15b1cb0fc2b.zip qemu-26d937237f363297e5f70efcb001b15b1cb0fc2b.tar.gz qemu-26d937237f363297e5f70efcb001b15b1cb0fc2b.tar.bz2 |
target/hppa: Fix IIAOQ, IIASQ for pa2.0
The contents of IIAOQ depend on PSW_W.
Follow the text in "Interruption Instruction Address Queues",
pages 2-13 through 2-15.
Tested-by: Sven Schnelle <svens@stackframe.org>
Tested-by: Helge Deller <deller@gmx.de>
Reported-by: Sven Schnelle <svens@stackframe.org>
Fixes: b10700d826c ("target/hppa: Update IIAOQ, IIASQ 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 | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c index 208e51c..22d6c89 100644 --- a/target/hppa/sys_helper.c +++ b/target/hppa/sys_helper.c @@ -78,21 +78,21 @@ target_ulong HELPER(swap_system_mask)(CPUHPPAState *env, target_ulong nsm) void HELPER(rfi)(CPUHPPAState *env) { - env->iasq_f = (uint64_t)env->cr[CR_IIASQ] << 32; - env->iasq_b = (uint64_t)env->cr_back[0] << 32; - env->iaoq_f = env->cr[CR_IIAOQ]; - env->iaoq_b = env->cr_back[1]; + uint64_t mask; + + cpu_hppa_put_psw(env, env->cr[CR_IPSW]); /* * For pa2.0, IIASQ is the top bits of the virtual address. * To recreate the space identifier, remove the offset bits. + * For pa1.x, the mask reduces to no change to space. */ - if (hppa_is_pa20(env)) { - env->iasq_f &= ~env->iaoq_f; - env->iasq_b &= ~env->iaoq_b; - } + mask = gva_offset_mask(env->psw); - cpu_hppa_put_psw(env, env->cr[CR_IPSW]); + env->iaoq_f = env->cr[CR_IIAOQ]; + env->iaoq_b = env->cr_back[1]; + env->iasq_f = (env->cr[CR_IIASQ] << 32) & ~(env->iaoq_f & mask); + env->iasq_b = (env->cr_back[0] << 32) & ~(env->iaoq_b & mask); } static void getshadowregs(CPUHPPAState *env) |