From 075565e6fa4f346c90ef6cb02028d52ab6363a64 Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 31 Aug 2018 23:32:33 +0300 Subject: [PATCH] Fix invalid hashes with gcc 7.1. --- src/crypto/CryptoNight_x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/CryptoNight_x86.h b/src/crypto/CryptoNight_x86.h index a0b676a5..71452524 100644 --- a/src/crypto/CryptoNight_x86.h +++ b/src/crypto/CryptoNight_x86.h @@ -417,7 +417,7 @@ static inline __m128i int_sqrt_v2(const uint64_t n0) r >>= 19; 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); # else if (x2 < n0) ++r;