-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
[DYNAREC] Fix x87cache issues #1025
Conversation
Co-authored-by [email protected]
@ptitSeb Seems working, but I can't test real programs right now. |
Looks ok. I would have created new macro for PUSH/PUSHEMPTY/POP for easier changes, but this one works too. I can wait if you can test a bit later. |
Are you able to test it for arm64? Like running some games (UT2004 maybe?) or WOW64 apps that use x87, I want to make sure it doesn't break things that are already working. I'll do some tests for rv64 later today.
Yeah, this looks better, but we'll only need to create new macros for PUSH/PUSHEMPTY, POP empty is harder to detect as we assume the x87cache is empty at the entry of a block IIUC. |
Pop empty is the same: you need to test if the stack is -8 (because it can be negative, if you start a block and just pop po pop...) |
@@ -974,6 +974,16 @@ void x87_do_pop(dynarec_arm_t* dyn, int ninst, int s1) | |||
} | |||
} | |||
|
|||
int x87_cachecount(dynarec_arm_t* dyn, int ninst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, we already have dyn->n.stack
for this, so this function is unnecessary then...
Ok, I've tested some games on rv64, seems all good ;) |
Ok, I'll push then. |
Reported by @fan-wenjie