mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-17 00:07:44 +00:00
Remove conflicting declaration for _mulx_u64.
This commit is contained in:
parent
b35ecef06f
commit
e71e9486c6
5 changed files with 13 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
||||||
# v0.6.0
|
# v0.6.0
|
||||||
- Added automatic cryptonight self test.
|
- Added automatic cryptonight self test.
|
||||||
- Added support for software AES `--av=4`. Will be automatically selected if cpu not support AES-NI.
|
- New software AES algorithm variation `--av=4`. Will be automatically selected if cpu not support AES-NI.
|
||||||
- Added 32 bit builds.
|
- Added 32 bit builds.
|
||||||
- Documented [algorithm variations](https://github.com/xmrig/xmrig#algorithm-variations).
|
- Documented [algorithm variations](https://github.com/xmrig/xmrig#algorithm-variations).
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ Based on cpuminer-multi with heavy optimizations/rewrites and removing a lot of
|
||||||
* [Donations](#Donations)
|
* [Donations](#Donations)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
* High performance, faster than others (290+ H/s on i7 6700).
|
* High performance (290+ H/s on i7 6700).
|
||||||
* Official Windows support.
|
* Official Windows support.
|
||||||
* Small Windows executable, only 350 KB without dependencies.
|
* Small Windows executable, only 430 KB without dependencies.
|
||||||
* Support for backup (failover) mining server.
|
* Support for backup (failover) mining server.
|
||||||
* keepalived support.
|
* keepalived support.
|
||||||
* Command line options compatible with cpuminer.
|
* Command line options compatible with cpuminer.
|
||||||
|
|
|
@ -30,16 +30,6 @@
|
||||||
#include "crypto/c_keccak.h"
|
#include "crypto/c_keccak.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef __BMI2__
|
|
||||||
static inline uint64_t _mulx_u64(uint64_t a, uint64_t b, uint64_t* hi)
|
|
||||||
{
|
|
||||||
unsigned __int128 r = (unsigned __int128) a * (unsigned __int128) b;
|
|
||||||
*hi = r >> 64;
|
|
||||||
return (uint64_t) r;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void cryptonight_av1_aesni(const void *restrict input, size_t size, void *restrict output, struct cryptonight_ctx *restrict ctx)
|
void cryptonight_av1_aesni(const void *restrict input, size_t size, void *restrict output, struct cryptonight_ctx *restrict ctx)
|
||||||
{
|
{
|
||||||
keccak((const uint8_t *) input, size, ctx->state, 200);
|
keccak((const uint8_t *) input, size, ctx->state, 200);
|
||||||
|
@ -67,7 +57,7 @@ void cryptonight_av1_aesni(const void *restrict input, size_t size, void *restri
|
||||||
uint64_t hi, lo, cl, ch;
|
uint64_t hi, lo, cl, ch;
|
||||||
cl = ((uint64_t*) &l0[idx0 & 0x1FFFF0])[0];
|
cl = ((uint64_t*) &l0[idx0 & 0x1FFFF0])[0];
|
||||||
ch = ((uint64_t*) &l0[idx0 & 0x1FFFF0])[1];
|
ch = ((uint64_t*) &l0[idx0 & 0x1FFFF0])[1];
|
||||||
lo = _mulx_u64(idx0, cl, &hi);
|
lo = _umul128(idx0, cl, &hi);
|
||||||
|
|
||||||
al0 += hi;
|
al0 += hi;
|
||||||
ah0 += lo;
|
ah0 += lo;
|
||||||
|
|
|
@ -30,16 +30,6 @@
|
||||||
#include "crypto/c_keccak.h"
|
#include "crypto/c_keccak.h"
|
||||||
|
|
||||||
|
|
||||||
#ifndef __BMI2__
|
|
||||||
static inline uint64_t _mulx_u64(uint64_t a, uint64_t b, uint64_t* hi)
|
|
||||||
{
|
|
||||||
unsigned __int128 r = (unsigned __int128) a * (unsigned __int128) b;
|
|
||||||
*hi = r >> 64;
|
|
||||||
return (uint64_t) r;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void cryptonight_av2_aesni_stak(const void *restrict input, size_t size, void *restrict output, struct cryptonight_ctx *restrict ctx)
|
void cryptonight_av2_aesni_stak(const void *restrict input, size_t size, void *restrict output, struct cryptonight_ctx *restrict ctx)
|
||||||
{
|
{
|
||||||
keccak((const uint8_t *) input, size, ctx->state, 200);
|
keccak((const uint8_t *) input, size, ctx->state, 200);
|
||||||
|
@ -64,12 +54,10 @@ void cryptonight_av2_aesni_stak(const void *restrict input, size_t size, void *r
|
||||||
idx0 = _mm_cvtsi128_si64(cx);
|
idx0 = _mm_cvtsi128_si64(cx);
|
||||||
bx0 = cx;
|
bx0 = cx;
|
||||||
|
|
||||||
_mm_prefetch((const char*)&l0[idx0 & 0x1FFFF0], _MM_HINT_T0);
|
|
||||||
|
|
||||||
uint64_t hi, lo, cl, ch;
|
uint64_t hi, lo, cl, ch;
|
||||||
cl = ((uint64_t*)&l0[idx0 & 0x1FFFF0])[0];
|
cl = ((uint64_t*)&l0[idx0 & 0x1FFFF0])[0];
|
||||||
ch = ((uint64_t*)&l0[idx0 & 0x1FFFF0])[1];
|
ch = ((uint64_t*)&l0[idx0 & 0x1FFFF0])[1];
|
||||||
lo = _mulx_u64(idx0, cl, &hi);
|
lo = _umul128(idx0, cl, &hi);
|
||||||
|
|
||||||
al0 += hi;
|
al0 += hi;
|
||||||
ah0 += lo;
|
ah0 += lo;
|
||||||
|
@ -80,8 +68,6 @@ void cryptonight_av2_aesni_stak(const void *restrict input, size_t size, void *r
|
||||||
ah0 ^= ch;
|
ah0 ^= ch;
|
||||||
al0 ^= cl;
|
al0 ^= cl;
|
||||||
idx0 = al0;
|
idx0 = al0;
|
||||||
|
|
||||||
_mm_prefetch((const char*)&l0[idx0 & 0x1FFFF0], _MM_HINT_T0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cn_implode_scratchpad((__m128i*) ctx->memory, (__m128i*) ctx->state);
|
cn_implode_scratchpad((__m128i*) ctx->memory, (__m128i*) ctx->state);
|
||||||
|
|
|
@ -212,4 +212,12 @@ inline void cn_implode_scratchpad(const __m128i* input, __m128i* output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline uint64_t _umul128(uint64_t a, uint64_t b, uint64_t* hi)
|
||||||
|
{
|
||||||
|
unsigned __int128 r = (unsigned __int128) a * (unsigned __int128) b;
|
||||||
|
*hi = r >> 64;
|
||||||
|
return (uint64_t) r;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* __CRYPTONIGHT_P_H__ */
|
#endif /* __CRYPTONIGHT_P_H__ */
|
||||||
|
|
Loading…
Reference in a new issue