target/hppa: Avoid accessing %gr0 when raising exception
authorHelge Deller <deller@gmx.de>
Wed, 3 Jan 2024 19:35:18 +0000 (20:35 +0100)
committerHelge Deller <deller@gmx.de>
Sat, 13 Jan 2024 05:48:14 +0000 (06:48 +0100)
commit5915b67013eb8c3a84e3ef05e6ba4eae55ccd173
tree0e7947ce9570777af2f28d431ceeca4fecffea7b
parented35afcb331a972210816435d6b1b5de17fc7d4f
target/hppa: Avoid accessing %gr0 when raising exception

The value of unwind_breg may reference register %r0, but we need to avoid
accessing gr0 directly and use the value 0 instead.

At runtime I've seen unwind_breg being zero with the Linux kernel when
rfi is used to jump to smp_callin().

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Bruno Haible <bruno@clisp.org>
target/hppa/mem_helper.c