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

Jit64: Fix the offsetAddedToAddress correction #11441

Merged
merged 1 commit into from Mar 9, 2023

Conversation

JosJuice
Copy link
Member

x86 address displacements are treated as signed, not unsigned.

@JosJuice
Copy link
Member Author

Actually, it doesn't matter. The instruction that comes after the LEA after backpatching will treat the register as 32-bit anyway. (And the LEA we're trying to undo also treated the register as 32-bit, so what this PR is doing isn't any better than what the code was doing before...)

I'm planning to get rid of the offsetAddedToAddress correction in an upcoming PR, so no need to make this kind of refinement to it.

@JosJuice JosJuice closed this Jan 15, 2023
@JosJuice JosJuice reopened this Feb 18, 2023
The LEA that the signal handler is trying to undo the effects of is a
32-bit instruction, and the value in the register prior to the LEA is
also 32-bit, so the signal handler should use a 32-bit write.

(Actually, in the end this doesn't really matter, because the first
instruction that reads this value after backpatching is also a 32-bit
instruction...)
@JosJuice
Copy link
Member Author

I don't think I will get rid of offsetAddedToAddress after all. I've re-opened this PR with an updated version of the commit.

@AdmiralCurtiss AdmiralCurtiss merged commit 1023e5d into dolphin-emu:master Mar 9, 2023
@JosJuice JosJuice deleted the jit64-lea-fixup branch March 9, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants