-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vfpu branch in delay slot #1926
Comments
Wow that's some scary code, I wonder what possessed them to write that... I would also guess that inserting nops (ignoring the delay slots) is likely the way to go here, but yes, should definitely test. |
So far only that game: But also: Here's another scary one (but maybe just a test since it doesn't have a game id): -[Unknown] |
Armjit crashes when this happens (infinite loop.) Affects at least Zettai Hero Project and Disgaea 2 (#1679.) -[Unknown] |
Otherwise we loop infinitely. Workaround for hrydgard#1926. Should fix hrydgard#1679.
Based on tests on a PSP, all branches are attempted. The behavior is technically undefined. It seems to take the delay slot's target if they differ and both pass. This is the behavior the interpreter has, but it's more work in jit. Since only a couple games seem to do this, and clearly expect this behavior, this fixes all known cases of hrydgard#1926.
I found a game (Disgaea 2) that does some vfpu stuff and then:
We should probably test this. I did a quick search and there's a comment in JPCSP's code that says they insert a nop in between. But I wonder what order it actually executes in, if they are different addresses... or if they have to be the same or something.
-[Unknown]
The text was updated successfully, but these errors were encountered: