diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-14 21:39:17 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-04 14:53:59 +0000 |
commit | 54fd97ae3fa1d872376ea7ad388ac6a1ce76cc39 (patch) | |
tree | 174b1726cd0dbc89c3872bee7127dfc767e84c83 /src/crypto | |
parent | db_lmdb: print percentages as percentages, not ratios (diff) | |
download | monero-54fd97ae3fa1d872376ea7ad388ac6a1ce76cc39.tar.xz |
slow-hash: fix CNv2+ on big endian
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/slow-hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index 1fa819b57..647471513 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -136,8 +136,8 @@ static inline int use_v4_jit(void) { \ U64(b)[2] = state.hs.w[8] ^ state.hs.w[10]; \ U64(b)[3] = state.hs.w[9] ^ state.hs.w[11]; \ - division_result = state.hs.w[12]; \ - sqrt_result = state.hs.w[13]; \ + division_result = SWAP64LE(state.hs.w[12]); \ + sqrt_result = SWAP64LE(state.hs.w[13]); \ } while (0) #define VARIANT2_PORTABLE_INIT() \ @@ -210,7 +210,7 @@ static inline int use_v4_jit(void) uint64_t b0[2]; \ memcpy_swap64le(b0, b, 2); \ chunk2[0] = SWAP64LE(chunk1_old[0] + b0[0]); \ - chunk2[1] = SWAP64LE(SWAP64LE(chunk1_old[1]) + b0[1]); \ + chunk2[1] = SWAP64LE(chunk1_old[1] + b0[1]); \ if (variant >= 4) \ { \ uint64_t out_copy[2]; \ |