[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/21] target/s390x: Fix EPSW CC reporting
From: |
Thomas Huth |
Subject: |
[PULL 03/21] target/s390x: Fix EPSW CC reporting |
Date: |
Mon, 10 Jul 2023 14:15:25 +0200 |
From: Ilya Leoshkevich <iii@linux.ibm.com>
EPSW should explicitly calculate and insert CC, like IPM does.
Fixes: e30a9d3fea58 ("target-s390: Implement EPSW")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: qemu-stable@nongnu.org
Message-Id: <20230704081506.276055-3-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/tcg/translate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index a6ee2d4423..0cef6efbef 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2383,10 +2383,14 @@ static DisasJumpType op_epsw(DisasContext *s, DisasOps
*o)
int r1 = get_field(s, r1);
int r2 = get_field(s, r2);
TCGv_i64 t = tcg_temp_new_i64();
+ TCGv_i64 t_cc = tcg_temp_new_i64();
/* Note the "subsequently" in the PoO, which implies a defined result
if r1 == r2. Thus we cannot defer these writes to an output hook. */
+ gen_op_calc_cc(s);
+ tcg_gen_extu_i32_i64(t_cc, cc_op);
tcg_gen_shri_i64(t, psw_mask, 32);
+ tcg_gen_deposit_i64(t, t, t_cc, 12, 2);
store_reg32_i64(r1, t);
if (r2 != 0) {
store_reg32_i64(r2, psw_mask);
--
2.39.3
- [PULL 00/21] s390x, qtest and misc patches before the 8.1 soft freeze, Thomas Huth, 2023/07/10
- [PULL 01/21] hw/s390x: Move KVM specific PV from hw/ to target/s390x/kvm/, Thomas Huth, 2023/07/10
- [PULL 03/21] target/s390x: Fix EPSW CC reporting,
Thomas Huth <=
- [PULL 04/21] target/s390x: Fix MDEB and MDEBR, Thomas Huth, 2023/07/10
- [PULL 09/21] tests/tcg/s390x: Test EPSW, Thomas Huth, 2023/07/10
- [PULL 02/21] linux-user: elfload: Add more initial s390x PSW bits, Thomas Huth, 2023/07/10
- [PULL 07/21] target/s390x: Fix LRA when DAT is off, Thomas Huth, 2023/07/10
- [PULL 05/21] target/s390x: Fix MVCRL with a large value in R0, Thomas Huth, 2023/07/10
- [PULL 06/21] target/s390x: Fix LRA overwriting the top 32 bits on DAT error, Thomas Huth, 2023/07/10
- [PULL 08/21] target/s390x: Fix relative long instructions with large offsets, Thomas Huth, 2023/07/10
- [PULL 12/21] tests/tcg/s390x: Test MDEB and MDEBR, Thomas Huth, 2023/07/10
- [PULL 10/21] tests/tcg/s390x: Test LARL with a large offset, Thomas Huth, 2023/07/10
- [PULL 11/21] tests/tcg/s390x: Test LRA, Thomas Huth, 2023/07/10