mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Save the base address in signal calls.
It's not saved in regular calls but it is in signal ones.
This commit is contained in:
parent
a7f60afecb
commit
3c954ea0e4
@ -683,6 +683,7 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
|
||||
auto &stackEntry = currentList->stack[currentList->stackptr++];
|
||||
stackEntry.pc = retval;
|
||||
stackEntry.offsetAddr = gstate_c.offsetAddr;
|
||||
// The base address is NOT saved/restored for a regular call.
|
||||
UpdatePC(currentList->pc, target - 4);
|
||||
currentList->pc = target - 4; // pc will be increased after we return, counteract that
|
||||
}
|
||||
@ -777,6 +778,7 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
|
||||
auto &stackEntry = currentList->stack[currentList->stackptr++];
|
||||
stackEntry.pc = currentList->pc;
|
||||
stackEntry.offsetAddr = gstate_c.offsetAddr;
|
||||
stackEntry.baseAddr = gstate.base;
|
||||
UpdatePC(currentList->pc, target);
|
||||
currentList->pc = target;
|
||||
DEBUG_LOG(G3D, "Signal with Call. signal/end: %04x %04x", signal, enddata);
|
||||
@ -793,6 +795,7 @@ void GPUCommon::ExecuteOp(u32 op, u32 diff) {
|
||||
// TODO: This might save/restore other state...
|
||||
auto &stackEntry = currentList->stack[--currentList->stackptr];
|
||||
gstate_c.offsetAddr = stackEntry.offsetAddr;
|
||||
gstate.base = stackEntry.baseAddr;
|
||||
UpdatePC(currentList->pc, stackEntry.pc);
|
||||
currentList->pc = stackEntry.pc;
|
||||
DEBUG_LOG(G3D, "Signal with Return. signal/end: %04x %04x", signal, enddata);
|
||||
|
@ -113,6 +113,7 @@ struct DisplayListStackEntry
|
||||
{
|
||||
u32 pc;
|
||||
u32 offsetAddr;
|
||||
u32 baseAddr;
|
||||
};
|
||||
|
||||
struct DisplayList
|
||||
|
Loading…
Reference in New Issue
Block a user