s390x: sck: load into a temporary not into in1
authorNico Boehr <nrb@linux.ibm.com>
Wed, 26 Jan 2022 08:42:01 +0000 (09:42 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 25 Feb 2022 12:31:37 +0000 (13:31 +0100)
commit2092fdd97c27c0d6ef4bd0958fde0f6522100dcc
tree52ed7cf7be726a46f9358d167005cce25fa1083e
parentfa435db8ce1dff3b15e3f59a12f55f7b3a347b08
s390x: sck: load into a temporary not into in1

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
target/s390x/tcg/translate.c