Fixed crashes on ARM

This commit is contained in:
SChernykh 2021-02-01 17:07:45 +01:00
parent 8faef28e7d
commit 4108428872
2 changed files with 4 additions and 4 deletions

View file

@ -171,7 +171,7 @@ void JitCompilerA64::generateProgram(Program& program, ProgramConfiguration& con
emit32(ARMV8A::EOR | 10 | (IntRegMap[config.readReg0] << 5) | (IntRegMap[config.readReg1] << 16), code, codePos); emit32(ARMV8A::EOR | 10 | (IntRegMap[config.readReg0] << 5) | (IntRegMap[config.readReg1] << 16), code, codePos);
# ifndef XMRIG_OS_APPLE # ifndef XMRIG_OS_APPLE
xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + MainLoopBegin), reinterpret_cast<char*>(code + codePos)); xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + MainLoopBegin), codePos - MainLoopBegin);
# endif # endif
} }
@ -237,7 +237,7 @@ void JitCompilerA64::generateProgramLight(Program& program, ProgramConfiguration
emit32(ARMV8A::ADD_IMM_HI | 2 | (2 << 5) | (imm_hi << 10), code, codePos); emit32(ARMV8A::ADD_IMM_HI | 2 | (2 << 5) | (imm_hi << 10), code, codePos);
# ifndef XMRIG_OS_APPLE # ifndef XMRIG_OS_APPLE
xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + MainLoopBegin), reinterpret_cast<char*>(code + codePos)); xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + MainLoopBegin), codePos - MainLoopBegin);
# endif # endif
} }
@ -364,7 +364,7 @@ void JitCompilerA64::generateSuperscalarHash(SuperscalarProgram(&programs)[N])
codePos += p2 - p1; codePos += p2 - p1;
# ifndef XMRIG_OS_APPLE # ifndef XMRIG_OS_APPLE
xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + CodeSize), reinterpret_cast<char*>(code + codePos)); xmrig::VirtualMemory::flushInstructionCache(reinterpret_cast<char*>(code + CodeSize), codePos - MainLoopBegin);
# endif # endif
} }

View file

@ -113,7 +113,6 @@ private:
Mode readMode(const rapidjson::Value &value) const; Mode readMode(const rapidjson::Value &value) const;
bool m_numa = true;
bool m_oneGbPages = false; bool m_oneGbPages = false;
bool m_rdmsr = true; bool m_rdmsr = true;
int m_threads = -1; int m_threads = -1;
@ -123,6 +122,7 @@ private:
ScratchpadPrefetchMode m_scratchpadPrefetchMode = ScratchpadPrefetchT0; ScratchpadPrefetchMode m_scratchpadPrefetchMode = ScratchpadPrefetchT0;
# ifdef XMRIG_FEATURE_HWLOC # ifdef XMRIG_FEATURE_HWLOC
bool m_numa = true;
std::vector<uint32_t> m_nodeset; std::vector<uint32_t> m_nodeset;
# endif # endif