Partial fix for ARMv7

This commit is contained in:
XMRig 2018-03-24 10:14:21 +07:00
parent 673a1291e1
commit 1011fd4891

View file

@ -27,12 +27,22 @@
// VARIANT ALTERATIONS // VARIANT ALTERATIONS
#define VARIANT1_INIT(part) \ #ifndef XMRIG_ARM
# define VARIANT1_INIT(part) \
uint64_t tweak1_2_##part = 0; \ uint64_t tweak1_2_##part = 0; \
if (VARIANT > 0) { \ if (VARIANT > 0) { \
tweak1_2_##part = (*reinterpret_cast<const uint64_t*>(input + 35 + part * size) ^ \ tweak1_2_##part = (*reinterpret_cast<const uint64_t*>(input + 35 + part * size) ^ \
*(reinterpret_cast<const uint64_t*>(ctx->state##part) + 24)); \ *(reinterpret_cast<const uint64_t*>(ctx->state##part) + 24)); \
} }
#else
# define VARIANT1_INIT(part) \
uint64_t tweak1_2_##part = 0; \
if (VARIANT > 0) { \
volatile const uint64_t a = *reinterpret_cast<const uint64_t*>(input + 35 + part * size); \
volatile const uint64_t b = *(reinterpret_cast<const uint64_t*>(ctx->state##part) + 24); \
tweak1_2_##part = a ^ b; \
}
#endif
#define VARIANT1_1(p) \ #define VARIANT1_1(p) \
if (VARIANT > 0) { \ if (VARIANT > 0) { \