From ac59d95efd73d3d32daec0908b910958ba6fa46d Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Oct 12 2015 14:33:46 +0000 Subject: 3.11.0-3 Add valgrind-3.11.0-rexw-cvtps2pd.patch. --- diff --git a/valgrind-3.11.0-rexw-cvtps2pd.patch b/valgrind-3.11.0-rexw-cvtps2pd.patch new file mode 100644 index 0000000..f7c0d26 --- /dev/null +++ b/valgrind-3.11.0-rexw-cvtps2pd.patch @@ -0,0 +1,76 @@ +diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c +index 98596d2..06552e8 100644 +--- a/VEX/priv/guest_amd64_toIR.c ++++ b/VEX/priv/guest_amd64_toIR.c +@@ -13396,7 +13396,8 @@ Long dis_ESC_0F__SSE2 ( Bool* decode_OK, + case 0x5A: + /* 0F 5A = CVTPS2PD -- convert 2 x F32 in low half mem/xmm to 2 x + F64 in xmm(G). */ +- if (haveNo66noF2noF3(pfx) && sz == 4) { ++ if (haveNo66noF2noF3(pfx) ++ && sz == 4 || /* ignore redundant REX.W */ sz == 8) { + delta = dis_CVTPS2PD_128( vbi, pfx, delta, False/*!isAvx*/ ); + goto decode_success; + } +diff --git a/none/tests/amd64/redundantRexW.c b/none/tests/amd64/redundantRexW.c +index e189267..0a50c3b 100644 +--- a/none/tests/amd64/redundantRexW.c ++++ b/none/tests/amd64/redundantRexW.c +@@ -596,6 +596,23 @@ int main ( void ) + after_test( "rex.WB subsd -0x8(%r13),%xmm1", regs, mem ); + } + ++ /* cvtps2pd mem, reg 48 0f 5a 07 rex.W cvtps2pd (%rdi),%xmm0 */ ++ { ++ before_test( regs, mem ); ++ __asm__ __volatile__( ++ "movq %0, %%r14\n" ++ "\tmovq %1, %%r15\n" ++ LOAD_XMMREGS_from_r14 ++ "\tmovq %%r15, %%rdi\n" ++ "\t.byte 0x48,0x0f,0x5a,0x07\n" ++ SAVE_XMMREGS_to_r14 ++ : /*out*/ : /*in*/ "r"(regs), "r"( -0 + (char*)&mem->dqw[2] ) ++ : /*trash*/ "r14","r15","memory", XMMREGS, ++ "rdi" ++ ); ++ after_test( "rex.W cvtps2pd (%rdi),%xmm0", regs, mem ); ++ } ++ + free(regs); + free(mem); + return 0; +diff --git a/none/tests/amd64/redundantRexW.stdout.exp b/none/tests/amd64/redundantRexW.stdout.exp +index dd1697a..94b255a 100644 +--- a/none/tests/amd64/redundantRexW.stdout.exp ++++ b/none/tests/amd64/redundantRexW.stdout.exp +@@ -648,3 +648,29 @@ after "rex.WB subsd -0x8(%r13),%xmm1" (xmms in order [15..0]) { + %xmm15 ................................ + } + ++after "rex.W cvtps2pd (%rdi),%xmm0" (dqws in order [15 .. 0]) { ++ [0] ................................ ++ [1] ................................ ++ [2] ................................ ++ [3] ................................ ++ [4] ................................ ++} ++after "rex.W cvtps2pd (%rdi),%xmm0" (xmms in order [15..0]) { ++ %xmm 0 113a1c7d5554535213bd9cffd4535251 ++ %xmm 1 ................................ ++ %xmm 2 ................................ ++ %xmm 3 ................................ ++ %xmm 4 ................................ ++ %xmm 5 ................................ ++ %xmm 6 ................................ ++ %xmm 7 ................................ ++ %xmm 8 ................................ ++ %xmm 9 ................................ ++ %xmm10 ................................ ++ %xmm11 ................................ ++ %xmm12 ................................ ++ %xmm13 ................................ ++ %xmm14 ................................ ++ %xmm15 ................................ ++} ++ diff --git a/valgrind.spec b/valgrind.spec index 92e6de4..5766f3f 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -3,7 +3,7 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind Version: 3.11.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -64,6 +64,9 @@ Patch5: valgrind-3.11.0-arm64-sigpending.patch # KDE#353370 don't advertise RDRAND in cpuid for Core-i7-4910-like avx2 Patch6: valgrind-3.11.0-no-rdrand.patch +# KDE#278744 cvtps2pd with redundant RexW +Patch7: valgrind-3.11.0-rexw-cvtps2pd.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 @@ -174,6 +177,7 @@ Valgrind User Manual for details. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -349,6 +353,9 @@ echo ===============END TESTING=============== %endif %changelog +* Mon Oct 12 2015 Mark Wielaard - 3.11.0-3 +- Add valgrind-3.11.0-rexw-cvtps2pd.patch. + * Thu Oct 01 2015 Mark Wielaard - 3.11.0-2 - Add valgrind-3.11.0-no-rdrand.patch