On Gentoo AMD64 compiled with -march=amdfam10 valgrind may fail with vex amd64->IR: unhandled instruction bytes: 0xF3 0x48 0xF 0xBD 0xC0 0x4C Attached patch fixes valgrind to recognize and execute the instruction. Note that the patch is experimental and will be reviewed on the valgrind-dev mailing list. Reproducible: Always
Created attachment 217121 [details] Patch to make valgrind aware of the sse4a lzcnt instruction
Created attachment 217123 [details] Patch to apply lzcnt patch in the ebuild Building the test of the sse4a instruction will not be enabled because it would require running autotools which is not yet in the ebuild.
Created attachment 217196 [details, diff] Revised patch that sets the carry flag properly
Patch tested on AMD Phenom. Works well.
Fixed upstream as of version 3.6.0.