Fix invalid hashes with gcc 7.1.

This commit is contained in:
XMRig 2018-08-31 23:32:33 +03:00
parent eef4d9b102
commit 075565e6fa

View file

@ -417,7 +417,7 @@ static inline __m128i int_sqrt_v2(const uint64_t n0)
r >>= 19; r >>= 19;
uint64_t x2 = (s - (1022ULL << 32)) * (r - s - (1022ULL << 32) + 1); uint64_t x2 = (s - (1022ULL << 32)) * (r - s - (1022ULL << 32) + 1);
# if (defined _MSC_VER || (__GNUC__ >= 7)) && (defined(__x86_64__) || defined(_M_AMD64)) # if (defined(_MSC_VER) || __GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ > 1)) && (defined(__x86_64__) || defined(_M_AMD64))
_addcarry_u64(_subborrow_u64(0, x2, n0, (unsigned long long int*)&x2), r, 0, (unsigned long long int*)&r); _addcarry_u64(_subborrow_u64(0, x2, n0, (unsigned long long int*)&x2), r, 0, (unsigned long long int*)&r);
# else # else
if (x2 < n0) ++r; if (x2 < n0) ++r;