RandomX: isolate SSE4.1 code to fix crashes on old CPUs

This commit is contained in:
SChernykh 2020-09-27 11:46:32 +02:00
parent 0e9ed351a1
commit 84f8a0dc54
3 changed files with 115 additions and 69 deletions

View file

@ -19,6 +19,7 @@ if (WITH_RANDOMX)
src/crypto/randomx/allocator.cpp
src/crypto/randomx/blake2_generator.cpp
src/crypto/randomx/blake2/blake2b.c
src/crypto/randomx/blake2/blake2b_sse41.c
src/crypto/randomx/bytecode_machine.cpp
src/crypto/randomx/dataset.cpp
src/crypto/randomx/instructions_portable.cpp
@ -65,7 +66,7 @@ if (WITH_RANDOMX)
endif()
if (CMAKE_C_COMPILER_ID MATCHES GNU OR CMAKE_C_COMPILER_ID MATCHES Clang)
set_source_files_properties(src/crypto/randomx/blake2/blake2b.c PROPERTIES COMPILE_FLAGS -msse4.1)
set_source_files_properties(src/crypto/randomx/blake2/blake2b_sse41.c PROPERTIES COMPILE_FLAGS -msse4.1)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES Clang)