Skip to content

Commit

Permalink
xmrig#551 Fixed cn-heavy for ARMv8.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmrig authored and VIP21 committed Jan 21, 2019
1 parent 2d8ce51 commit 6d0b30e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/crypto/CryptoNight_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,10 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
idx0 = al0;

if (ALGO == xmrig::CRYPTONIGHT_HEAVY) {
int64_t n = ((int64_t*)&l0[idx0 & MASK])[0];
int32_t d = ((int32_t*)&l0[idx0 & MASK])[2];
int64_t q = n / (d | 0x5);
const int64x2_t x = vld1q_s64(reinterpret_cast<const int64_t *>(&l0[idx0 & MASK]));
const int64_t n = vgetq_lane_s64(x, 0);
const int32_t d = vgetq_lane_s32(x, 2);
const int64_t q = n / (d | 0x5);

((int64_t*)&l0[idx0 & MASK])[0] = n ^ q;
idx0 = d ^ q;
Expand Down

0 comments on commit 6d0b30e

Please sign in to comment.