You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In commit 94d0bb4 (MDEV-20377)
we replaced some inline assembler code with calls to GCC-style
builtin functions. These functions would only be available if
the target allows SSE4.2 instructions to be used. Hence, the
cmake -DWITH_MSAN=ON build would fail unless the default x86 (IA-32)
or AMD64 target was overridden.
It turns out that the problem can be solved by overriding the default
target architecture for specific functions with the help of GCC function
attributes.
ut_crc32c_8(), ut_crc32c_64(): Use the compiler-builtin intrinsic
functions. For GCC before 5, the header file <nmmintrin.h> does not
really work, and we must keep using the compiler built-in functions.
For the Microsoft compiler, we will keep using <intrin.h> because
we will also need the definition of the __cpuid() function.
On GCC and clang, we prefer to invoke inline assembler for that.
Curiously, the inline assembler in has_sse4_2() or crc32_pclmul()
is not causing any trouble for MSAN. Also, the inline assembler
in WolfSSL appears to be fine now. Something might have changed
between clang-8 and clang-10 (10.0.1).
0 commit comments