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

[AArch64] Banish slowmem operations to farcode. #2814

Merged

Conversation

Sonicadvance1
Copy link
Contributor

This improves performance pretty much across the board for games.
The increase in performance is mainly from removing some code from the main JIT blocks of code (pushing and popping millions of registers) and throwing them in farcode where it doesn't pollute the icache.

const u8* trouble_location = nullptr;
const u8* code_base = GetCodePtr();

SlowmemHandler handler;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Aug 8, 2015

I get lots of crashing on this PR.

@Sonicadvance1
Copy link
Contributor Author

What titles were you testing, I couldn't reproduce

@Sonicadvance1
Copy link
Contributor Author

AArch64 is sensitive to block clearing, and AArch64 generates a lot of code in to the farcache which causes it to fill up fairly quickly at the default size.
I've increased the size of the farcode cache since it generates so much more code there.

I'll have to look in to the cache clearing issue, I've noticed it in the past when profiling blocks of code.

This is required to make sure two code spaces are relatively close to one another.
In this case I need the AArch64 JIT codespace and its farcode space to be within 128MB of one another for branches.
This improves performance pretty much across the board for games.
The increase in performance is mainly from removing some code from the main JIT blocks of code (pushing and popping millions of registers) and
throwing them in farcode where it doesn't pollute the icache.
And cleanup all of the old code for sharing and generating this pointers.
@degasus
Copy link
Member

degasus commented Aug 14, 2015

LGTM

@Sonicadvance1
Copy link
Contributor Author

In the middle of benching the changes for now to make sure there wasn't a regression.

Sonicadvance1 added a commit that referenced this pull request Aug 14, 2015
[AArch64] Banish slowmem operations to farcode.
@Sonicadvance1 Sonicadvance1 merged commit 3bc5505 into dolphin-emu:master Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants