[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/6] s390x: sck: load into a temporary not into in1
From: |
Thomas Huth |
Subject: |
[PULL 1/6] s390x: sck: load into a temporary not into in1 |
Date: |
Mon, 28 Feb 2022 14:29:31 +0100 |
From: Nico Boehr <nrb@linux.ibm.com>
We previously loaded into in1, but in1 is not filled during
disassembly and hence always zero. This leads to an assertion failure:
qemu-system-s390x: /home/nrb/qemu/include/tcg/tcg.h:654: temp_idx:
Assertion `n >= 0 && n < tcg_ctx->nb_temps' failed.`
Instead, use in2_la2_m64a to load from storage into in2 and pass that to
the helper, which matches what we already do for SCKC.
This fixes the SCK test I sent here under TCG:
<https://www.spinics.net/lists/kvm/msg265169.html>
Fixes: 9dc67537 ("s390x/tcg: implement SET CLOCK ")
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Message-Id: <20220126084201.774457-1-nrb@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/tcg/insn-data.def | 2 +-
target/s390x/tcg/translate.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/target/s390x/tcg/insn-data.def b/target/s390x/tcg/insn-data.def
index 1c3e115712..4911952080 100644
--- a/target/s390x/tcg/insn-data.def
+++ b/target/s390x/tcg/insn-data.def
@@ -1317,7 +1317,7 @@
/* SET ADDRESS SPACE CONTROL FAST */
F(0xb279, SACF, S, Z, 0, a2, 0, 0, sacf, 0, IF_PRIV)
/* SET CLOCK */
- F(0xb204, SCK, S, Z, la2, 0, 0, 0, sck, 0, IF_PRIV | IF_IO)
+ F(0xb204, SCK, S, Z, 0, m2_64a, 0, 0, sck, 0, IF_PRIV | IF_IO)
/* SET CLOCK COMPARATOR */
F(0xb206, SCKC, S, Z, 0, m2_64a, 0, 0, sckc, 0, IF_PRIV | IF_IO)
/* SET CLOCK PROGRAMMABLE FIELD */
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 46dea73357..e21da539e5 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -4290,8 +4290,7 @@ static DisasJumpType op_stcke(DisasContext *s, DisasOps
*o)
#ifndef CONFIG_USER_ONLY
static DisasJumpType op_sck(DisasContext *s, DisasOps *o)
{
- tcg_gen_qemu_ld_i64(o->in1, o->addr1, get_mem_index(s), MO_TEUQ |
MO_ALIGN);
- gen_helper_sck(cc_op, cpu_env, o->in1);
+ gen_helper_sck(cc_op, cpu_env, o->in2);
set_cc_static(s);
return DISAS_NEXT;
}
--
2.27.0
- [PULL 0/6] s390x patches, Thomas Huth, 2022/02/28
- [PULL 1/6] s390x: sck: load into a temporary not into in1,
Thomas Huth <=
- [PULL 2/6] tests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution, Thomas Huth, 2022/02/28
- [PULL 4/6] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x, Thomas Huth, 2022/02/28
- [PULL 3/6] travis.yml: Update the s390x jobs to Ubuntu Focal, Thomas Huth, 2022/02/28
- [PULL 5/6] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1, Thomas Huth, 2022/02/28
- [PULL 6/6] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3, Thomas Huth, 2022/02/28