Skip to content
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

Implement SIDT/LSL #4377

Merged
merged 4 commits into from
Mar 5, 2025
Merged

Implement SIDT/LSL #4377

merged 4 commits into from
Mar 5, 2025

Conversation

bylaws
Copy link
Collaborator

@bylaws bylaws commented Feb 27, 2025

These are used by recent Denuvo. LSL behaviour doesn't match Windows or Linux exactly but I don't see this mattering, and the Windows behaviour is to encode the cpu index in the segment size anyway so exposing e.g. a way for the frontend to set sizes wouldn't cut it.
Unsure what to do about tests for these since they're not deterministic across different OSs.

Emulate by always returning failure, this deviates from both Linux
and Windows but shouldn't be depended on by anything.
@Sonicadvance1
Copy link
Member

Looks like some unit tests are failing. Probably describing instructions too broadly or something.

@bylaws
Copy link
Collaborator Author

bylaws commented Feb 28, 2025

Don't entirely trust the decoder changes but test pasts so I think good?

Copy link
Member

@Sonicadvance1 Sonicadvance1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, yea. Looked over how these tables are encoded again and I see that group 7 is a little weird which you uncovered. So yes, for group 7 decoding specifically, when modrm.mod = 11b it chooses the SecondaryModRMExtensionOpTable table, when it is anything else it'll choose the SecondaryExtensionOpTable table.

We could probably encode the tables slightly differently but that's a fairly significant refactor. This works just as well.

@Sonicadvance1 Sonicadvance1 merged commit 81434cd into FEX-Emu:main Mar 5, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants