Fix PS-5388 (Enable hardware CRC32 under Valgrind)

Valgrind started supporting CRC32 instruction starting with version
3.6.1, released in 2011. Thus remove the fallback to software
implementation in case running under Valgrind.
This commit is contained in:
Laurynas Biveinis 2019-01-30 10:16:55 +02:00 committed by Marko Mäkelä
parent d653db32f2
commit c385d80abd
2 changed files with 0 additions and 38 deletions

View file

@ -316,26 +316,7 @@ ut_crc32_init()
ut_cpuid(vend, &model, &family, &stepping,
&features_ecx, &features_edx);
/* Valgrind does not understand the CRC32 instructions:
vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x38 0xF0 0xA
valgrind: Unrecognised instruction at address 0xad3db5.
Your program just tried to execute an instruction that Valgrind
did not recognise. There are two possible reasons for this.
1. Your program has a bug and erroneously jumped to a non-code
location. If you are running Memcheck and you just saw a
warning about a bad jump, it's probably your program's fault.
2. The instruction is legitimate but Valgrind doesn't handle it,
i.e. it's Valgrind's fault. If you think this is the case or
you are not sure, please let us know and we'll try to fix it.
Either way, Valgrind will now raise a SIGILL signal which will
probably kill your program.
*/
#ifndef UNIV_DEBUG_VALGRIND
ut_crc32_sse2_enabled = (features_ecx >> 20) & 1;
#endif /* UNIV_DEBUG_VALGRIND */
#endif /* defined(__GNUC__) && defined(__x86_64__) */
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \

View file

@ -316,26 +316,7 @@ ut_crc32_init()
ut_cpuid(vend, &model, &family, &stepping,
&features_ecx, &features_edx);
/* Valgrind does not understand the CRC32 instructions:
vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x38 0xF0 0xA
valgrind: Unrecognised instruction at address 0xad3db5.
Your program just tried to execute an instruction that Valgrind
did not recognise. There are two possible reasons for this.
1. Your program has a bug and erroneously jumped to a non-code
location. If you are running Memcheck and you just saw a
warning about a bad jump, it's probably your program's fault.
2. The instruction is legitimate but Valgrind doesn't handle it,
i.e. it's Valgrind's fault. If you think this is the case or
you are not sure, please let us know and we'll try to fix it.
Either way, Valgrind will now raise a SIGILL signal which will
probably kill your program.
*/
#ifndef UNIV_DEBUG_VALGRIND
ut_crc32_sse2_enabled = (features_ecx >> 20) & 1;
#endif /* UNIV_DEBUG_VALGRIND */
#endif /* defined(__GNUC__) && defined(__x86_64__) */
#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \