mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
ppu_analyse: use entry point
This commit is contained in:
parent
adefd1fd63
commit
d7c66fc949
3 changed files with 10 additions and 4 deletions
|
@ -326,7 +326,7 @@ namespace ppu_patterns
|
|||
};
|
||||
}
|
||||
|
||||
std::vector<ppu_function> ppu_analyse(const std::vector<std::pair<u32, u32>>& segs, const std::vector<std::pair<u32, u32>>& secs, u32 lib_toc)
|
||||
std::vector<ppu_function> ppu_analyse(const std::vector<std::pair<u32, u32>>& segs, const std::vector<std::pair<u32, u32>>& secs, u32 lib_toc, u32 entry)
|
||||
{
|
||||
// Assume first segment is executable
|
||||
const u32 start = segs[0].first;
|
||||
|
@ -467,6 +467,12 @@ std::vector<ppu_function> ppu_analyse(const std::vector<std::pair<u32, u32>>& se
|
|||
}
|
||||
}
|
||||
|
||||
// Register TOC from entry point
|
||||
if (entry && !lib_toc)
|
||||
{
|
||||
lib_toc = vm::read32(entry) ? vm::read32(entry + 4) : vm::read32(entry + 20);
|
||||
}
|
||||
|
||||
// Secondary attempt
|
||||
if (TOCs.empty() && lib_toc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue