1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2025-01-31 20:41:45 +01:00

SPU LLVM: Enable "Giga table" in Mega mode

Was previously only enabled in Giga mode.
Also fill the table with branch patchpoints.
This commit is contained in:
Nekotekina 2019-10-27 00:16:44 +03:00
parent 6fe32887b2
commit 37dbbce194

View File

@ -4637,6 +4637,18 @@ public:
if (found == m_functions.end())
{
if (g_cfg.core.spu_verification)
{
const std::string ppname = fmt::format("%s-chunkpp-0x%05x", m_hash, i);
m_engine->addGlobalMapping(ppname, (u64)m_spurt->make_branch_patchpoint());
const auto ppfunc = llvm::cast<llvm::Function>(m_module->getOrInsertFunction(ppname, m_finfo->chunk->getFunctionType()).getCallee());
ppfunc->setCallingConv(m_finfo->chunk->getCallingConv());
chunks.push_back(ppfunc);
continue;
}
chunks.push_back(m_dispatch);
continue;
}
@ -7843,7 +7855,7 @@ public:
m_ir->SetInsertPoint(fail);
}
if (g_cfg.core.spu_block_size == spu_block_size_type::giga)
if (g_cfg.core.spu_block_size >= spu_block_size_type::mega)
{
// Try to load chunk address from the function table
const auto fail = llvm::BasicBlock::Create(m_context, "", m_function);