]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memcheck: Allow unaligned loads of 128bit vectors on ppc64[le].
authorMark Wielaard <mark@klomp.org>
Sun, 9 Dec 2018 13:26:39 +0000 (14:26 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 20 Dec 2018 21:46:59 +0000 (22:46 +0100)
On powerpc partial unaligned loads of vectors from partially invalid
addresses are OK and could be generated by our translation of lxvd2x.

Adjust partial_load memcheck tests to allow partial loads of 16 byte
vectors on powerpc64.

Part of resolving bug #386945.

memcheck/mc_main.c

index 737f79d76a1a6f46c5db529392f9a84f41479d82..101916b5a3b69a3f5168c339ee46814587441770 100644 (file)
@@ -1354,6 +1354,9 @@ void mc_LOADV_128_or_256_slow ( /*OUT*/ULong* res,
    tl_assert(szB == 16); // s390 doesn't have > 128 bit SIMD
    /* OK if all loaded bytes are from the same page. */
    Bool alignedOK = ((a & 0xfff) <= 0x1000 - szB);
+#  elif defined(VGA_ppc64be) || defined(VGA_ppc64le)
+   /* lxvd2x might generate an unaligned 128 bit vector load.  */
+   Bool alignedOK = (szB == 16);
 #  else
    /* OK if the address is aligned by the load size. */
    Bool alignedOK = (0 == (a & (szB - 1)));