2 ms·
> It's a bit awkward to write directly. For example, to set a 32-bit register with an immediate value requires setting the upper 20 bits followed by the lower 1
by zozbot234 6y ago
> It's a bit awkward to write directly. For example, to set a 32-bit register with an immediate value requires setting the upper 20 bits followed by the lower 12. Similar with PC jumps, etc.
Yes, IIRC the standard description of the RISC-V ISA includes assembly macro-instructions that can be programmatically expanded into sequences for things like those. Similar to how "mov" is actually implemented as a special case of "add immediate".
- cmrdporcupine 6y agoOh for sure, that's great for writing, but when disasembling or looking at the asm listing for a C program you don't get that. Which happens a lot while working on a low level machine like this, especially when building it :-)