]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
elbrus: Treat __e2k__ as __x86_64__ for Streebog
authorVitaly Chikunov <vt@altlinux.org>
Mon, 10 Feb 2020 05:43:38 +0000 (08:43 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Mon, 10 Feb 2020 08:28:23 +0000 (11:28 +0300)
lcc emulates x86_64 SIMD intrinsics, so SSE2 code will work as is. Even
though in benchmarks it is slightly slower than regular implementation

gosthash2012.c
gosthash2012.h

index 5ec8ec76f96757499bf3d8b80bd90043b9cdb46d..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
index 8947ee6ab7e5404aff5da98b04d5637dfc770814..99c9e3d694fd8305d099c1def5b8a114d3381e5e 100644 (file)
@@ -12,7 +12,7 @@
 
 #ifdef __SSE2__
 # define __GOST3411_HAS_SSE2__
-# if !defined(__x86_64__)
+# if !defined(__x86_64__) && !defined(__e2k__)
 /*
  * x86-64 bit Linux and Windows ABIs provide malloc function that returns
  * 16-byte alignment memory buffers required by SSE load/store instructions.