3 ms·
RISC-V has been designed with the exact goal for being an ISA easy to implement in hardware, so that students will be able to do this. For this purpose, RISC-V
by adrian_b 2y ago
RISC-V has been designed with the exact goal for being an ISA easy to implement in hardware, so that students will be able to do this.
For this purpose, RISC-V is excellent.
The RISC-V ISA has not been designed as an efficient method for encoding computer programs and even less for being easy to program in assembly language.
When programming in assembly language, a complex ISA is bad, because one cannot hold in mind all its peculiarities, but a too simple ISA is even worse, because every simple operation must be implemented by a complex sequence of instructions that is easy to forget and to get wrong.
I wonder if any of those who claim that the RISC-V ISA is simple can remember without searching the documentation how to implement the checks for integer overflow after each arithmetic operation.
The didactic examples of using RISC-V usually do not check for any errors, which is not acceptable in any critical application. I find funny that sometimes the same people who claim that the unsafe RISC-V ISA is good also claim that C and C++ are bad, because with default compilation options they are unsafe in comparison with e.g. Rust.
- pcwalton 2y ago> I wonder if any of those who claim that the RISC-V ISA is simple can remember without searching the documentation how to implement the checks for integer overflow after each arithmetic operation. I mean, I can't give you the Hacker's Delight magic numbers for expressing integer division by a constant via multiplication on AArch64 or x86-64 off the top of my head either, but that's what we have compilers for. The fact that you sometimes have to look up how to do simple things is just part of programming.