mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-04 02:45:12 +00:00
rsx: Optimize RET returning to following CALL
This commit is contained in:
parent
82c5c4d285
commit
eb61ae37ae
@ -701,6 +701,24 @@ namespace rsx
|
||||
return;
|
||||
}
|
||||
|
||||
// Optimize returning to another CALL
|
||||
if ((ctrl->put & ~3) != fifo_ret_addr)
|
||||
{
|
||||
if (u32 addr = iomap_table.get_addr(fifo_ret_addr); addr != umax)
|
||||
{
|
||||
const u32 cmd0 = vm::read32(addr);
|
||||
|
||||
// Check for missing step flags, in case the user is single-stepping in the debugger
|
||||
if ((cmd0 & RSX_METHOD_CALL_CMD_MASK) == RSX_METHOD_CALL_CMD && cpu_flag::dbg_step - state)
|
||||
{
|
||||
fifo_ctrl->set_get(cmd0 & RSX_METHOD_CALL_OFFSET_MASK);
|
||||
last_known_code_start = ctrl->get;
|
||||
fifo_ret_addr += 4;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fifo_ctrl->set_get(std::exchange(fifo_ret_addr, RSX_CALL_STACK_EMPTY));
|
||||
last_known_code_start = ctrl->get;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user