1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-04-17 21:12:58 -04:00

RandomX v2 + commitments

This commit is contained in:
SChernykh
2026-01-30 00:34:42 +01:00
parent 5a80c65d31
commit 9d71358f46
26 changed files with 6532 additions and 6068 deletions

View File

@@ -77,10 +77,13 @@ namespace randomx {
executeBytecode(bytecode, scratchpad, config);
mem.mx ^= nreg.r[config.readReg2] ^ nreg.r[config.readReg3];
mem.mx &= CacheLineAlignMask;
datasetPrefetch(datasetOffset + mem.mx);
datasetRead(datasetOffset + mem.ma, nreg.r);
const uint64_t readPtr = datasetOffset + (mem.ma & CacheLineAlignMask);
auto& mp = RandomX_CurrentConfig.Tweak_V2_PREFETCH ? mem.ma : mem.mx;
mp ^= nreg.r[config.readReg2] ^ nreg.r[config.readReg3];
datasetPrefetch(datasetOffset + (mp & CacheLineAlignMask));
datasetRead(readPtr, nreg.r);
std::swap(mem.mx, mem.ma);
for (unsigned i = 0; i < RegistersCount; ++i)