qemu/target/s390x/tcg
Ilya Leoshkevich 791b2b6a93 target/s390x: Fix the "ignored match" case in VSTRS
Currently the emulation of VSTRS recognizes partial matches in presence
of \0 in the haystack, which, according to PoP, is not correct:

    If the ZS flag is one and a zero byte was detected
    in the second operand, then there can not be a
    partial match ...

Add a check for this. While at it, fold a number of explicitly handled
special cases into the generic logic.

Cc: qemu-stable@nongnu.org
Reported-by: Claudio Fontana <cfontana@suse.de>
Closes: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00633.html
Fixes: 1d706f3141 ("target/s390x: vxeh2: vector string search")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804233748.218935-3-iii@linux.ibm.com>
Tested-by: Claudio Fontana <cfontana@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2023-08-23 12:06:52 +02:00
..
cc_helper.c target/s390x/tcg: Fix and improve the SACF instruction 2022-12-03 22:04:40 +01:00
crypto_helper.c target/s390x: support PRNO_TRNG instruction 2022-09-26 17:23:11 +02:00
excp_helper.c target/s390x: Move trans_exc_code update to do_program_interrupt 2023-07-31 12:19:13 -07:00
fpu_helper.c s390x: spelling fixes 2023-07-25 17:13:45 +03:00
insn-data.h.inc s390x: spelling fixes 2023-07-25 17:13:45 +03:00
insn-format.h.inc target/s390x: Rename insn-data/format.def -> insn-data/format.h.inc 2022-11-05 20:35:45 +01:00
int_helper.c target/s390x: Use a single return for helper_divs64/u64 2023-02-04 06:19:42 -10:00
mem_helper.c target/s390x: Fix CLM with M3=0 2023-07-24 18:44:47 +02:00
meson.build target/s390x: start moving TCG-only code to tcg/ 2021-07-07 14:01:56 +02:00
misc_helper.c target/s390x/tcg/misc_helper: Remove unused "memory.h" include 2023-01-09 13:50:13 +01:00
s390-tod.h target/s390x: start moving TCG-only code to tcg/ 2021-07-07 14:01:56 +02:00
tcg_s390x.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
translate_vx.c.inc target/s390x: Use a 16-bit immediate in VREP 2023-08-23 12:06:44 +02:00
translate.c s390x: spelling fixes 2023-07-25 17:13:45 +03:00
vec_fpu_helper.c target/s390x: fix handling of zeroes in vfmin/vfmax 2022-07-19 12:49:56 +02:00
vec_helper.c target/s390x: Fix VSTL with a large length 2023-08-23 12:06:44 +02:00
vec_int_helper.c target/s390x: vxeh2: Update for changes to vector shifts 2022-05-04 08:47:19 +02:00
vec_string_helper.c target/s390x: Fix the "ignored match" case in VSTRS 2023-08-23 12:06:52 +02:00
vec.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00