Conversation
bigianb
commented
Jan 25, 2024
| jitter->Mult(); | ||
| jitter->Add(); | ||
|
|
||
| // TODO: I think what we now have on the stack is the value and the offset where to store it. |
There was a problem hiding this comment.
You can use this to push the value of m_ctx.m_State.nCOP2VI[m_State.savedNextBlockIntRegIdx] on the stack:
jitter->PushRelAddrRef(offsetof(CMIPS, m_State.nCOP2VI));
jitter->PushRel(offsetof(CMIPS, m_State.savedNextBlockIntRegIdx));
jitter->LoadFromRefIdx();
And you can use this to store a value from the stack to m_ctx.m_State.nCOP2VI[m_State.savedNextBlockIntRegIdx]:
jitter->PushRelAddrRef(offsetof(CMIPS, m_State.nCOP2VI));
jitter->PushRel(offsetof(CMIPS, m_State.savedNextBlockIntRegIdx));
jitter->PushIdx(2) //Get the value that was on the top of the stack before pushing those two things above
jitter->StoreAtRefIdx();
Owner
Author
There was a problem hiding this comment.
thanks, I've updated the code to use that. It throws an exception doing the code creation but at least there's something to debug now.
69e04a9 to
552c435
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
not ready - just a PR to facilitate looking at the diffs and making comments.