mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Fixed fix_import function in Modules.cpp
This commit is contained in:
parent
faeedf1355
commit
77076191c7
1 changed files with 10 additions and 7 deletions
|
@ -177,13 +177,16 @@ void fix_import(Module* module, u32 func, u32 addr)
|
|||
{
|
||||
using namespace PPU_instr;
|
||||
|
||||
vm::write32(addr + 0x0, LIS(11, func >> 16)); /* lis r11, (func_id >> 16) */
|
||||
vm::write32(addr + 0x4, ORI(11, 11, func & 0xffff)); /* ori r11, (func_id & 0xffff) */
|
||||
vm::write32(addr + 0x8, NOP());
|
||||
vm::write32(addr + 0x10, BLR());
|
||||
vm::write32(addr + 0x14, SC(2));
|
||||
vm::write32(addr + 0x18, NOP());
|
||||
vm::write32(addr + 0x20, NOP());
|
||||
vm::ptr<u32>& ptr = (vm::ptr<u32>&)addr;
|
||||
|
||||
*ptr++ = LIS(11, func >> 16);
|
||||
*ptr++ = ORI(11, 11, func & 0xffff);
|
||||
*ptr++ = NOP();
|
||||
++ptr;
|
||||
*ptr++ = SC(2);
|
||||
*ptr++ = BLR();
|
||||
*ptr++ = NOP();
|
||||
*ptr++ = NOP();
|
||||
|
||||
module->Load(func);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue