Use SSSE3 instructions even on Visual Studio with a 32-bit target

This commit is contained in:
Frank Denis 2015-11-16 16:26:02 +01:00
parent 0ad21a218c
commit 7371f0dca4
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
#include <string.h> #include <string.h>
#if (defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H)) || \ #if (defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H)) || \
(defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
#pragma GCC target("sse2") #pragma GCC target("sse2")
#pragma GCC target("ssse3") #pragma GCC target("ssse3")

View File

@ -415,7 +415,7 @@ blake2b_pick_best_implementation(void)
} }
#endif #endif
#if (defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H)) || \ #if (defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H)) || \
(defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
if (sodium_runtime_has_ssse3()) { if (sodium_runtime_has_ssse3()) {
blake2b_compress = blake2b_compress_ssse3; blake2b_compress = blake2b_compress_ssse3;
return 0; return 0;