target/hppa: Restore unwind_breg before calculating ior
authorHelge Deller <deller@gmx.de>
Sat, 2 Mar 2024 21:02:38 +0000 (22:02 +0100)
committerHelge Deller <deller@gmx.de>
Sun, 3 Mar 2024 05:41:19 +0000 (06:41 +0100)
commit5ccd50172a80ef9fe695714744b0747d7419b2c4
tree386364c31c953f6584453686ad5464458f8fe0bf
parenta9bdc4c95e402599e4184d4814800668479adb2b
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>
target/hppa/cpu.c
target/hppa/mem_helper.c
target/hppa/op_helper.c