Also, add compile time notice message to show which implementation is
selected.
#include <string.h>
-#ifdef OPENSSL_IA32_SSE2
-# ifdef __MMX__
-# ifdef __SSE2__
-# define __GOST3411_HAS_SSE2__
-# endif
-# endif
+#ifdef __SSE2__
+# define __GOST3411_HAS_SSE2__
#endif
#ifdef __GOST3411_HAS_SSE2__
#ifndef L_ENDIAN
# define __GOST3411_BIG_ENDIAN__
#endif
+
#if defined __GOST3411_HAS_SSE2__
# include "gosthash2012_sse2.h"
#else
# error "GOST R 34.11-2012: portable implementation disabled in config.h"
#endif
+# pragma message "Use regular implementation"
+
#define X(x, y, z) { \
z->QWORD[0] = x->QWORD[0] ^ y->QWORD[0]; \
z->QWORD[1] = x->QWORD[1] ^ y->QWORD[1]; \
# error "GOST R 34.11-2012: SSE2 not enabled"
#endif
+# pragma message "Use SIMD implementation"
+
#include <mmintrin.h>
#include <emmintrin.h>