mirror of
https://github.com/wownero/RandomX.git
synced 2026-10-18 07:51:38 +02:00
4 scratchpad segments
This commit is contained in:
@@ -33,7 +33,7 @@ namespace RandomX {
|
||||
mem.ds = ds;
|
||||
}
|
||||
|
||||
void CompiledVirtualMachine::initializeScratchpad(uint32_t index) {
|
||||
void CompiledVirtualMachine::initializeScratchpad(uint8_t* scratchpad, int32_t index) {
|
||||
memcpy(scratchpad, mem.ds.dataset + ScratchpadSize * index, ScratchpadSize);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ namespace RandomX {
|
||||
for (unsigned i = 0; i < sizeof(reg) / sizeof(Pcg32::result_type); ++i) {
|
||||
*(((uint32_t*)®) + i) = gen();
|
||||
}
|
||||
FPINIT();
|
||||
for (int i = 0; i < RegistersCount; ++i) {
|
||||
reg.f[i].lo.f64 = (double)reg.f[i].lo.i64;
|
||||
reg.f[i].hi.f64 = (double)reg.f[i].hi.i64;
|
||||
}
|
||||
compiler.generateProgram(gen);
|
||||
mem.ma = (gen() ^ *(((uint32_t*)seed) + 4)) & ~7;
|
||||
mem.mx = *(((uint32_t*)seed) + 5);
|
||||
|
||||
Reference in New Issue
Block a user