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

DSPInterpreter: fix off-by-one errors in cycle counting #10072

Merged
merged 1 commit into from Aug 31, 2021

Conversation

Tilka
Copy link
Member

@Tilka Tilka commented Aug 31, 2021

Previously, when calling RunCycles(1) we would actually run two instructions. (We currently assume that all instructions take one cycle.)

@Tilka Tilka requested a review from Pokechu22 August 31, 2021 00:57
@Tilka Tilka merged commit e69f7e7 into dolphin-emu:master Aug 31, 2021
11 checks passed
@Tilka Tilka deleted the dsp_cycles branch August 31, 2021 02:54
@Pokechu22
Copy link
Contributor

Note that the recompiler was not affected, as it uses JA (jump above/unsigned greater than):

// Decrement cyclesLeft
MOV(64, R(RCX), ImmPtr(&m_cycles_left));
SUB(16, MatR(RCX), R(EAX));
J_CC(CC_A, dispatcherLoop);

I don't know if the rest of the recompiler properly handles cycle counts though.

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