diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-07-04 10:12:26 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-07-31 08:52:38 +0300 |
commit | 70ba7cbf50afbc18b2d32572efa98d1f8d54a1b2 (patch) | |
tree | 85de8c23ff1940c1ae04f370713c3f6250932f88 /target/s390x/tcg | |
parent | f48e3ec5813d0a51d1e77de00883570b34efd775 (diff) |
target/s390x: Fix EPSW CC reporting
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>
(cherry picked from commit 110b1bac2ecd94a78a1d38003e24e37367bf074e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target/s390x/tcg')
-rw-r--r-- | target/s390x/tcg/translate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 82900f53f4..0c22d2f17f 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -2393,10 +2393,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); |