Place function table after the executable.

This commit is contained in:
Skyth
2025-01-15 02:01:59 +03:00
parent 0e8dbe797b
commit 27a541b7a3
5 changed files with 12 additions and 9 deletions

View File

@@ -34,12 +34,12 @@ struct Memory
PPCFunc* FindFunction(uint32_t guest) const noexcept
{
return *reinterpret_cast<PPCFunc**>(base + PPC_FUNC_TABLE_OFFSET + (uint64_t(guest) * 2));
return PPC_LOOKUP_FUNC(base, guest);
}
void InsertFunction(uint32_t guest, PPCFunc* host)
{
*reinterpret_cast<PPCFunc**>(base + PPC_FUNC_TABLE_OFFSET + (uint64_t(guest) * 2)) = host;
PPC_LOOKUP_FUNC(base, guest) = host;
}
};