From 053ecb0a582e2dbfba5ddd6dc8dafb5698051ac4 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Mon, 10 Feb 2020 08:43:38 +0300 Subject: [PATCH] elbrus: Treat __e2k__ as __x86_64__ for Streebog 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 | 2 +- gosthash2012.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gosthash2012.c b/gosthash2012.c index 5ec8ec7..60fa436 100644 --- a/gosthash2012.c +++ b/gosthash2012.c @@ -9,7 +9,7 @@ */ #include "gosthash2012.h" -#ifdef __x86_64__ +#if defined(__x86_64__) || defined(__e2k__) # ifdef _MSC_VER # include # else diff --git a/gosthash2012.h b/gosthash2012.h index 8947ee6..99c9e3d 100644 --- a/gosthash2012.h +++ b/gosthash2012.h @@ -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. -- 2.39.5