Commit c385d80a authored by Laurynas Biveinis's avatar Laurynas Biveinis Committed by Marko Mäkelä

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.
parent d653db32
......@@ -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) \
......
......@@ -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) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment