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: Skip calculating carry flag when not needed #9585

Merged
merged 1 commit into from Apr 6, 2021

Conversation

JosJuice
Copy link
Member

No description provided.

@JosJuice
Copy link
Member Author

JosJuice commented Mar 14, 2021

Actually... I was assuming that this would make these instructions complete faster on some CPUs, but now that I look, I can't find any specific CPUs where they would complete faster. Should we do this anyway?

@degasus
Copy link
Member

degasus commented Mar 18, 2021

Even if this has no effect on the execution units performance, it might have one on the out-of-order decoder. So yes, I think it is good not to write any state which we don't need.

@@ -16,6 +16,15 @@

using namespace Arm64Gen;

#define CARRY_IF_NEEDED(inst_without_carry, inst_with_carry, ...) \
Copy link
Member

Choose a reason for hiding this comment

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

Is this not able to be made into a templated member function of JitArm64?

Copy link
Member Author

@JosJuice JosJuice Mar 22, 2021

Choose a reason for hiding this comment

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

It would be rather annoying, because most of the functions we want to pass as the first two arguments are overloaded, and I'm not aware of any way that a templated function would be able to determine the correct overload without the caller having to explicitly specify the intended overload.

@JMC47 JMC47 merged commit 5222a4b into dolphin-emu:master Apr 6, 2021
10 checks passed
@JosJuice JosJuice deleted the jitarm64-skip-carry branch April 6, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants