mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-29 03:24:36 +00:00
SPU LLVM: change patchpoint name generation
Allow 2 or more patchpoint from a single address.
This commit is contained in:
parent
2de3c06781
commit
f30b81f8b0
@ -3230,6 +3230,9 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator
|
|||||||
// Module name
|
// Module name
|
||||||
std::string m_hash;
|
std::string m_hash;
|
||||||
|
|
||||||
|
// Patchpoint unique id
|
||||||
|
u32 m_pp_id = 0;
|
||||||
|
|
||||||
// Current function (chunk)
|
// Current function (chunk)
|
||||||
llvm::Function* m_function;
|
llvm::Function* m_function;
|
||||||
|
|
||||||
@ -3403,7 +3406,7 @@ class spu_llvm_recompiler : public spu_recompiler_base, public cpu_translator
|
|||||||
verify(HERE), m_finfo, !m_finfo->fn || m_function == m_finfo->chunk;
|
verify(HERE), m_finfo, !m_finfo->fn || m_function == m_finfo->chunk;
|
||||||
|
|
||||||
// Register under a unique linkable name
|
// Register under a unique linkable name
|
||||||
const std::string ppname = fmt::format("%s-pp-0x%05x", m_hash, m_pos);
|
const std::string ppname = fmt::format("%s-pp-%u", m_hash, m_pp_id++);
|
||||||
m_engine->addGlobalMapping(ppname, (u64)m_spurt->make_branch_patchpoint());
|
m_engine->addGlobalMapping(ppname, (u64)m_spurt->make_branch_patchpoint());
|
||||||
|
|
||||||
// Create function with not exactly correct type
|
// Create function with not exactly correct type
|
||||||
@ -4219,6 +4222,8 @@ public:
|
|||||||
const u32 start = m_pos;
|
const u32 start = m_pos;
|
||||||
const u32 end = start + m_size;
|
const u32 end = start + m_size;
|
||||||
|
|
||||||
|
m_pp_id = 0;
|
||||||
|
|
||||||
if (g_cfg.core.spu_debug && !add_loc->logged.exchange(1))
|
if (g_cfg.core.spu_debug && !add_loc->logged.exchange(1))
|
||||||
{
|
{
|
||||||
this->dump(func, log);
|
this->dump(func, log);
|
||||||
|
Loading…
Reference in New Issue
Block a user