mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 14:37:08 +00:00
PPU LLVM: compile instructions from patches
For now, only as a single instruction at a time.
This commit is contained in:
parent
9463238490
commit
9e9a55df46
3 changed files with 16 additions and 24 deletions
|
|
@ -1101,19 +1101,13 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, const std::stri
|
|||
applied += g_fxo->get<patch_engine>()->apply(Emu.GetTitleID() + '-' + hash, vm::g_base_addr);
|
||||
}
|
||||
|
||||
if (!applied.empty())
|
||||
{
|
||||
// TODO (invalidate constraints if patches were applied)
|
||||
end = 0;
|
||||
}
|
||||
|
||||
// Embedded SPU elf patching
|
||||
for (const auto& seg : prx->segs)
|
||||
{
|
||||
ppu_check_patch_spu_images(seg);
|
||||
}
|
||||
|
||||
prx->analyse(toc, 0, end);
|
||||
prx->analyse(toc, 0, end, applied);
|
||||
|
||||
ppu_loader.success("PRX library hash: %s (<- %u)", hash, applied.size());
|
||||
|
||||
|
|
@ -1558,14 +1552,8 @@ bool ppu_load_exec(const ppu_exec_object& elf)
|
|||
_main->name.clear();
|
||||
_main->path = vfs::get(Emu.argv[0]);
|
||||
|
||||
if (!applied.empty())
|
||||
{
|
||||
// TODO (invalidate constraints if patches were applied)
|
||||
end = 0;
|
||||
}
|
||||
|
||||
// Analyse executable (TODO)
|
||||
_main->analyse(0, static_cast<u32>(elf.header.e_entry), end);
|
||||
_main->analyse(0, static_cast<u32>(elf.header.e_entry), end, applied);
|
||||
|
||||
// Validate analyser results (not required)
|
||||
_main->validate(0);
|
||||
|
|
@ -1962,14 +1950,8 @@ std::pair<std::shared_ptr<lv2_overlay>, CellError> ppu_load_overlay(const ppu_ex
|
|||
|
||||
ovlm->entry = static_cast<u32>(elf.header.e_entry);
|
||||
|
||||
if (!applied.empty())
|
||||
{
|
||||
// TODO (invalidate constraints if patches were applied)
|
||||
end = 0;
|
||||
}
|
||||
|
||||
// Analyse executable (TODO)
|
||||
ovlm->analyse(0, ovlm->entry, end);
|
||||
ovlm->analyse(0, ovlm->entry, end, applied);
|
||||
|
||||
// Validate analyser results (not required)
|
||||
ovlm->validate(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue