diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2024-01-11 10:21:26 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2024-01-13 11:20:14 +0300 |
commit | 08b37c90e6047d6167b3ec511cd47375c9ce1427 (patch) | |
tree | 2f320b1fd03e06f1cfe907a2f6ac1ca6d4bfa596 | |
parent | 0b27f20d6a62456ae94293deb210092e6ec9949d (diff) | |
download | qemu-08b37c90e6047d6167b3ec511cd47375c9ce1427.zip qemu-08b37c90e6047d6167b3ec511cd47375c9ce1427.tar.gz qemu-08b37c90e6047d6167b3ec511cd47375c9ce1427.tar.bz2 |
target/s390x: Fix LAE setting a wrong access register
LAE should set the access register corresponding to the first operand,
instead, it always modifies access register 1.
Co-developed-by: Ido Plat <Ido.Plat@ibm.com>
Cc: qemu-stable@nongnu.org
Fixes: a1c7610a6879 ("target-s390x: implement LAY and LAEY instructions")
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20240111092328.929421-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit e358a25a97c71c39e3513d9b869cdb82052e50b8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | target/s390x/tcg/translate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 62ab2be..8df00b7 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -3221,6 +3221,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o) { int b2 = get_field(s, b2); TCGv ar1 = tcg_temp_new_i64(); + int r1 = get_field(s, r1); o->out = o->in2; o->in2 = NULL; @@ -3244,7 +3245,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o) break; } - tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[1])); + tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[r1])); return DISAS_NEXT; } |