mbox series

[0/2] target/s390x: Fix EXECUTE of relative branches

Message ID 20230426235813.198183-1-iii@linux.ibm.com (mailing list archive)
Headers show
Series target/s390x: Fix EXECUTE of relative branches | expand

Message

Ilya Leoshkevich April 26, 2023, 11:58 p.m. UTC
Hi,

This series fixes EXECUTing relative branches: currently the offset is
incorrectly applied to EXECUTE and not the branch itself. This is
similar to what I previously fixed for load/store instructions.

Unfortunately here it's not feaisble to use the ri2 field, since it
would break the direct branch optimization. Instead, introduce the
disas_jdest() macro and pass its output to help_branch().

Patch 1 is the fix, patch 2 is the test.

Best regards,
Ilya

Ilya Leoshkevich (2):
  target/s390x: Fix EXECUTE of relative branches
  tests/tcg/s390x: Test EXECUTE of relative branches

 target/s390x/tcg/translate.c    |  81 +++++++++++-----
 tests/tcg/s390x/Makefile.target |   1 +
 tests/tcg/s390x/ex-branch.c     | 158 ++++++++++++++++++++++++++++++++
 3 files changed, 217 insertions(+), 23 deletions(-)
 create mode 100644 tests/tcg/s390x/ex-branch.c