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

(CS2100) Wrong Calculation of PC for I format #2

Open
jiachen247 opened this issue Nov 26, 2019 · 1 comment
Open

(CS2100) Wrong Calculation of PC for I format #2

jiachen247 opened this issue Nov 26, 2019 · 1 comment

Comments

@jiachen247
Copy link

\item PC-relative address: no of instructions from next instruction $PC = (PC + immediate) \times 4$

Shoundnt it be

PC = (PC + 4) + (imm * 4) instead of PC = (PC + imm) * 4

@jiachen247 jiachen247 changed the title Wrong Calculation of PC for I format (CS2100) Wrong Calculation of PC for I format Nov 26, 2019
@indocomsoft
Copy link
Owner

Oops yeah I think so. Can you make a PR? Hahah

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

No branches or pull requests

2 participants