rv32emu-legacy
rv32emu-legacy copied to clipboard
Implement the compressed instructions
Some modification of rv32emu to support C ext.
- Add a new variable named
insn_typeto distinguish the 16-bit and 32-bit instruction. - Modify the
unsigned char get_insn32(uint32_t, uint32_t*)to return the type of instruction and then assign the pointer the machine code of the instruction. - Modify the instruction offset, instead of always proceeding 4 bytes, it will depend on the type of instruction.
- 16-bits : 2 bytes
- 32-bits : 4 bytes
- Rearrange the offset of outputing the signature.
- Update the comparing function, which can compare the groundtruth and output of signature of this emulator for debugging.
- It is also the version of fixing start address of stack pointer.
- Imp and finish the test of all 32-bit version compressed instructions except those 64-bit version, 128-bit version and F ext.
Future work
- I would like to imp the floating point extension.
Remove the generated files and rework!
Hint: use git rebase -i to rework these Git commits.
Sorry, I have a question. Do I need to rework all the commit messages?
Sorry, I have a question. Do I need to rework all the commit messages?
Yes, all commits should be reworked. You shall squash the similar changes and make the commits clear.
Hello, Jserv I have reworked these commit messages. Please check, thank you~
After reworking Git commits with git rebase -i, you should perform git push --force for this branch.
Ensure no generated files such as ELF, log, dump files in Git repository.
You have to rebase master branch of upstream. And then, force push.
Don't use git merge. Use git rebase instead.
Reference instructions:
- set upstream:
git remote add upstream https://github.com/sysprog21/rv32emu && git fetch upstream - Perform rebase:
git rebase upstream/master - Fix the conflicts.
Before submitting the changes, ensure the completion of executing clang-format -i *.[ch]
Reworked yet?
Not yet, I will update it tomorrow.
Jim Huang [email protected] 於 2020年1月17日 週五 上午1:10寫道:
Reworked yet?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sysprog21/rv32emu/pull/5?email_source=notifications&email_token=AI4KYTPOEE7CU32GFLJLIVDQ6CIGPA5CNFSM4KFQ6NU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJE2HLQ#issuecomment-575251374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI4KYTOCJ6566MQXVGGPNSDQ6CIGPANCNFSM4KFQ6NUQ .
Hello Jserv, Sorry about the absence a few days ago. I have rebased all commits.
Thank @kksweet8845 again for contributing to this project. However, we shall always merge commits with better Git commit messages for further development. Please split this pull request into the following:
- New pull request for rv32i conformance tests;
- Once the above is merged, modify the pull request to concentrate on RV32C;
Changes regarding CSR instructions should be addressed in part 1.