[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.1.5 10/11] target/s390x: Fix LAE setting a wrong access regist
From: |
Michael Tokarev |
Subject: |
[Stable-8.1.5 10/11] target/s390x: Fix LAE setting a wrong access register |
Date: |
Thu, 18 Jan 2024 15:50:48 +0300 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
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>
(Mjt: target/s390x/tcg/translate.c: fixup for
v8.1.0-1189-gad75a51e84 "tcg: Rename cpu_env to tcg_env")
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index d927e01c0c..b009789281 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, cpu_env, offsetof(CPUS390XState, aregs[1]));
+ tcg_gen_st32_i64(ar1, cpu_env, offsetof(CPUS390XState, aregs[r1]));
return DISAS_NEXT;
}
--
2.39.2
- [Stable-8.1.5 00/11] Patch Round-up for stable 8.1.5, freeze on 2024-01-27, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 01/11] block: Fix crash when loading snapshot on inactive node, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 02/11] vl: Improve error message for conflicting -incoming and -loadvm, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 03/11] iotests: Basic tests for internal snapshots, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 04/11] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 05/11] target/riscv: Fix mcycle/minstret increment behavior, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 06/11] chardev/char.c: fix "abstract device type" error message, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 07/11] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 08/11] util: fix build with musl libc on ppc64le, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 09/11] tests/qtest/virtio-ccw: Fix device presence checking, Michael Tokarev, 2024/01/18
- [Stable-8.1.5 10/11] target/s390x: Fix LAE setting a wrong access register,
Michael Tokarev <=
- [Stable-8.1.5 11/11] .gitlab-ci.d/buildtest.yml: Work around htags bug when environment is large, Michael Tokarev, 2024/01/18