mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 05:40:39 -05:00
Refactor Ryzen fix to fix compilation issues
This commit is contained in:
@@ -300,6 +300,10 @@ namespace randomx {
|
||||
code = allocatedCode + (codeOffset.fetch_add(59 * 64) % CodeSize);
|
||||
memcpy(code, codePrologue, prologueSize);
|
||||
memcpy(code + epilogueOffset, codeEpilogue, epilogueSize);
|
||||
# ifdef XMRIG_FIX_RYZEN
|
||||
mainLoopBounds.first = code + prologueSize;
|
||||
mainLoopBounds.second = code + epilogueOffset;
|
||||
# endif
|
||||
}
|
||||
|
||||
JitCompilerX86::~JitCompilerX86() {
|
||||
@@ -386,7 +390,7 @@ namespace randomx {
|
||||
}
|
||||
|
||||
# ifdef XMRIG_FIX_RYZEN
|
||||
xmrig::Rx::setMainLoopBounds(code + prologueSize, code + epilogueOffset);
|
||||
xmrig::Rx::setMainLoopBounds(mainLoopBounds);
|
||||
# endif
|
||||
|
||||
codePos = prologueSize;
|
||||
|
||||
@@ -69,6 +69,9 @@ namespace randomx {
|
||||
int registerUsage[RegistersCount];
|
||||
uint8_t* allocatedCode;
|
||||
uint8_t* code;
|
||||
# ifdef XMRIG_FIX_RYZEN
|
||||
std::pair<const void*, const void*> mainLoopBounds;
|
||||
# endif
|
||||
int32_t codePos;
|
||||
uint32_t vm_flags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user