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

Add implementation of jr instruction #1395

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Add implementation of jr instruction #1395

merged 2 commits into from
Dec 5, 2023

Conversation

mrmr1993
Copy link
Member

@mrmr1993 mrmr1993 commented Dec 5, 2023

This PR implements the jr instruction. This builds on top of #1394.

Copy link
Member

@dannywillems dannywillems left a comment

Choose a reason for hiding this comment

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

I am a bit annoying, but while running programs in the VM, I liked seeing instructions decoded, like

debug!("Instr: jr {}", Env::debug_register(&rs));

Is it something you'd agree to add for each instruction?
In addition to some documentation for each?
Can be smth like:

            // lw: R[rt] <- M[R[rs] + sign_extended_imm]
            //                -------------------------
            //                         address
            //              ----------------------------
            //                        value
            ```
            
The helpers are in the last PRs I opened :). Might be useful for you to debug too.

@dannywillems
Copy link
Member

Also, do you have any documentation regarding this next IP?

@mrmr1993
Copy link
Member Author

mrmr1993 commented Dec 5, 2023

Do you have any documentation regarding this next IP?

https://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf

More importantly, it's what cannon does, and so we should match it if we want a proven version of cannon's execution.

Base automatically changed from feature/sll-unsafe to master December 5, 2023 19:31
@dannywillems dannywillems merged commit b301b8a into master Dec 5, 2023
4 checks passed
@dannywillems dannywillems deleted the feature/jr branch December 5, 2023 19:31
@dannywillems
Copy link
Member

Note: addresses must be aligned
image

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