Hacker News new | ask | show | jobs
by snvzz 868 days ago
>In the other hand, I am not fond of the ABI register names

Why? They're simple substitution, and very helpful with following ABI.

>and the pseudo-instructions involving mini-compilation.

Again, why? These aren't specific to the assembler used, but rather, defined in the specification itself. This means they are reliable, and will always be there for as long as you use a RISC-V compliant assembler.

They are thus also the register names you will see in disassembler output, debuggers and other tools.

Also, you might be interested in this new RVA22+V board[0].

0. https://forum.banana-pi.org/t/leading-the-future-of-computin...

1 comments

The standard pseudo-instructions are not just standard. They express idioms that get treated differently, sometimes also by hardware.

For example `li` gets expanded by the assembler into `liu` and `addi` which on larger RISC-V cores get recognised and fused back into a single op. Using `xori` instead of `addi` would have had the same result but wouldn't get fused.

Next, some idioms get recognised and automatically assembled into "compressed" 16-bit instructions to save space. For example "mv rd,rs" and "addi rd, rs, 0" both get assembled into "c.mv rd,rs". And on a larger RISC-V core, "c.mv" could be only a register rename in the decoder, thus taking 0 cycles.