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_LoadStore: Optimize dcbx using CSSC instruction #13252

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Sintendo
Copy link
Member

This one goes out to all the folks running Dolphin on Ampere 1B, to my knowledge (and LLVM's) the only currently available CPU architecture that supports this extension. As such, it probably doesn't make much sense to merge this right now.

CSSC detection is currently only implemented for Linux.

Before:

0xb9435fa2   ldr    w2, [x29, #0x35c]
0x528000fa   mov    w26, #0x7                 ; =7
0x1ada0f21   sdiv   w1, w25, w26
0x51000440   sub    w0, w2, #0x1
0x6b00003f   cmp    w1, w0
0x1a803020   csel   w0, w1, w0, lo
0x4b000042   sub    w2, w2, w0
0xb9035fa2   str    w2, [x29, #0x35c]
0x1b1a7c01   mul    w1, w0, w26
0x4b010339   sub    w25, w25, w1

After:

0xb9435fa2   ldr    w2, [x29, #0x35c]
0x528000fa   mov    w26, #0x7                 ; =7
0x1ada0f21   sdiv   w1, w25, w26
0x51000440   sub    w0, w2, #0x1
0x1ac06c20   umin   w0, w1, w0
0x4b000042   sub    w2, w2, w0
0xb9035fa2   str    w2, [x29, #0x35c]
0x1b1a7c01   mul    w1, w0, w26
0x4b010339   sub    w25, w25, w1

@JosJuice
Copy link
Member

Yeah, it's probably best to hold off with this one for a while.

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