diff options
author | NoodleDoodleNoodleDoodleNoodleDoodleNoo <NoodleDoodleNoodleDoodleNoodleDoodleNoo@users.noreply.github.com> | 2014-06-16 21:13:05 -0700 |
---|---|---|
committer | NoodleDoodleNoodleDoodleNoodleDoodleNoo <NoodleDoodleNoodleDoodleNoodleDoodleNoo@users.noreply.github.com> | 2014-06-16 21:13:05 -0700 |
commit | 156312f64adae4a6bdca7b9fc01fa7b3eb8d2452 (patch) | |
tree | fccbd9a667661fc0e499e7d283c526032c9a2772 /src | |
parent | Update miner.cpp (diff) | |
download | monero-156312f64adae4a6bdca7b9fc01fa7b3eb8d2452.tar.xz |
Update slow-hash.c
1. Added multiplication support in 32-bit mode
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/slow-hash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/crypto/slow-hash.c b/src/crypto/slow-hash.c index cda66af52..46a5b5f30 100644 --- a/src/crypto/slow-hash.c +++ b/src/crypto/slow-hash.c @@ -49,13 +49,20 @@ #define U64(x) ((uint64_t *) (x)) #define R128(x) ((__m128i *) (x)) -#define SWAP(a, b) (((a) -= (b)), ((b) += (a)), ((a) = (b) - (a))) #define state_index(x) (((*((uint64_t *)x) >> 4) & (TOTALBLOCKS - 1)) << 4) #if defined(_MSC_VER) +#if !defined(_WIN64) +#define __mul() lo = mul128(c[0], b[0], &hi); +#else #define __mul() lo = _umul128(c[0], b[0], &hi); +#endif #else +#if defined(__x86_64__) #define __mul() ASM("mulq %3\n\t" : "=d"(hi), "=a"(lo) : "%a" (c[0]), "rm" (b[0]) : "cc"); +#else +#define __mul() lo = mul128(c[0], b[0], &hi); +#endif #endif #define pre_aes() \ |