mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Fix HLE callbacks within context of HLE PPU stack variables
This commit is contained in:
parent
b6fccee6a4
commit
9b050a33e4
@ -170,10 +170,12 @@ namespace ppu_cb_detail
|
||||
{
|
||||
FORCE_INLINE static void call(ppu_thread& CPU, u32 pc, u32 rtoc, T... args)
|
||||
{
|
||||
const u64 old_r1 = CPU.gpr[1];
|
||||
CPU.gpr[1] &= -16; // Ensure 16-byte alignment
|
||||
const bool stack = _bind_func_args<0, 0, 0, T...>(CPU, args...);
|
||||
CPU.gpr[1] -= stack ? FIXED_STACK_FRAME_SIZE : 0x70; // create reserved area
|
||||
CPU.fast_call(pc, rtoc);
|
||||
CPU.gpr[1] += stack ? FIXED_STACK_FRAME_SIZE : 0x70;
|
||||
CPU.gpr[1] = old_r1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user