mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
ARMv7: CMP_IMM, SUB_IMM, null HLE function
This commit is contained in:
parent
1749b95b57
commit
7172154da7
5 changed files with 164 additions and 18 deletions
|
@ -556,10 +556,13 @@ bool ELF32Loader::LoadShdrData(u64 offset)
|
|||
|
||||
if (auto func = get_psv_func_by_nid(nid))
|
||||
{
|
||||
func->module->Notice("Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
if (func->module)
|
||||
func->module->Notice("Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
else
|
||||
LOG_NOTICE(LOADER, "Imported function %s (nid=0x%08x, addr=0x%x)", func->name, nid, addr);
|
||||
|
||||
// writing Thumb code (temporarily, because it should be ARM)
|
||||
vm::psv::write16(addr + 0, 0xf870); // HACK (special instruction that calls HLE function
|
||||
vm::psv::write16(addr + 0, 0xf870); // HACK (special instruction that calls HLE function)
|
||||
vm::psv::write16(addr + 2, (u16)get_psv_func_index(func));
|
||||
vm::psv::write16(addr + 4, 0x4770); // BX LR
|
||||
vm::psv::write16(addr + 6, 0); // null
|
||||
|
@ -568,9 +571,8 @@ bool ELF32Loader::LoadShdrData(u64 offset)
|
|||
{
|
||||
LOG_ERROR(LOADER, "Unimplemented function 0x%08x (addr=0x%x)", nid, addr);
|
||||
|
||||
// writing Thumb code (temporarily - it shouldn't be written in this case)
|
||||
vm::psv::write16(addr + 0, 0xf06f); // MVN r0,#0x0
|
||||
vm::psv::write16(addr + 2, 0x0000);
|
||||
vm::psv::write16(addr + 0, 0xf870); // HACK (special instruction that calls HLE function)
|
||||
vm::psv::write16(addr + 2, 0x0000); // (zero index)
|
||||
vm::psv::write16(addr + 4, 0x4770); // BX LR
|
||||
vm::psv::write16(addr + 6, 0); // null
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue