mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
LLVM: Add workaround for znver2
This commit is contained in:
parent
8e39c778a1
commit
fcc841eaa1
3 changed files with 16 additions and 2 deletions
|
@ -490,7 +490,7 @@ private:
|
|||
};
|
||||
|
||||
Segment m_curr;
|
||||
std::vector<Segment> m_segs;
|
||||
std::vector<Segment> m_segs;
|
||||
};
|
||||
|
||||
// Memory manager mutex
|
||||
|
@ -581,7 +581,7 @@ struct MemoryManager : llvm::RTDyldMemoryManager
|
|||
if (m_tramps)
|
||||
{
|
||||
const s64 tramps_diff = u64(m_tramps) - code_start;
|
||||
if (tramps_diff < INT_MIN || tramps_diff > INT_MAX)
|
||||
if (tramps_diff < INT_MIN || tramps_diff > INT_MAX)
|
||||
m_tramps = nullptr; //previously allocated trampoline section too far away now
|
||||
}
|
||||
|
||||
|
@ -965,6 +965,12 @@ std::string jit_compiler::cpu(const std::string& _cpu)
|
|||
m_cpu = "skylake";
|
||||
}
|
||||
}
|
||||
|
||||
if (m_cpu == "znver1" && utils::has_clwb())
|
||||
{
|
||||
// Upgrade
|
||||
m_cpu = "znver2";
|
||||
}
|
||||
}
|
||||
|
||||
return m_cpu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue