Comment by TapamN
Comment by TapamN 10 months ago
It's not really the addressing modes, but the instruction format. Immediate values on RISC-V are not stored contiguously on certain RISC-V instructions.
On all MIPS instructions, the bits for a immediate add, load constant, branch, etc value are always stored in order.
On RISC-V, the bits are (sometimes) jumbled around. For example, on a unconditional branch, the bits for the destination offset are stored in the order of bit 19, bits 9-0, bit 10, bits 18-11. In hardware, reordering that is free, you just run your wires the right way to decode it. In software, you have to do a ton of bit manipulation to fix it up.
The reason RISC-V does that is to simplify the hardware design.
Okay, so it's more about IMM representation within the bytecode rather than some memory addressing mode.