From eee38c276f734543cea92d8f3401167107fbd747 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Feb 17 2016 21:33:49 +0000 Subject: 3.11.0-13 - Add valgrind-3.11.0-s390x-popcnt.patch --- diff --git a/valgrind-3.11.0-s390x-popcnt.patch b/valgrind-3.11.0-s390x-popcnt.patch new file mode 100644 index 0000000..935d9fd --- /dev/null +++ b/valgrind-3.11.0-s390x-popcnt.patch @@ -0,0 +1,63 @@ +commit 4b825ef5dcf064fd0f05323e7edd538ce02ac146 +Author: florian +Date: Wed Feb 17 19:57:01 2016 +0000 + + s390: Implement popcnt insn. Part of fixing BZ #359289. + Patch by Andreas Arnez (arnez@linux.vnet.ibm.com) + + + git-svn-id: svn://svn.valgrind.org/vex/trunk@3210 8f6e269a-dfd6-0310-a8e1-e2731360e62c + +diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c +index 116a606..5e6acd4 100644 +--- a/VEX/priv/guest_s390_toIR.c ++++ b/VEX/priv/guest_s390_toIR.c +@@ -12938,6 +12938,38 @@ s390_irgen_FLOGR(UChar r1, UChar r2) + } + + static const HChar * ++s390_irgen_POPCNT(UChar r1, UChar r2) ++{ ++ Int i; ++ IRTemp val = newTemp(Ity_I64); ++ IRTemp mask[3]; ++ ++ assign(val, get_gpr_dw0(r2)); ++ for (i = 0; i < 3; i++) { ++ mask[i] = newTemp(Ity_I64); ++ } ++ assign(mask[0], mkU64(0x5555555555555555ULL)); ++ assign(mask[1], mkU64(0x3333333333333333ULL)); ++ assign(mask[2], mkU64(0x0F0F0F0F0F0F0F0FULL)); ++ for (i = 0; i < 3; i++) { ++ IRTemp tmp = newTemp(Ity_I64); ++ ++ assign(tmp, ++ binop(Iop_Add64, ++ binop(Iop_And64, ++ mkexpr(val), ++ mkexpr(mask[i])), ++ binop(Iop_And64, ++ binop(Iop_Shr64, mkexpr(val), mkU8(1 << i)), ++ mkexpr(mask[i])))); ++ val = tmp; ++ } ++ s390_cc_thunk_putZ(S390_CC_OP_BITWISE, val); ++ put_gpr_dw0(r1, mkexpr(val)); ++ return "popcnt"; ++} ++ ++static const HChar * + s390_irgen_STCK(IRTemp op2addr) + { + IRDirty *d; +@@ -14999,7 +15031,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes) + ovl.fmt.RRE.r2); goto ok; + case 0xb9df: s390_format_RRE_RR(s390_irgen_CLHLR, ovl.fmt.RRE.r1, + ovl.fmt.RRE.r2); goto ok; +- case 0xb9e1: /* POPCNT */ goto unimplemented; ++ case 0xb9e1: s390_format_RRE_RR(s390_irgen_POPCNT, ovl.fmt.RRE.r1, ++ ovl.fmt.RRE.r2); goto ok; + case 0xb9e2: s390_format_RRF_U0RR(s390_irgen_LOCGR, ovl.fmt.RRF3.r3, + ovl.fmt.RRF3.r1, ovl.fmt.RRF3.r2, + S390_XMNM_LOCGR); goto ok; diff --git a/valgrind.spec b/valgrind.spec index 087d6ef..0c20fea 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: 12%{?dist} +Release: 13%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -104,6 +104,9 @@ Patch18: valgrind-3.11.0-drd_std_thread.patch # KDE#359201 futex syscall skips argument 5 if op is FUTEX_WAIT_BITSET Patch19: valgrind-3.11.0-futex.patch +# KDE#359289 s390: Implement popcnt insn. +Patch20: valgrind-3.11.0-s390x-popcnt.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 @@ -227,6 +230,7 @@ Valgrind User Manual for details. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -419,9 +423,10 @@ echo ===============END TESTING=============== %endif %changelog -* Wed Feb 17 2016 Mark Wielaard +* Wed Feb 17 2016 Mark Wielaard - 3.11.0-13 - Remove valgrind-3.11.0-no-stv.patch (gcc6 has been fixed). - Add valgrind-3.11.0-futex.patch +- Add valgrind-3.11.0-s390x-popcnt.patch * Fri Feb 05 2016 Fedora Release Engineering - 1:3.11.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild