mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12: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);
|
cmd_pop(), lv2_obj::sleep(*this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ppu_cmd::reset_stack:
|
||||||
|
{
|
||||||
|
cmd_pop(), gpr[1] = ::align(stack_addr + stack_size, 0x200) - 0x200;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
fmt::throw_exception("Unknown ppu_cmd(0x%x)" HERE, (u32)type);
|
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)
|
hle_call, // Execute function by index (arg)
|
||||||
initialize, // ppu_initialize()
|
initialize, // ppu_initialize()
|
||||||
sleep,
|
sleep,
|
||||||
|
reset_stack, // resets stack address
|
||||||
};
|
};
|
||||||
|
|
||||||
// Formatting helper
|
// Formatting helper
|
||||||
|
|
|
@ -16,6 +16,7 @@ void lv2_int_serv::exec()
|
||||||
{
|
{
|
||||||
thread->cmd_list
|
thread->cmd_list
|
||||||
({
|
({
|
||||||
|
{ ppu_cmd::reset_stack, 0 },
|
||||||
{ ppu_cmd::set_args, 2 }, arg1, arg2,
|
{ ppu_cmd::set_args, 2 }, arg1, arg2,
|
||||||
{ ppu_cmd::lle_call, 2 },
|
{ ppu_cmd::lle_call, 2 },
|
||||||
{ ppu_cmd::sleep, 0 }
|
{ ppu_cmd::sleep, 0 }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue