Merge xmrig v6.18.1 into master
This commit is contained in:
commit
ea561aca4d
31 changed files with 888 additions and 91 deletions
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "crypto/rx/Rx.h"
|
||||
#include "backend/cpu/Cpu.h"
|
||||
#include "backend/cpu/CpuConfig.h"
|
||||
#include "backend/cpu/CpuThreads.h"
|
||||
#include "crypto/rx/RxConfig.h"
|
||||
|
@ -84,6 +85,16 @@ void xmrig::Rx::init(IRxListener *listener)
|
|||
}
|
||||
|
||||
|
||||
#include "crypto/randomx/blake2/blake2.h"
|
||||
#if defined(XMRIG_FEATURE_AVX2)
|
||||
#include "crypto/randomx/blake2/avx2/blake2b.h"
|
||||
#endif
|
||||
|
||||
|
||||
void (*rx_blake2b_compress)(blake2b_state* S, const uint8_t * block) = rx_blake2b_compress_integer;
|
||||
int (*rx_blake2b)(void* out, size_t outlen, const void* in, size_t inlen) = rx_blake2b_default;
|
||||
|
||||
|
||||
template<typename T>
|
||||
bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu)
|
||||
{
|
||||
|
@ -133,6 +144,19 @@ bool xmrig::Rx::init(const T &seed, const RxConfig &config, const CpuConfig &cpu
|
|||
if (!cpu.isHwAES()) {
|
||||
SelectSoftAESImpl(cpu.threads().get(seed.algorithm()).count());
|
||||
}
|
||||
|
||||
# if defined(XMRIG_FEATURE_SSE4_1)
|
||||
if (Cpu::info()->has(ICpuInfo::FLAG_SSE41)) {
|
||||
rx_blake2b_compress = rx_blake2b_compress_sse41;
|
||||
}
|
||||
# endif
|
||||
|
||||
#if defined(XMRIG_FEATURE_AVX2)
|
||||
if (Cpu::info()->has(ICpuInfo::FLAG_AVX2)) {
|
||||
rx_blake2b = blake2b_avx2;
|
||||
}
|
||||
# endif
|
||||
|
||||
osInitialized = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,12 +58,13 @@ static const std::array<const char *, RxConfig::ModeMax> modeNames = { "auto", "
|
|||
|
||||
|
||||
#ifdef XMRIG_FEATURE_MSR
|
||||
constexpr size_t kMsrArraySize = 5;
|
||||
constexpr size_t kMsrArraySize = 6;
|
||||
|
||||
static const std::array<MsrItems, kMsrArraySize> msrPresets = {
|
||||
MsrItems(),
|
||||
MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }},
|
||||
MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401500000ULL }, { 0xC001102b, 0x2000cc14ULL }},
|
||||
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
|
||||
MsrItems{{ 0x1a4, 0xf }},
|
||||
MsrItems()
|
||||
};
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
#include "crypto/rx/RxVm.h"
|
||||
|
||||
|
||||
#if defined(XMRIG_FEATURE_SSE4_1)
|
||||
extern "C" uint32_t rx_blake2b_use_sse41;
|
||||
#endif
|
||||
|
||||
|
||||
randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool softAes, const Assembly &assembly, uint32_t node)
|
||||
{
|
||||
int flags = 0;
|
||||
|
@ -51,10 +46,6 @@ randomx_vm *xmrig::RxVm::create(RxDataset *dataset, uint8_t *scratchpad, bool so
|
|||
flags |= RANDOMX_FLAG_AMD;
|
||||
}
|
||||
|
||||
# if defined(XMRIG_FEATURE_SSE4_1)
|
||||
rx_blake2b_use_sse41 = Cpu::info()->has(ICpuInfo::FLAG_SSE41) ? 1 : 0;
|
||||
# endif
|
||||
|
||||
return randomx_create_vm(static_cast<randomx_flags>(flags), !dataset->get() ? dataset->cache()->get() : nullptr, dataset->get(), scratchpad, node);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue