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

Fix ppc store update instructions #263

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

SeekyCt
Copy link
Contributor

@SeekyCt SeekyCt commented Aug 25, 2023

Currently, indexed store update instructions give an error along the lines of

        // Error: Expected instruction argument to be of the form offset($register), but found $r3
        // At instruction: stwux $r9, $r3, $r5

due to the call of a.memory_ref in the eval_fn (which is only valid for the non-indexed versions).

This PR fixes this by splitting out the eval_fn into separate ones for the indexed and non-indexed versions like load update instructions do

One thing that's worth noting is that none of the current tests contain any of these instructions, and #187 doesn't actually list them; Super Paper Mario has some functions using the instructions if that helps (possibly means that only later CW versions actually emitted them)

@simonlindholm simonlindholm merged commit 4b2b612 into matt-kempster:master Aug 25, 2023
1 check passed
@simonlindholm
Copy link
Collaborator

Makes sense. Thanks! The note about Super Paper Mario is useful, sounds like we should use that for project tests if m2c works picks up more again in the future.

@SeekyCt SeekyCt deleted the store-update-fix branch August 30, 2023 15:28
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