Currently the following code in coregrind/m_machine.c (machine_get_hwcaps) prevents using rdrand and f16c on avx only (none-avx2) machines: /* Sanity check for RDRAND and F16C. These don't actually *need* AVX2, bu it's convenient to restrict them to the AVX2 case since the simulated CPUID we'll offer them on has AVX2 as a base. */ if (!have_avx2) { have_f16c = False; have_rdrand = False; } So even if the host CPU supports it, valgrind disables it. Both can be supported on avx machines too.
Created attachment 120350 [details] Expose rdrand and f16c through cpuid also if the host only has avx. Proposed fix.
commit 791fe5ecf909d573bcbf353b677b9404f9da0ed4 Author: Mark Wielaard <mark@klomp.org> Date: Mon May 27 22:19:27 2019 +0200 Expose rdrand and f16c through cpuid also if the host only has avx. The amd64 CPUID dirtyhelpers are mostly static since they emulate some existing CPU "family". The avx2 ("i7-4910MQ") CPUID variant however can "dynamicly" enable rdrand and/or f16c if the host supports them. Do the same for the avx_and_cx16 ("i5-2300") CPUID variant. https://bugs.kde.org/show_bug.cgi?id=408009