andrescv / jupiter

RISC-V Assembler and Runtime Simulator
https://jupitersim.gitbook.io/
GNU General Public License v3.0
417 stars 36 forks source link

a0 vs a7 for system calls #37

Open TheThirdOne opened 4 years ago

TheThirdOne commented 4 years ago

Jupiter uses a0 for the system call number. Most other simulators/kernels use a7 for the system call number. Notably, spike with pk, rv8, qemu for userspace, RARS, and RIPES all use a7. Venus would be the notable simulator that uses a0.

Would you be interested in changing to use a7 instead of a0? I would be willing to make a PR, but wanted to get a "go ahead" before I start.

andrescv commented 4 years ago

Yes absolutely, in the beginning of the project I thought that register a0 would be a good choice for system calls because we used to use Venus in classroom. If you could make a PR with that change, go ahead totally agree with the change.