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

Add Missing EncodeRegTo64 in JitArm64::dcbx #12540

Merged
merged 1 commit into from Jan 30, 2024

Conversation

mitaclaw
Copy link
Contributor

I from what I can tell, ARM64FloatEmitter::ABI_PushRegisters expects an XReg temporary, not a WReg. Otherwise, it may emit code with incongruent usage of WRegs then XRegs:
WReg
This causes a segmentation fault. While I have never witnessed this happening from the usage in JitArm64::dcbx, it's better in principle to fix it. This error mislead me in my own usage of ARM64FloatEmitter::ABI_PushRegisters. It may be worth adding a runtime assertion in ARM64FloatEmitter::ABI_PushRegisters to enforce this.

ARM64FloatEmitter::ABI_PushRegisters expects an XReg temporary, not a WReg.
@mitaclaw
Copy link
Contributor Author

This bug can be forced to manifest by changing the fprs_to_push BitSet32 to equal ABI_ALL_FPRS. Soft-resetting the emulated software may also be necessary.

@lioncash lioncash merged commit e082881 into dolphin-emu:master Jan 30, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants