#446 Fixed SIGBUS error on 32 bit ARM CPUs.

This commit is contained in:
XMRig 2018-06-02 04:37:12 +07:00
parent 5d6a622b18
commit d900a6d9dd

View file

@ -38,8 +38,9 @@
# define VARIANT1_INIT(part) \ # define VARIANT1_INIT(part) \
uint64_t tweak1_2_##part = 0; \ uint64_t tweak1_2_##part = 0; \
if (VARIANT > 0) { \ if (VARIANT > 0) { \
volatile const uint64_t a = *reinterpret_cast<const uint64_t*>(input + 35 + part * size); \ uint64_t a, b; \
volatile const uint64_t b = *(reinterpret_cast<const uint64_t*>(ctx[part]->state) + 24); \ memcpy(&a, input + 35 + part * size, sizeof a); \
memcpy(&b, ctx[part]->state + 192, sizeof b); \
tweak1_2_##part = a ^ b; \ tweak1_2_##part = a ^ b; \
} }
#endif #endif