Skip to content
This repository has been archived by the owner on Dec 27, 2021. It is now read-only.

Commit

Permalink
Adds UPX2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendr0id committed Jun 9, 2019
1 parent 59f8d83 commit e880c0d
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 31 deletions.
25 changes: 24 additions & 1 deletion src/common/crypto/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ static AlgoData const algorithms[] = {
{ "cryptonight_turtle", "cn_turtle", xmrig::CRYPTONIGHT_PICO, xmrig::VARIANT_TRTL },
# endif

# ifndef XMRIG_NO_CN_EXTREMELITE
{ "cryptonight-extremelite", "cn-extremelite", xmrig::CRYPTONIGHT_EXTREMELITE, xmrig::VARIANT_UPX2 },
{ "cryptonight-extremelite/upx2", "cn-extremelite/upx2", xmrig::CRYPTONIGHT_EXTREMELITE, xmrig::VARIANT_UPX2 },
{ "cryptonight-upx2", "cn-upx2", xmrig::CRYPTONIGHT_EXTREMELITE, xmrig::VARIANT_UPX2 },
# endif

# ifndef XMRIG_NO_CN_GPU
{ "cryptonight/gpu", "cn/gpu", xmrig::CRYPTONIGHT, xmrig::VARIANT_GPU },
# endif
Expand Down Expand Up @@ -138,7 +144,8 @@ static const char *variants[] = {
"r",
"rwz",
"zls",
"double"
"double",
"upx2"
};


Expand Down Expand Up @@ -215,6 +222,18 @@ void xmrig::Algorithm::parseVariant(const char *variant)
return parseVariant(variant + 1);
}


if (m_algo == xmrig::CRYPTONIGHT_PICO) {
m_variant = VARIANT_TRTL;
return;
}

if (m_algo == xmrig::CRYPTONIGHT_EXTREMELITE) {
m_variant = VARIANT_UPX2;
return;
}


for (size_t i = 0; i < ARRAY_SIZE(variants); i++) {
if (strcasecmp(variant, variants[i]) == 0) {
m_variant = static_cast<Variant>(i);
Expand Down Expand Up @@ -256,6 +275,10 @@ void xmrig::Algorithm::setAlgo(Algo algo)
if (m_algo == CRYPTONIGHT_PICO && m_variant == VARIANT_AUTO) {
m_variant = xmrig::VARIANT_TRTL;
}

if (m_algo == CRYPTONIGHT_EXTREMELITE && m_variant == VARIANT_AUTO) {
m_variant = xmrig::VARIANT_UPX2;
}
}


Expand Down
2 changes: 2 additions & 0 deletions src/common/xmrig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum Algo {
CRYPTONIGHT_LITE, /* CryptoNight (1 MB) */
CRYPTONIGHT_HEAVY, /* CryptoNight (4 MB) */
CRYPTONIGHT_PICO, /* CryptoNight (256 KB) */
CRYPTONIGHT_EXTREMELITE, /* CryptoNight (128 KB) */
ALGO_MAX
};

Expand Down Expand Up @@ -79,6 +80,7 @@ enum Variant {
VARIANT_RWZ = 14, // CryptoNight variant 2 with 3/4 iterations and reversed shuffle operation (Graft)
VARIANT_ZLS = 15, // CryptoNight variant 2 with 3/4 iterations (Zelerius)
VARIANT_DOUBLE = 16, // CryptoNight variant 2 with double iterations (X-CASH)
VARIANT_UPX2 = 17,
VARIANT_MAX
};

Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"log-file": null,
"pools": [
{
"url": "donate.v2.xmrig.com:3333",
"url": "donate2.graef.in:80",
"user": "YOUR_WALLET",
"pass": "x",
"rig-id": null,
Expand Down
4 changes: 4 additions & 0 deletions src/core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ bool xmrig::Config::isCNv2() const
return true;
}

//if (algorithm().algo() == CRYPTONIGHT_EXTREMELITE) {
// return true;
//}

if (algorithm().algo() != CRYPTONIGHT) {
return false;
}
Expand Down
50 changes: 47 additions & 3 deletions src/crypto/CryptoNight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
cryptonight_single_hash_wrapper<CRYPTONIGHT, VARIANT_DOUBLE>,
cryptonight_single_hash<CRYPTONIGHT, true, VARIANT_DOUBLE>,

nullptr, nullptr, // VARIANT_UPX2

# ifndef XMRIG_NO_AEON
cryptonight_single_hash<CRYPTONIGHT_LITE, false, VARIANT_0>,
cryptonight_single_hash<CRYPTONIGHT_LITE, true, VARIANT_0>,
Expand All @@ -270,6 +272,8 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, // VARIANT_RWZ
nullptr, nullptr, // VARIANT_ZLS
nullptr, nullptr, // VARIANT_DOUBLE
nullptr, nullptr, // VARIANT_UPX2

# else
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
Expand All @@ -279,7 +283,7 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
# endif

# ifndef XMRIG_NO_SUMO
Expand Down Expand Up @@ -308,6 +312,7 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, // VARIANT_RWZ
nullptr, nullptr, // VARIANT_ZLS
nullptr, nullptr, // VARIANT_DOUBLE
nullptr, nullptr, // VARIANT_UPX2
# else
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
Expand All @@ -317,7 +322,7 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
# endif
# ifndef XMRIG_NO_CN_PICO
nullptr, nullptr, // VARIANT_0
Expand All @@ -344,6 +349,7 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, // VARIANT_RWZ
nullptr, nullptr, // VARIANT_ZLS
nullptr, nullptr, // VARIANT_DOUBLE
nullptr, nullptr, // VARIANT_UPX2
#else
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
Expand All @@ -353,7 +359,39 @@ CryptoNight::cn_hash_fun CryptoNight::fn(xmrig::Algo algorithm, xmrig::AlgoVerif
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
# endif

# ifndef XMRIG_NO_CN_EXTREMELITE
nullptr, nullptr, // VARIANT_0
nullptr, nullptr, // VARIANT_1
nullptr, nullptr, // VARIANT_TUBE
nullptr, nullptr, // VARIANT_XTL
nullptr, nullptr, // VARIANT_MSR
nullptr, nullptr, // VARIANT_XHV
nullptr, nullptr, // VARIANT_XAO
nullptr, nullptr, // VARIANT_RTO
nullptr, nullptr, // VARIANT_2
nullptr, nullptr, // VARIANT_HALF
nullptr, nullptr, // VARIANT_TRTL
nullptr, nullptr, // VARIANT_GPU
nullptr, nullptr, // VARIANT_WOW
nullptr, nullptr, // VARIANT_4
nullptr, nullptr, // VARIANT_RWZ
nullptr, nullptr, // VARIANT_ZLS
nullptr, nullptr, // VARIANT_DOUBLE
cryptonight_single_hash<CRYPTONIGHT_EXTREMELITE, false, VARIANT_UPX2>,
cryptonight_single_hash<CRYPTONIGHT_EXTREMELITE, true, VARIANT_UPX2>,
#else
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
nullptr, nullptr, nullptr, nullptr,
# endif
};

Expand Down Expand Up @@ -426,6 +464,12 @@ bool CryptoNight::selfTest() {
}
# endif

# ifndef XMRIG_NO_CN_EXTREMELITE
if (m_algorithm == xmrig::CRYPTONIGHT_EXTREMELITE) {
return verify(VARIANT_UPX2, test_output_upx2);
}
# endif

return false;
}

Expand Down
8 changes: 4 additions & 4 deletions src/crypto/CryptoNight_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ static inline void cryptonight_monero_tweak(const uint8_t* l, uint64_t idx, __m1
uint64_t* mem_out = (uint64_t*)&l[idx];

if (BASE == xmrig::VARIANT_2) {
VARIANT2_SHUFFLE(l, idx, ax0, bx0, bx1, cx, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE(l, idx, ax0, bx0, bx1, cx, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
_mm_store_si128((__m128i *)mem_out, _mm_xor_si128(bx0, cx));
} else {
__m128i tmp = _mm_xor_si128(bx0, cx);
Expand Down Expand Up @@ -532,7 +532,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l0, idx0 & MASK, ax0, bx0, bx1, cx, 0);
} else {
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx0, bx1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx0, bx1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down Expand Up @@ -711,7 +711,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l0, idx0 & MASK, ax0, bx00, bx01, cx0, 0);
} else {
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx00, bx01, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx00, bx01, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down Expand Up @@ -769,7 +769,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l1, idx1 & MASK, ax1, bx10, bx11, cx1, 0);
} else {
VARIANT2_SHUFFLE2(l1, idx1 & MASK, ax1, bx10, bx11, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l1, idx1 & MASK, ax1, bx10, bx11, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down
21 changes: 17 additions & 4 deletions src/crypto/CryptoNight_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ constexpr const uint32_t CRYPTONIGHT_XAO_ITER = 0x100000;
constexpr const uint32_t CRYPTONIGHT_DOUBLE_ITER = 0x100000;
constexpr const uint32_t CRYPTONIGHT_WALTZ_ITER = 0x60000;
constexpr const uint32_t CRYPTONIGHT_ZLS_ITER = 0x60000;
constexpr const uint32_t CRYPTONIGHT_UPX2_ITER = 0x4000;

constexpr const uint32_t CRYPTONIGHT_GPU_ITER = 0xC000;
constexpr const uint32_t CRYPTONIGHT_GPU_MASK = 0x1FFFC0;
Expand All @@ -62,13 +63,16 @@ constexpr const uint32_t CRYPTONIGHT_PICO_MASK = 0x1FFF0;
constexpr const uint32_t CRYPTONIGHT_PICO_ITER = 0x40000;
constexpr const uint32_t CRYPTONIGHT_TRTL_ITER = 0x10000;

constexpr const size_t CRYPTONIGHT_EXTREMELITE_MEMORY = 128 * 1024;
constexpr const uint32_t CRYPTONIGHT_EXTREMELITE_MASK = 0x1FFF0;


template<Algo ALGO> inline constexpr size_t cn_select_memory() { return 0; }
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT>() { return CRYPTONIGHT_MEMORY; }
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_LITE>() { return CRYPTONIGHT_LITE_MEMORY; }
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_HEAVY>() { return CRYPTONIGHT_HEAVY_MEMORY; }
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_PICO>() { return CRYPTONIGHT_PICO_MEMORY; }

template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_EXTREMELITE>() { return CRYPTONIGHT_EXTREMELITE_MEMORY; }

inline size_t cn_select_memory(Algo algorithm)
{
Expand All @@ -86,6 +90,9 @@ inline size_t cn_select_memory(Algo algorithm)
case CRYPTONIGHT_PICO:
return CRYPTONIGHT_PICO_MEMORY;

case CRYPTONIGHT_EXTREMELITE:
return CRYPTONIGHT_EXTREMELITE_MEMORY;

default:
break;
}
Expand All @@ -99,7 +106,7 @@ template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT>() { retur
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_LITE>() { return CRYPTONIGHT_LITE_MASK; }
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_HEAVY>() { return CRYPTONIGHT_HEAVY_MASK; }
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_PICO>() { return CRYPTONIGHT_PICO_MASK; }

template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_EXTREMELITE>() { return CRYPTONIGHT_EXTREMELITE_MASK; }

inline uint32_t cn_select_mask(Algo algorithm)
{
Expand All @@ -117,6 +124,9 @@ inline uint32_t cn_select_mask(Algo algorithm)
case CRYPTONIGHT_PICO:
return CRYPTONIGHT_PICO_MASK;

case CRYPTONIGHT_EXTREMELITE:
return CRYPTONIGHT_EXTREMELITE_MASK;

default:
break;
}
Expand Down Expand Up @@ -146,7 +156,7 @@ template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_HEAVY, VARIANT_0
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_HEAVY, VARIANT_XHV>() { return CRYPTONIGHT_HEAVY_ITER; }
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_HEAVY, VARIANT_TUBE>() { return CRYPTONIGHT_HEAVY_ITER; }
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_PICO, VARIANT_TRTL>() { return CRYPTONIGHT_TRTL_ITER; }

template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_EXTREMELITE, VARIANT_UPX2>() { return CRYPTONIGHT_UPX2_ITER; }

inline uint32_t cn_select_iter(Algo algorithm, Variant variant)
{
Expand Down Expand Up @@ -187,6 +197,9 @@ inline uint32_t cn_select_iter(Algo algorithm, Variant variant)
case CRYPTONIGHT_PICO:
return CRYPTONIGHT_TRTL_ITER;

case CRYPTONIGHT_EXTREMELITE:
return CRYPTONIGHT_UPX2_ITER;

default:
break;
}
Expand All @@ -213,7 +226,7 @@ template<> inline constexpr Variant cn_base_variant<VARIANT_4>() { return V
template<> inline constexpr Variant cn_base_variant<VARIANT_RWZ>() { return VARIANT_2; }
template<> inline constexpr Variant cn_base_variant<VARIANT_ZLS>() { return VARIANT_2; }
template<> inline constexpr Variant cn_base_variant<VARIANT_DOUBLE>() { return VARIANT_2; }

template<> inline constexpr Variant cn_base_variant<VARIANT_UPX2>() { return VARIANT_2; }

inline Variant cn_base_variant(Variant variant)
{
Expand Down
10 changes: 10 additions & 0 deletions src/crypto/CryptoNight_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,14 @@ const static uint8_t test_output_gpu[160] = {
#endif


#ifndef XMRIG_NO_CN_EXTREMELITE
// CN-Extremelite/UPX2
const static uint8_t test_output_upx2[64] = {
0xAA, 0xBB, 0xB8, 0xED, 0x14, 0xA8, 0x35, 0xFA, 0x22, 0xCF, 0xB1, 0xB5, 0xDE, 0xA8, 0x72, 0xB0,
0xA1, 0xD6, 0xCB, 0xD8, 0x46, 0xF4, 0x39, 0x1C, 0x0F, 0x01, 0xF3, 0x87, 0x5E, 0x3A, 0x37, 0x61,
0x38, 0x59, 0x15, 0x72, 0xF8, 0x20, 0xD4, 0xDE, 0x25, 0x3C, 0xF5, 0x5A, 0x21, 0x92, 0xB6, 0x22,
0xB0, 0x28, 0x9E, 0x2E, 0x5C, 0x36, 0x16, 0xE6, 0x1E, 0x78, 0x7A, 0x8F, 0xE4, 0x62, 0xEC, 0x5A
};
#endif

#endif /* XMRIG_CRYPTONIGHT_TEST_H */
14 changes: 7 additions & 7 deletions src/crypto/CryptoNight_x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ template<xmrig::Variant VARIANT, xmrig::Variant BASE>
static inline void cryptonight_monero_tweak(uint64_t* mem_out, const uint8_t* l, uint64_t idx, __m128i ax0, __m128i bx0, __m128i bx1, __m128i& cx)
{
if (BASE == xmrig::VARIANT_2) {
VARIANT2_SHUFFLE(l, idx, ax0, bx0, bx1, cx, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE(l, idx, ax0, bx0, bx1, cx, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2? 1 : 0));
_mm_store_si128((__m128i *)mem_out, _mm_xor_si128(bx0, cx));
} else {
__m128i tmp = _mm_xor_si128(bx0, cx);
Expand Down Expand Up @@ -655,7 +655,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l0, idx0 & MASK, ax0, bx0, bx1, cx, 0);
} else {
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx0, bx1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx0, bx1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down Expand Up @@ -855,7 +855,7 @@ inline void cryptonight_single_hash_asm(const uint8_t *__restrict__ input, size_
cn_trtl_mainloop_bulldozer_asm(ctx);
}
}
else if (VARIANT == xmrig::VARIANT_RWZ) {
else if (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2) {
cnv2_rwz_mainloop_asm(ctx);
}
else if (VARIANT == xmrig::VARIANT_ZLS) {
Expand Down Expand Up @@ -918,7 +918,7 @@ inline void cryptonight_double_hash_asm(const uint8_t *__restrict__ input, size_
else if (VARIANT == xmrig::VARIANT_TRTL) {
cn_trtl_double_mainloop_sandybridge_asm(ctx);
}
else if (VARIANT == xmrig::VARIANT_RWZ) {
else if (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2) {
cnv2_rwz_double_mainloop_asm(ctx);
}
else if (VARIANT == xmrig::VARIANT_ZLS) {
Expand Down Expand Up @@ -1043,7 +1043,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l0, idx0 & MASK, ax0, bx00, bx01, cx0, 0);
} else {
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx00, bx01, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l0, idx0 & MASK, ax0, bx00, bx01, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down Expand Up @@ -1099,7 +1099,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) {
VARIANT2_SHUFFLE(l1, idx1 & MASK, ax1, bx10, bx11, cx1, 0);
} else {
VARIANT2_SHUFFLE2(l1, idx1 & MASK, ax1, bx10, bx11, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0));
VARIANT2_SHUFFLE2(l1, idx1 & MASK, ax1, bx10, bx11, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0));
}
}

Expand Down Expand Up @@ -1203,7 +1203,7 @@ inline void cryptonight_double_hash(const uint8_t *__restrict__ input, size_t si
if (VARIANT == xmrig::VARIANT_4) { \
VARIANT2_SHUFFLE(l, idx & MASK, a, b0, b1, c, 0); \
} else { \
VARIANT2_SHUFFLE2(l, idx & MASK, a, b0, b1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ ? 1 : 0)); \
VARIANT2_SHUFFLE2(l, idx & MASK, a, b0, b1, hi, lo, (VARIANT == xmrig::VARIANT_RWZ || VARIANT == xmrig::VARIANT_UPX2 ? 1 : 0)); \
} \
} \
if (VARIANT == xmrig::VARIANT_4) { \
Expand Down
Loading

0 comments on commit e880c0d

Please sign in to comment.