]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Bug 434296 - s390x: Rework IR conversion of VSTRC, VFAE, and VFEE
authorAndreas Arnez <arnez@linux.ibm.com>
Thu, 18 Mar 2021 17:01:10 +0000 (18:01 +0100)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 5 May 2021 15:32:21 +0000 (17:32 +0200)
commite78bd78d3043729033b426218ab8c6dae9c51e96
treead7072882ce74f6be0554deba0b28b9f7c841c38
parent5db3f929c43bf46f4707178706cfe90f43acdd19
Bug 434296 - s390x: Rework IR conversion of VSTRC, VFAE, and VFEE

The z/Architecture instructions "vector string range compare" (VSTRC),
"vector find any element equal" (VFAE), and "vector find element
equal" (VFEE) are each implemented with a dirty helper that executes the
instruction.  Unfortunately this approach leads to memcheck false
positives, because these instructions may yield a defined result even if
parts of the input vectors are undefined.  There are multiple ways this
can happen: Wherever the flags in the fourth operand to VSTRC indicate
"match always" or "match never", the corresponding elements in the third
operand don't affect the result.  The same is true for the elements
following the first zero-element in the second operand if the ZS flag is
set, or for the elements following the first matching element, if any.

Re-implement the instructions without dirty helpers and transform into
lengthy IR instead.
VEX/priv/guest_s390_defs.h
VEX/priv/guest_s390_helpers.c
VEX/priv/guest_s390_toIR.c