mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GPU: Fix alignment on signal jump/call.
It shouldn't be possible to make the pc unaligned, and this may have been causing it previously.
This commit is contained in:
parent
d6506b3d59
commit
b035be6367
1 changed files with 2 additions and 2 deletions
|
@ -1320,7 +1320,7 @@ void GPUCommon::Execute_End(u32 op, u32 diff) {
|
|||
trigger = false;
|
||||
currentList->signal = behaviour;
|
||||
// pc will be increased after we return, counteract that.
|
||||
u32 target = ((signal << 16) | enddata) - 4;
|
||||
u32 target = (((signal << 16) | enddata) & 0xFFFFFFFC) - 4;
|
||||
if (!Memory::IsValidAddress(target)) {
|
||||
ERROR_LOG_REPORT(G3D, "Signal with Jump: bad address. signal/end: %04x %04x", signal, enddata);
|
||||
} else {
|
||||
|
@ -1335,7 +1335,7 @@ void GPUCommon::Execute_End(u32 op, u32 diff) {
|
|||
trigger = false;
|
||||
currentList->signal = behaviour;
|
||||
// pc will be increased after we return, counteract that.
|
||||
u32 target = ((signal << 16) | enddata) - 4;
|
||||
u32 target = (((signal << 16) | enddata) & 0xFFFFFFFC) - 4;
|
||||
if (currentList->stackptr == ARRAY_SIZE(currentList->stack)) {
|
||||
ERROR_LOG_REPORT(G3D, "Signal with Call: stack full. signal/end: %04x %04x", signal, enddata);
|
||||
} else if (!Memory::IsValidAddress(target)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue