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

Ilya Leoshkevich posted 2 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230426235813.198183-1-iii@linux.ibm.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
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
[PATCH 0/2] target/s390x: Fix EXECUTE of relative branches
Posted by Ilya Leoshkevich 1 year ago
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

-- 
2.40.0