target/s390x: Fix EXECUTE of relative long instructions
commit703d03a4aaf38f285555ef5422ba5ce075416fc4
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 16 Mar 2023 21:07:50 +0000 (16 22:07 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 20 Mar 2023 08:32:50 +0000 (20 09:32 +0100)
treed288ab0eec917cc3c26114d1c54e4a32e6f12d3c
parent04fce706bd227c66738e965fc14b575edde598ed
target/s390x: Fix EXECUTE of relative long instructions

The code uses the wrong base for relative addressing: it should use the
target instruction address and not the EXECUTE's address.

Fix by storing the target instruction address in the new CPUS390XState
member and loading it from the code generated by gen_ri2().

Reported-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230316210751.302423-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/cpu.h
target/s390x/tcg/mem_helper.c
target/s390x/tcg/translate.c