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

JitArm64: Optimize frsqrte routine #12231

Merged
merged 6 commits into from
Nov 28, 2023

Conversation

JosJuice
Copy link
Member

No description provided.

Instead of combining X2 (the exponent) and X3 (the mantissa) using an
ORR instruction, we can read X1, which already contains both.

This requires us to reconstruct X1 in the denormal path, but that's
an acceptable price.
With this, the normal path is no longer reading the value in X3,
which opens up for the next commit.
Now that the normal path is no longer reading X2 and X3, it doesn't
matter what the denormal path writes to them.
This required a change in the denormal path where, instead of
subtracting 11 before shifting left, we shift left immediately and then
shift right by 11. This shouldn't affect performance.
If we hit the denormal path, the sign and exponent are guaranteed to be
0, which means X1 and X3 have the same value.
@JosJuice JosJuice force-pushed the jitarm64-frsqrte-optimization branch from a91efef to 9cc1df6 Compare November 4, 2023 11:00
@lioncash lioncash merged commit 7e9c19f into dolphin-emu:master Nov 28, 2023
11 checks passed
@JosJuice JosJuice deleted the jitarm64-frsqrte-optimization branch November 28, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants