mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01: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:
1 parent
d6506b3d59
commit
b035be6367
1 file changed
+2
-2
+2
-2
@@ -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)) {
|
||||
|
||||
Reference in new issue
Block a user