From 33b34897c1623cf63b8c6bda22d7681e37c4365e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 14 Mar 2016 23:48:01 +0100 Subject: [PATCH] Add valgrind-3.11.0-arm64-ldr-literal-test.patch. --- valgrind-3.11.0-arm64-ldr-literal-test.patch | 55 ++++++++++++++++++++ valgrind.spec | 5 ++ 2 files changed, 60 insertions(+) create mode 100644 valgrind-3.11.0-arm64-ldr-literal-test.patch diff --git a/valgrind-3.11.0-arm64-ldr-literal-test.patch b/valgrind-3.11.0-arm64-ldr-literal-test.patch new file mode 100644 index 0000000..3923bba --- /dev/null +++ b/valgrind-3.11.0-arm64-ldr-literal-test.patch @@ -0,0 +1,55 @@ +Index: valgrind/none/tests/arm64/memory.c +=================================================================== +--- valgrind/none/tests/arm64/memory.c (revision 15827) ++++ valgrind/none/tests/arm64/memory.c (working copy) +@@ -157,18 +157,18 @@ + + //////////////////////////////////////////////////////////////// + // This is a bit tricky. We load the value from just before and +-// just after the actual instruction. Because TESTINSN2_hide2 +-// generates two fixed insns either side of the test insn, these +-// should be constant and hence "safe" to check. ++// just after the actual instruction. So we place a couple of ++// nop insns either side of the test insn, these should "safe" ++// to check. + + printf("LDR (literal, int reg)\n"); +-TESTINST2_hide2("xyzzy00: ldr x21, xyzzy00 - 8", AREA_MID, x21,x22,0); +-TESTINST2_hide2("xyzzy01: ldr x21, xyzzy01 + 0", AREA_MID, x21,x22,0); +-TESTINST2_hide2("xyzzy02: ldr x21, xyzzy02 + 8", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy00: ldr x21, xyzzy00 - 8; nop; nop; nop", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy01: ldr x21, xyzzy01 + 0; nop; nop; nop", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy02: ldr x21, xyzzy02 + 8; nop; nop; nop", AREA_MID, x21,x22,0); + +-TESTINST2_hide2("xyzzy03: ldr x21, xyzzy03 - 4", AREA_MID, x21,x22,0); +-TESTINST2_hide2("xyzzy04: ldr x21, xyzzy04 + 0", AREA_MID, x21,x22,0); +-TESTINST2_hide2("xyzzy05: ldr x21, xyzzy05 + 4", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy03: ldr x21, xyzzy03 - 4; nop; nop; nop", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy04: ldr x21, xyzzy04 + 0; nop; nop; nop", AREA_MID, x21,x22,0); ++TESTINST2_hide2("nop; nop; nop; xyzzy05: ldr x21, xyzzy05 + 4; nop; nop; nop", AREA_MID, x21,x22,0); + + //////////////////////////////////////////////////////////////// + printf("{LD,ST}R (integer register) (entirely MISSING)\n"); +Index: valgrind/none/tests/arm64/memory.stdout.exp +=================================================================== +--- valgrind/none/tests/arm64/memory.stdout.exp (revision 15827) ++++ valgrind/none/tests/arm64/memory.stdout.exp (working copy) +@@ -21,12 +21,12 @@ + ldp w21, w28, [x22, #-40] ; add x21,x21,x28 :: rd 000000019b999794 rn (hidden), cin 0, nzcv 00000000 + ldp w21, w28, [x22, #-40] ; eor x21,x21,x28 :: rd 0000000004040404 rn (hidden), cin 0, nzcv 00000000 + LDR (literal, int reg) +-xyzzy00: ldr x21, xyzzy00 - 8 :: rd aa0003f6d51b4203 rn (hidden), cin 0, nzcv 00000000 +-xyzzy01: ldr x21, xyzzy01 + 0 :: rd aa1503e258000015 rn (hidden), cin 0, nzcv 00000000 +-xyzzy02: ldr x21, xyzzy02 + 8 :: rd 911e43a0d53b4201 rn (hidden), cin 0, nzcv 00000000 +-xyzzy03: ldr x21, xyzzy03 - 4 :: rd 58fffff5aa0003f6 rn (hidden), cin 0, nzcv 00000000 +-xyzzy04: ldr x21, xyzzy04 + 0 :: rd aa1503e258000015 rn (hidden), cin 0, nzcv 00000000 +-xyzzy05: ldr x21, xyzzy05 + 4 :: rd d53b4201aa1503e2 rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy00: ldr x21, xyzzy00 - 8; nop; nop; nop :: rd d503201fd503201f rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy01: ldr x21, xyzzy01 + 0; nop; nop; nop :: rd d503201f58000015 rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy02: ldr x21, xyzzy02 + 8; nop; nop; nop :: rd d503201fd503201f rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy03: ldr x21, xyzzy03 - 4; nop; nop; nop :: rd 58fffff5d503201f rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy04: ldr x21, xyzzy04 + 0; nop; nop; nop :: rd d503201f58000015 rn (hidden), cin 0, nzcv 00000000 ++nop; nop; nop; xyzzy05: ldr x21, xyzzy05 + 4; nop; nop; nop :: rd d503201fd503201f rn (hidden), cin 0, nzcv 00000000 + {LD,ST}R (integer register) (entirely MISSING) + LDRS{B,H,W} (uimm12) + ldrsw x21, [x22, #24] :: rd ffffffff8b8a8988 rn (hidden), cin 0, nzcv 00000000 diff --git a/valgrind.spec b/valgrind.spec index 6bad772..575a435 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -123,6 +123,9 @@ Patch24: valgrind-3.11.0-arm64-more-syscalls.patch # Workaround for KDE#345307 - still reachable memory in libstdc++ from gcc 5 Patch25: valgrind-3.11.0-libstdc++-supp.patch +# KDE#360519 - none/tests/arm64/memory.vgtest might fail with newer gcc +Patch26: valgrind-3.11.0-arm64-ldr-literal-test.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -256,6 +259,7 @@ Valgrind User Manual for details. chmod 755 memcheck/tests/arm64-linux/filter_stderr %patch25 -p1 +%patch26 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -450,6 +454,7 @@ echo ===============END TESTING=============== %changelog * Mon Mar 14 2016 Mark Wielaard - Update valgrind-3.11.0-libstdc++-supp.patch. +- Add valgrind-3.11.0-arm64-ldr-literal-test.patch. * Thu Mar 10 2016 Mark Wielaard - 3.11.0-17 - Update valgrind-3.11.0-arm64-more-syscalls.patch