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

Fix FPRF handling of denormal singles #9811

Merged
merged 4 commits into from Jun 29, 2021

Conversation

JosJuice
Copy link
Member

We were classifying denormal singles as if they were normals (because we converted singles to doubles and then classified them using the same code as for doubles), but this behavior has been confirmed incorrect by dolphin-emu/hwtests#41.

When fixing this, I went with an approach of performing classification on 32-bit floats in all CPU emulation cores (i.e. classification is performed after forcing the result to single but before converting it back to double). It would be possible to perform classification after converting to double, but that would require us to check if the exponent is in a certain range instead of just checking if it is zero, so I think the approach I went with is better.

@JosJuice JosJuice force-pushed the fprf-denormal-singles branch 2 times, most recently from 286fdbb to 08ef45b Compare June 13, 2021 15:02
The interpreter was wrong after all. Hardware verified.
Performance optimization, along with making the code a little
neater. Saves us from performing a single -> double -> single
conversion when calling UpdateFPRFSingle.
@Tilka Tilka merged commit 901a4fb into dolphin-emu:master Jun 29, 2021
11 checks passed
@JosJuice JosJuice deleted the fprf-denormal-singles branch June 29, 2021 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants