qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] target/s390x: Fix emulation of C(G)HRL
@ 2023-03-08 21:02 Nina Schoetterl-Glausch
  2023-03-08 21:02 ` [PATCH v2 1/2] " Nina Schoetterl-Glausch
  2023-03-08 21:02 ` [PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test Nina Schoetterl-Glausch
  0 siblings, 2 replies; 7+ messages in thread
From: Nina Schoetterl-Glausch @ 2023-03-08 21:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: Nina Schoetterl-Glausch, Richard Henderson, David Hildenbrand,
	Ilya Leoshkevich, Thomas Huth, qemu-s390x

The second operand of COMPARE HALFWORD RELATIVE LONG is a signed
halfword, it does not have the same size as the first operand.
Fix this and add a tcg test for c(g)hrl.

Nina Schoetterl-Glausch (2):
  target/s390x: Fix emulation of C(G)HRL
  tests/tcg/s390x: Add C(G)HRL test

 target/s390x/tcg/insn-data.h.inc |  4 +-
 target/s390x/tcg/translate.c     |  7 +++
 tests/tcg/s390x/chrl.c           | 76 ++++++++++++++++++++++++++++++++
 tests/tcg/s390x/Makefile.target  |  1 +
 4 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 tests/tcg/s390x/chrl.c

Range-diff against v1:
1:  f463507b25 ! 1:  228a1d9cfb target/s390x: Fix emulation of C(G)HRL
    @@ target/s390x/tcg/translate.c: static void in2_m2_64a(DisasContext *s, DisasOps *
      
     +static void in2_mri2_16s(DisasContext *s, DisasOps *o)
     +{
    -+    in2_ri2(s, o);
    -+    tcg_gen_qemu_ld16s(o->in2, o->in2, get_mem_index(s));
    ++    o->in2 = tcg_temp_new_i64();
    ++    tcg_gen_qemu_ld16s(o->in2, gen_ri2(s), get_mem_index(s));
     +}
     +#define SPEC_in2_mri2_16s 0
     +
      static void in2_mri2_16u(DisasContext *s, DisasOps *o)
      {
    -     in2_ri2(s, o);
    +     o->in2 = tcg_temp_new_i64();
2:  316b53ebd9 = 2:  3b1ca6b682 tests/tcg/s390x: Add C(G)HRL test

base-commit: 817fd33836e73812df2f1907612b57750fcb9491
-- 
2.37.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-09 14:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 21:02 [PATCH v2 0/2] target/s390x: Fix emulation of C(G)HRL Nina Schoetterl-Glausch
2023-03-08 21:02 ` [PATCH v2 1/2] " Nina Schoetterl-Glausch
2023-03-08 22:48   ` Richard Henderson
2023-03-08 21:02 ` [PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test Nina Schoetterl-Glausch
2023-03-08 22:49   ` Richard Henderson
2023-03-09 13:47   ` Thomas Huth
2023-03-09 14:55     ` Nina Schoetterl-Glausch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).