Blame SOURCES/valgrind-3.14.0-ppc64-unaligned-vecs.patch

cb589a
commit 321771ee63740333ad355244e0764295218843b8
cb589a
Author: Mark Wielaard <mark@klomp.org>
cb589a
Date:   Sun Dec 9 14:26:39 2018 +0100
cb589a
cb589a
    memcheck: Allow unaligned loads of 128bit vectors on ppc64[le].
cb589a
    
cb589a
    On powerpc partial unaligned loads of vectors from partially invalid
cb589a
    addresses are OK and could be generated by our translation of lxvd2x.
cb589a
    
cb589a
    Adjust partial_load memcheck tests to allow partial loads of 16 byte
cb589a
    vectors on powerpc64.
cb589a
    
cb589a
    Part of resolving bug #386945.
cb589a
cb589a
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c
cb589a
index 737f79d..101916b 100644
cb589a
--- a/memcheck/mc_main.c
cb589a
+++ b/memcheck/mc_main.c
cb589a
@@ -1354,6 +1354,9 @@ void mc_LOADV_128_or_256_slow ( /*OUT*/ULong* res,
cb589a
    tl_assert(szB == 16); // s390 doesn't have > 128 bit SIMD
cb589a
    /* OK if all loaded bytes are from the same page. */
cb589a
    Bool alignedOK = ((a & 0xfff) <= 0x1000 - szB);
cb589a
+#  elif defined(VGA_ppc64be) || defined(VGA_ppc64le)
cb589a
+   /* lxvd2x might generate an unaligned 128 bit vector load.  */
cb589a
+   Bool alignedOK = (szB == 16);
cb589a
 #  else
cb589a
    /* OK if the address is aligned by the load size. */
cb589a
    Bool alignedOK = (0 == (a & (szB - 1)));