diff --git a/valgrind-3.14.0-ppc64-unaligned-vecs.patch b/valgrind-3.14.0-ppc64-unaligned-vecs.patch new file mode 100644 index 0000000..00c64fc --- /dev/null +++ b/valgrind-3.14.0-ppc64-unaligned-vecs.patch @@ -0,0 +1,28 @@ +commit 321771ee63740333ad355244e0764295218843b8 +Author: Mark Wielaard +Date: Sun Dec 9 14:26:39 2018 +0100 + + memcheck: Allow unaligned loads of 128bit vectors on ppc64[le]. + + 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. + +diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c +index 737f79d..101916b 100644 +--- a/memcheck/mc_main.c ++++ b/memcheck/mc_main.c +@@ -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))); diff --git a/valgrind.spec b/valgrind.spec index 742df5c..6924a70 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -140,6 +140,7 @@ Patch18: valgrind-3.14.0-final_tidyup.patch Patch19: valgrind-3.14.0-ppc64-ldbrx.patch Patch20: valgrind-3.14.0-ppc64-unaligned-words.patch Patch21: valgrind-3.14.0-ppc64-lxvd2x.patch +Patch22: valgrind-3.14.0-ppc64-unaligned-vecs.patch %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches @@ -294,6 +295,7 @@ Valgrind User Manual for details. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build CC=gcc @@ -533,6 +535,7 @@ fi - Add valgrind-3.14.0-ppc64-ldbrx.patch - Add valgrind-3.14.0-ppc64-unaligned-words.patch - Add valgrind-3.14.0-ppc64-lxvd2x.patch +- Add valgrind-3.14.0-ppc64-unaligned-vecs.patch * Sat Dec 1 2018 Mark Wielaard - 3.14.0.5 - Add valgrind-3.14.0-wcsncmp.patch (#1645971)