aboutsummaryrefslogtreecommitdiff
path: root/target/hppa/mem_helper.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2024-03-02 22:02:38 +0100
committerHelge Deller <deller@gmx.de>2024-03-03 06:41:19 +0100
commit5ccd50172a80ef9fe695714744b0747d7419b2c4 (patch)
tree386364c31c953f6584453686ad5464458f8fe0bf /target/hppa/mem_helper.c
parenta9bdc4c95e402599e4184d4814800668479adb2b (diff)
downloadqemu-5ccd50172a80ef9fe695714744b0747d7419b2c4.zip
qemu-5ccd50172a80ef9fe695714744b0747d7419b2c4.tar.gz
qemu-5ccd50172a80ef9fe695714744b0747d7419b2c4.tar.bz2
target/hppa: Restore unwind_breg before calculating ior
When calculating the IOR for the exception handlers, the current unwind_breg value is needed on 64-bit hppa machines. Restore that value by calling cpu_restore_state() earlier, which in turn calls hppa_restore_state_to_opc() which restores the unwind_breg for the current instruction. Signed-off-by: Helge Deller <deller@gmx.de> Fixes: 3824e0d643f3 ("target/hppa: Export function hppa_set_ior_and_isr()") Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hppa/mem_helper.c')
-rw-r--r--target/hppa/mem_helper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index 66b8fa7..3fc895c 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -348,9 +348,10 @@ raise_exception_with_ior(CPUHPPAState *env, int excp, uintptr_t retaddr,
CPUState *cs = env_cpu(env);
cs->exception_index = excp;
+ cpu_restore_state(cs, retaddr);
hppa_set_ior_and_isr(env, addr, mmu_disabled);
- cpu_loop_exit_restore(cs, retaddr);
+ cpu_loop_exit(cs);
}
void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,