From 3bf416c8b4c9b42e58f5b38fe62a6ca8ed7e23d4 Mon Sep 17 00:00:00 2001 From: Martun Karapetyan Date: Mon, 29 Apr 2024 12:28:43 +0400 Subject: [PATCH] Temporarily disable ASM code for keccak, it gives illegal instruction error on mac, and sometimes break tests on clang-16. Will enable back when/if this ASM codes are fixed for all architectures. --- .../hash/detail/keccak/keccak_functions.hpp | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/include/nil/crypto3/hash/detail/keccak/keccak_functions.hpp b/include/nil/crypto3/hash/detail/keccak/keccak_functions.hpp index 8a5339d..f339e6e 100644 --- a/include/nil/crypto3/hash/detail/keccak/keccak_functions.hpp +++ b/include/nil/crypto3/hash/detail/keccak/keccak_functions.hpp @@ -30,19 +30,19 @@ #include #include -#if BOOST_ARCH_X86_64 -#if defined(CRYPTO3_HAS_AVX512) -#include -#else -#if defined(CRYPTO3_HAS_AVX2) -#include -#else -#include -#endif -#endif -#elif BOOST_ARCH_ARM -#include -#endif +//#if BOOST_ARCH_X86_64 +//#if defined(CRYPTO3_HAS_AVX512) +//#include +//#else +//#if defined(CRYPTO3_HAS_AVX2) +//#include +//#else +//#include +//#endif +//#endif +//#elif BOOST_ARCH_ARM +//#include +//#endif namespace nil { namespace crypto3 { @@ -59,23 +59,25 @@ namespace nil { typedef typename policy_type::state_type state_type; - typedef typename std::conditional, -#else -#if defined(CRYPTO3_HAS_AVX2) - keccak_1600_avx2_impl, -#else - keccak_1600_x86_64_impl, -#endif -#endif -#elif BOOST_ARCH_ARM && BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8, 0, 0) - keccak_1600_armv8_impl, -#else - keccak_1600_impl, -#endif - keccak_1600_impl>::type impl_type; +// typedef typename std::conditional, +//#else +//#if defined(CRYPTO3_HAS_AVX2) +// keccak_1600_avx2_impl, +//#else +// keccak_1600_x86_64_impl, +//#endif +//#endif +//#elif BOOST_ARCH_ARM && BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8, 0, 0) +// keccak_1600_armv8_impl, +//#else +// keccak_1600_impl, +//#endif +// keccak_1600_impl>::type impl_type; + + typedef keccak_1600_impl impl_type; typedef keccak_1600_impl const_impl_type;