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

Jit: Skip discarded registers when flushing for interpreter fallback #12682

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Apr 1, 2024

Normally, the asserts added in 34b0a6e are only triggered when something actually went wrong in Dolphin. But there is one exception: In FallBackToInterpreter, we flush all registers regardless of whether they're discarded. This is fine as long as none of the discarded registers are inputs to the instruction that the interpreter will run.

To avoid false positive asserts, this change adds a parameter to Flush that controls whether to skip the asserts for discarded registers.

Additionally, an assert for discarded registers is added to Arm64FPRCache::Flush. (Previously JitArm64 asserted for GPRs (and CRs) only, whereas Jit64 asserted both for GPRs and FPRs. I most likely didn't think of FPRs when writing 34b0a6e.)

Normally, the asserts added in 34b0a6e are only triggered when
something actually went wrong in Dolphin. But there is one exception:
In FallBackToInterpreter, we flush all registers regardless of whether
they're discarded. This is fine as long as none of the discarded
registers are inputs to the instruction that the interpreter will run.

To avoid false positive asserts, this change adds a parameter to Flush
that controls whether to skip the asserts for discarded registers.

Additionally, an assert for discarded registers is added to
Arm64FPRCache::Flush. (Previously JitArm64 asserted for GPRs (and CRs)
only, whereas Jit64 asserted both for GPRs and FPRs. I most likely
didn't think of FPRs when writing 34b0a6e.)
Copy link
Member

@dreamsyntax dreamsyntax left a comment

Choose a reason for hiding this comment

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

I tried this with the prior case that was fixed where I would run into discard a lot. Seems fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants