On 7/14/25 07:37, Daniel Henrique Barboza wrote:
GETPC() should always be called from the top level helper, e.g. the
first helper that is called by the translation code. We stopped doing
that in commit 3157a553ec, and then we introduced problems when
unwinding the exceptions being thrown by helper_mret(), as reported by
[1].

Call GETPC() at the top level helper and pass the value along.

[1]https://gitlab.com/qemu-project/qemu/-/issues/3020

Suggested-by: Richard Henderson<[email protected]>
Fixes: 3157a553ec ("target/riscv: Add Smrnmi mnret instruction")
Closes:https://gitlab.com/qemu-project/qemu/-/issues/3020
Signed-off-by: Daniel Henrique Barboza<[email protected]>
---
  target/riscv/op_helper.c | 15 +++++++++------
  1 file changed, 9 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to