Skip to content

Gauntlet 7 sorrows spike#1

Open
bigianb wants to merge 1 commit into
mymainfrom
my_gss
Open

Gauntlet 7 sorrows spike#1
bigianb wants to merge 1 commit into
mymainfrom
my_gss

Conversation

@bigianb

@bigianb bigianb commented Jan 24, 2024

Copy link
Copy Markdown
Owner

not ready - just a PR to facilitate looking at the diffs and making comments.

Comment thread Source/ee/VuBasicBlock.cpp Outdated
jitter->Mult();
jitter->Add();

// TODO: I think what we now have on the stack is the value and the offset where to store it.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

how do we write this?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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();

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

@bigianb bigianb force-pushed the my_gss branch 2 times, most recently from 69e04a9 to 552c435 Compare February 1, 2024 11:09
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.

2 participants