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

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