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: Encode logical immediates at compile-time where possible #9869

Merged
merged 4 commits into from Jul 11, 2021

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jul 6, 2021

Manually encoding and decoding logical immediates is error-prone. Using ORRI2R and friends lets us avoid doing the work manually, but in exchange, there is a runtime performance penalty. It's probably rather small, but still, it would be nice if we could let the compiler do the work at compile-time. And that's exactly what this pull request does, so now I have no excuse for trying to manually write logical immediates anymore.

@JosJuice JosJuice force-pushed the jitarm64-constexpr-isimmlogical branch 3 times, most recently from 0cc347f to 2806c50 Compare July 8, 2021 12:36
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.

I really approach this concept of having a constexpr ImmLogical object. Those immr/imms have confused me so often already...
I've made some comments which came up to my mind. Not clue if they are helpful.

Source/Core/Common/Arm64Emitter.h Outdated Show resolved Hide resolved
Source/Core/Common/Arm64Emitter.h Show resolved Hide resolved
Source/Core/Common/Arm64Emitter.cpp Outdated Show resolved Hide resolved
Source/Core/Common/Arm64Emitter.h Show resolved Hide resolved
Manually encoding and decoding logical immediates is error-prone.
Using ORRI2R and friends lets us avoid doing the work manually,
but in exchange, there is a runtime performance penalty. It's
probably rather small, but still, it would be nice if we could
let the compiler do the work at compile-time. And that's exactly
what this commit does, so now I have no excuse for trying to
manually write logical immediates anymore.
@JosJuice JosJuice force-pushed the jitarm64-constexpr-isimmlogical branch from 2806c50 to 0f3b9a8 Compare July 10, 2021 18:45
@degasus degasus merged commit 88fd9fd into dolphin-emu:master Jul 11, 2021
11 checks passed
@JosJuice JosJuice deleted the jitarm64-constexpr-isimmlogical branch July 11, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants