mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-12 09:37:35 +00:00
Update jit_compiler_a64.cpp
This commit is contained in:
parent
db03573804
commit
346892e170
1 changed files with 14 additions and 9 deletions
|
@ -108,7 +108,6 @@ JitCompilerA64::JitCompilerA64(bool hugePagesEnable, bool) :
|
|||
hugePages(hugePagesJIT && hugePagesEnable),
|
||||
literalPos(ImulRcpLiteralsEnd)
|
||||
{
|
||||
allocate(CodeSize);
|
||||
}
|
||||
|
||||
JitCompilerA64::~JitCompilerA64()
|
||||
|
@ -118,8 +117,13 @@ JitCompilerA64::~JitCompilerA64()
|
|||
|
||||
void JitCompilerA64::generateProgram(Program& program, ProgramConfiguration& config, uint32_t)
|
||||
{
|
||||
if (!allocatedSize) {
|
||||
allocate(CodeSize);
|
||||
}
|
||||
#ifdef XMRIG_SECURE_JIT
|
||||
enableWriting();
|
||||
else {
|
||||
enableWriting();
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t codePos = MainLoopBegin + 4;
|
||||
|
@ -173,8 +177,13 @@ void JitCompilerA64::generateProgram(Program& program, ProgramConfiguration& con
|
|||
|
||||
void JitCompilerA64::generateProgramLight(Program& program, ProgramConfiguration& config, uint32_t datasetOffset)
|
||||
{
|
||||
if (!allocatedSize) {
|
||||
allocate(CodeSize);
|
||||
}
|
||||
#ifdef XMRIG_SECURE_JIT
|
||||
enableWriting();
|
||||
else {
|
||||
enableWriting();
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t codePos = MainLoopBegin + 4;
|
||||
|
@ -235,12 +244,8 @@ void JitCompilerA64::generateProgramLight(Program& program, ProgramConfiguration
|
|||
template<size_t N>
|
||||
void JitCompilerA64::generateSuperscalarHash(SuperscalarProgram(&programs)[N])
|
||||
{
|
||||
const size_t requiredSize = CodeSize + CalcDatasetItemSize();
|
||||
if (allocatedSize < requiredSize) {
|
||||
if (allocatedSize) {
|
||||
freePagedMemory(code, allocatedSize);
|
||||
}
|
||||
allocate(requiredSize);
|
||||
if (!allocatedSize) {
|
||||
allocate(CodeSize + CalcDatasetItemSize());
|
||||
}
|
||||
#ifdef XMRIG_SECURE_JIT
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue