]> wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gosthash2012.c
ec: Use BN_{CTX_,}secure_new memory API for priv keys
[openssl-gost/engine.git] / gosthash2012.c
index 5a4c64e488d0830beefa34c36c7192114d8ba99f..60fa43696b6bd2efd0c7198d836b183c00a38d11 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include "gosthash2012.h"
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__e2k__)
 # ifdef _MSC_VER
 #  include <intrin.h>
 # else
@@ -135,6 +135,11 @@ static void g(union uint512_u *h, const union uint512_u * RESTRICT N,
     X128R(xmm0, xmm2, xmm4, xmm6, xmm1, xmm3, xmm5, xmm7);
 
     STORE(h, xmm0, xmm2, xmm4, xmm6);
+# ifndef __i386__
+    /* Restore the Floating-point status on the CPU */
+    /* This is only required on MMX, but EXTRACT32 is using MMX */
+    _mm_empty();
+# endif
 #else
     union uint512_u Ki, data;
     unsigned int i;