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

Gauntlet 7 sorrows #1347

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Gauntlet 7 sorrows #1347

wants to merge 4 commits into from

Conversation

bigianb
Copy link
Contributor

@bigianb bigianb commented Feb 1, 2024

implements the VU edge case where an integer altering instruction is in the delay slot of a conditional branch and the first instruction following it is another conditional branch based on that integer register.
The original code will take the value of the integer register at that time assuming a pipeline shortcut but that is wrong because having an integer altering instruction directly before a conditional branch on that same integer register causes the pipeline to fail and we need to use the value most recently written to memory.

Can potentially break a lot of games so needs quite a bit of testing.

{
// we need to use the value of intReg 3 steps prior or use initial value.
result.regIndex = endLoOps.writeI;
result.saveRegAddress = std::max<int32>(adjustedEnd - 5 * 8, m_begin);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not convinced on the 5 value here - I think it may need to be 4.

Source/ee/VuBasicBlock.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants