qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/14] target/s390x: Do not use unwind for per_check_exceptio


From: Ilya Leoshkevich
Subject: Re: [PATCH 01/14] target/s390x: Do not use unwind for per_check_exception
Date: Wed, 22 May 2024 22:46:51 +0200
User-agent: Evolution 3.50.4 (3.50.4-1.fc39)

On Wed, 2024-05-01 at 22:44 -0700, Richard Henderson wrote:
> Using exception unwind via tcg_s390_program_interrupt,
> we discard the current value of psw.addr, which discards
> the result of a branch.
> 
> Pass in the address of the next instruction, which may
> not be sequential.  Pass in ilen, which we would have
> gotten from unwind and is passed to the exception handler.
> Sync cc_op before the call, which we would have gotten
> from unwind.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/s390x/helper.h          |  2 +-
>  target/s390x/tcg/excp_helper.c |  2 +-
>  target/s390x/tcg/misc_helper.c | 23 ++++++++++++++++++++---
>  target/s390x/tcg/translate.c   | 13 +++++++------
>  4 files changed, 29 insertions(+), 11 deletions(-)

IIUC this fixes the contents of old PSW so that it matches the
following wording from PoP:

  When a PER interruption is caused by branch-
  ing, the PER address identifies the branch
  instruction (or execute-type instruction, as appro-
  priate), whereas the old PSW points to the next
  instruction to be executed.

whereas currently old PSW = unwind(GETPC()) = branch instruction.

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]