Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #139

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions include/nil/crypto3/hash/detail/keccak/keccak_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
#include <nil/crypto3/hash/detail/keccak/keccak_policy.hpp>
#include <nil/crypto3/hash/detail/keccak/keccak_impl.hpp>

#if BOOST_ARCH_X86_64
#if defined(CRYPTO3_HAS_AVX512)
#include <nil/crypto3/hash/detail/keccak/keccak_avx512_impl.hpp>
#else
#if defined(CRYPTO3_HAS_AVX2)
#include <nil/crypto3/hash/detail/keccak/keccak_avx2_impl.hpp>
#else
#include <nil/crypto3/hash/detail/keccak/keccak_x86_64_impl.hpp>
#endif
#endif
#elif BOOST_ARCH_ARM
#include <nil/crypto3/hash/detail/keccak/keccak_armv8_impl.hpp>
#endif
//#if BOOST_ARCH_X86_64
//#if defined(CRYPTO3_HAS_AVX512)
//#include <nil/crypto3/hash/detail/keccak/keccak_avx512_impl.hpp>
//#else
//#if defined(CRYPTO3_HAS_AVX2)
//#include <nil/crypto3/hash/detail/keccak/keccak_avx2_impl.hpp>
//#else
//#include <nil/crypto3/hash/detail/keccak/keccak_x86_64_impl.hpp>
//#endif
//#endif
//#elif BOOST_ARCH_ARM
//#include <nil/crypto3/hash/detail/keccak/keccak_armv8_impl.hpp>
//#endif

namespace nil {
namespace crypto3 {
Expand All @@ -59,23 +59,25 @@ namespace nil {

typedef typename policy_type::state_type state_type;

typedef typename std::conditional<word_bits == 64,
#if BOOST_ARCH_X86_64
#if defined(CRYPTO3_HAS_AVX512)
keccak_1600_avx512_impl<policy_type>,
#else
#if defined(CRYPTO3_HAS_AVX2)
keccak_1600_avx2_impl<policy_type>,
#else
keccak_1600_x86_64_impl<policy_type>,
#endif
#endif
#elif BOOST_ARCH_ARM && BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8, 0, 0)
keccak_1600_armv8_impl<policy_type>,
#else
keccak_1600_impl<policy_type>,
#endif
keccak_1600_impl<policy_type>>::type impl_type;
// typedef typename std::conditional<word_bits == 64,
//#if BOOST_ARCH_X86_64
//#if defined(CRYPTO3_HAS_AVX512)
// keccak_1600_avx512_impl<policy_type>,
//#else
//#if defined(CRYPTO3_HAS_AVX2)
// keccak_1600_avx2_impl<policy_type>,
//#else
// keccak_1600_x86_64_impl<policy_type>,
//#endif
//#endif
//#elif BOOST_ARCH_ARM && BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8, 0, 0)
// keccak_1600_armv8_impl<policy_type>,
//#else
// keccak_1600_impl<policy_type>,
//#endif
// keccak_1600_impl<policy_type>>::type impl_type;

typedef keccak_1600_impl<policy_type> impl_type;

typedef keccak_1600_impl<policy_type> const_impl_type;

Expand Down
Loading