Skip to content

Support for 64 bit mode

Compare
Choose a tag to compare
@TheThirdOne TheThirdOne released this 15 Jul 04:10
· 64 commits to master since this release

RARS has uses 32 bit wide registers and therefore used the base RISC-V instruction set rv32i. However, there is also a rv64i base instruction set which widens registers to 64 bits and defines new instructions to handle 32-bit modular arithmetic. A list of instructions added by rv64i and brief explanation of the general differences between rv32 and rv64 is on the wiki. This release adds an option to switch between the base instruction sets.

When I initially ported RARS, I did not include support for rv64i because it seemed unnecessary. However, relatively recently, I became aware that a number of people teaching with RARS would like support for rv64i because the textbook they use uses rv64i and it can be confusing to students to deal with translating the minor differences. Additionally, the software ecosystem for RISC-V supports rv64i much better than rv32i so it is a nice bonus to allow better interoperability with other software.

Some relevant issues that include discussion about this major addition are #73, #74, and #78.

Minor Additions:

  • Added the fp alias for x8 (#64). Thanks to @martinberger for pointing this out.
  • @jowens added a tool that logs instructions executed, and memory accesses (#58, #68)
  • Added mars-like system calls for doubles (#66)
  • Non-standard format jalr t0,-100(t1) used in H&P now works (#81). Thanks to @BenjaminBeichler for adding this.

Bugfixes:

  • Fix execution of loads and store with negative offsets from binary values (e8ae398)
  • Loading the word 0 now correctly causes an illegal instruction exception (ef4862a)
  • Digital Lab Sim's help text now correctly displays addressees when working with non-default memory configurations. (#69). Thanks to @phummel for fixing this.
  • Fix missing tooltips for some CSRs. (3c970b9)
  • Fix timertool example to not use the label time (#79, #80). Thanks to @darnuria for fixing this.
  • Fix incorrect assertions that make timertool.s hang (#80). Thanks to @darnuria for finding this.
  • Keyboard Simulator now correctly locks and therefore doesn't freeze RARS (#82). Thanks to @quinnlp for finding this.
  • Fix JALR incorrectly jumping when source register = destination (ee095d5)