]> git.ipfire.org Git - thirdparty/valgrind.git/commit
s390x: Optimize CLC for 1, 2, 4, and 8 bytes
authorAndreas Arnez <arnez@linux.ibm.com>
Fri, 5 May 2023 15:48:31 +0000 (17:48 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 11 May 2023 14:27:26 +0000 (16:27 +0200)
commit97d335621a60a3c29ded56ea4a29ae1968ed7c8a
treefbb6508c435b6632946fc857ce6f38b58ee56cf1
parentafa21cd6a259c0b16fdfd78eb84d1ed221cf8268
s390x: Optimize CLC for 1, 2, 4, and 8 bytes

The CLC instruction compares two memory areas with sizes from 1 up to 256
bytes.  Currently Valgrind always implements it with a bytewise loop.

Add special handling for the sizes 1, 2, 4, and 8.  Realize CLC with an
8-, 16-, 32-, and 64-bit integer comparison, respectively, in those cases.
Apart from a slight optimization this also improves the diagnostics for
uninitialized values since it avoids the manufactured conditional jump
that breaks out of the loop over the individual bytes.
VEX/priv/guest_s390_toIR.c