diff --git a/src/crypto/CryptoNight.h b/src/crypto/CryptoNight.h index 5b0732a7..8a48eafd 100644 --- a/src/crypto/CryptoNight.h +++ b/src/crypto/CryptoNight.h @@ -29,7 +29,7 @@ #include #include -#ifdef _MSC_VER +#if defined _MSC_VER || defined XMRIG_ARM #define ABI_ATTRIBUTE #else #define ABI_ATTRIBUTE __attribute__((ms_abi)) diff --git a/src/crypto/CryptoNight_arm.h b/src/crypto/CryptoNight_arm.h index 096499b1..f04c27f1 100644 --- a/src/crypto/CryptoNight_arm.h +++ b/src/crypto/CryptoNight_arm.h @@ -515,10 +515,11 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si ch = ((uint64_t*) &l0[idx0 & MASK])[1]; if (BASE == xmrig::VARIANT_2) { - VARIANT2_INTEGER_MATH(0, cl, cx); - } - else if (VARIANT == xmrig::VARIANT_WOW) { - VARIANT4_RANDOM_MATH(0, al0, ah0, cl, bx0, bx1); + if (VARIANT == xmrig::VARIANT_WOW) { + VARIANT4_RANDOM_MATH(0, al0, ah0, cl, bx0, bx1); + } else { + VARIANT2_INTEGER_MATH(0, cl, cx); + } } lo = __umul128(idx0, cl, &hi); @@ -685,10 +686,11 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si ch = ((uint64_t*) &l0[idx0 & MASK])[1]; if (BASE == xmrig::VARIANT_2) { - VARIANT2_INTEGER_MATH(0, cl, cx0); - } - else if (VARIANT == xmrig::VARIANT_WOW) { - VARIANT4_RANDOM_MATH(0, al0, ah0, cl, bx00, bx01); + if (VARIANT == xmrig::VARIANT_WOW) { + VARIANT4_RANDOM_MATH(0, al0, ah0, cl, bx00, bx01); + } else { + VARIANT2_INTEGER_MATH(0, cl, cx0); + } } lo = __umul128(idx0, cl, &hi); @@ -734,10 +736,11 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si ch = ((uint64_t*) &l1[idx1 & MASK])[1]; if (BASE == xmrig::VARIANT_2) { - VARIANT2_INTEGER_MATH(1, cl, cx1); - } - else if (VARIANT == xmrig::VARIANT_WOW) { - VARIANT4_RANDOM_MATH(1, al1, ah1, cl, bx10, bx11); + if (VARIANT == xmrig::VARIANT_WOW) { + VARIANT4_RANDOM_MATH(1, al1, ah1, cl, bx10, bx11); + } else { + VARIANT2_INTEGER_MATH(1, cl, cx1); + } } lo = __umul128(idx1, cl, &hi);