mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
ppu/sys_interrupt: add stack_reset command to fix sys_interrupt stack overflowing
This commit is contained in:
parent
3a9428a88e
commit
7bbadfd08b
3 changed files with 7 additions and 0 deletions
|
@ -575,6 +575,11 @@ void ppu_thread::cpu_task()
|
|||
cmd_pop(), lv2_obj::sleep(*this);
|
||||
break;
|
||||
}
|
||||
case ppu_cmd::reset_stack:
|
||||
{
|
||||
cmd_pop(), gpr[1] = ::align(stack_addr + stack_size, 0x200) - 0x200;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
fmt::throw_exception("Unknown ppu_cmd(0x%x)" HERE, (u32)type);
|
||||
|
|
|
@ -16,6 +16,7 @@ enum class ppu_cmd : u32
|
|||
hle_call, // Execute function by index (arg)
|
||||
initialize, // ppu_initialize()
|
||||
sleep,
|
||||
reset_stack, // resets stack address
|
||||
};
|
||||
|
||||
// Formatting helper
|
||||
|
|
|
@ -16,6 +16,7 @@ void lv2_int_serv::exec()
|
|||
{
|
||||
thread->cmd_list
|
||||
({
|
||||
{ ppu_cmd::reset_stack, 0 },
|
||||
{ ppu_cmd::set_args, 2 }, arg1, arg2,
|
||||
{ ppu_cmd::lle_call, 2 },
|
||||
{ ppu_cmd::sleep, 0 }
|
||||
|
|
Loading…
Add table
Reference in a new issue