-
Notifications
You must be signed in to change notification settings - Fork 245
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
Support RV64 #74
Comments
Notes from a quick read of the specification:
Overall, not too bad. It will require some time, but I don't think there is anything tricky. Adding additional testing for RV64 seems like the biggest source of work. |
You may also update the printInt-Syscalls, as all of them (also eg. prinIntHex), are not able to print 64bit values. Or we may specify new syscalls and mark the old one for 32bit numbers. |
Maybe you should also review the other syscalls (e.g. sleep, rand, ...) whether you need a change for 64bit |
Thanks for mentioning system calls. I had actually forgotten to consider them. I think I'll have to do a once over on all of them to see if each needs to be updated at all. The system calls inherited from MARS and SPIM are in a little bit of a weird place as neither of those simulators supported 64 bit registers. I think I would probably be inclined to leave them truncating 64 bit values. I'm torn on whether or not to make a 64 bit version of them in that case. On one hand they take a lot of code and system call numbers as compared to the Linux equivalents (because there are so many). However, students definitely do use them because they provide a simpler interface than the Linux alternatives and I don't want to make 64 bit mode better for students by allowing direct reference to Patterson and Hennessy and worse because they can't read and write values as easily. For the Linux system calls, they should have defined semantics for 64 vs 32 bit so it should be easy to make them work. |
I think it is maybe enough to document the truncation, and add only the print/readInt64 at the end (and maybe refer to the syscall-number in the 32bit readInt). From my perspective, the Linux API is nice, but for my exercises I know the students are already overwhelmed by the easy interface :-) I also haven't used the stuff, since I think the simulator has a different focus; a learning tool for assembler programming with easy inspectable state. Nonetheless, I also understand your point, so I can't help you with the decision ... |
I just published the release that adds support for this (https://github.com/TheThirdOne/rars/releases/tag/v1.5). |
Test selfmod
When I initially ported RARS, I did not include support for rv64 because it seemed unnecessary. However, as time has passed it has seemed more and more worthwhile.
The two big reasons to support rv64 as I see it are:
I don't expect to handle this soon, but if this is an important feature to you please do tell me.
The discussion in #73 prompted this issue's creation.
The text was updated successfully, but these errors were encountered: