From 8881f10ecfd887a003f23c44689964316a34a843 Mon Sep 17 00:00:00 2001 From: Alexandr Smirnov Date: Wed, 27 Sep 2023 14:43:59 +0300 Subject: [PATCH] Change rotl function Implement rotl function instead of using the function from immintrin.h --- src/core/algorithms/ind/faida/hashing/hashing.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/algorithms/ind/faida/hashing/hashing.h b/src/core/algorithms/ind/faida/hashing/hashing.h index 201b053e5a..34a9cb88b2 100644 --- a/src/core/algorithms/ind/faida/hashing/hashing.h +++ b/src/core/algorithms/ind/faida/hashing/hashing.h @@ -8,7 +8,8 @@ namespace algos::faida::hashing { inline size_t __attribute__((always_inline)) rotl(size_t hash, int num_bits) { - return __rolq(hash, num_bits); + num_bits &= 63; + return (hash << num_bits) | (hash >> (-num_bits & 63)); } inline size_t __attribute__((always_inline)) CalcMurmurHash(std::string const& str) {