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: Merge ps_mulsX, ps_maddXX, and parts of fp_arith #11147

Merged
merged 2 commits into from Oct 22, 2022

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Oct 9, 2022

Some refactorization to get rid of duplicated code. Preparation for implementing AccurateNaNs in JitArm64.

@Rumi-Larry
Copy link

I read in the progress report that the ARM JIT had already reached feature parity.

@JosJuice
Copy link
Member Author

JosJuice commented Oct 9, 2022

The progress report did say that, but with the following qualifier: "This means that every PowerPC instruction that the x86-64 JIT supports along with every major JIT feature are now supported in the AArch64 JIT!" That does not mean every feature. Jit64 has some minor features that JitArm64 lacks, and vice versa too.

To be more specific regarding AccurateNaNs: There's only one game that needs that setting, and for a good while, that game was working properly in JitArm64 without doing anything special, simply because AArch64's default NaN is the same as PowerPC's default NaN (unlike x64). However, when I made some accuracy improvements to how JitArm64 handles FMA rounding, I added a host instruction that flips the sign bit of the output of certain PowerPC FMA instructions, and that host instruction flips the sign bit of NaNs as well, meaning that for the affected PowerPC instructions, the default NaN effectively has the wrong value for the sign bit from the perspective of the guest software. I was planning on explaining this in the follow-up PR that actually adds support for AccurateNaNs to JitArm64 rather than in this refactorization PR.

Copy link
Member

@degasus degasus left a comment

Choose a reason for hiding this comment

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

looks good. However hard to track if nothing was missed, so better to merge after the next beta release.

They have a lot of shared code, most notably the code for rounding c.

No behavior change.
This lets us simplify fp_arith without making ps_arith much more
complicated.

No behavior change.
@JMC47 JMC47 merged commit 5b69c67 into dolphin-emu:master Oct 22, 2022
11 checks passed
@JosJuice JosJuice deleted the jitarm64-arith-org branch October 22, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants