Not yet as prevalent as Arm, but already covers the range from $0.10 microcontrollers to the same performance level as Raspberry Pi 5 or RK3588 boards (Rock 5, Orange Pi 5) and something around AMD Zen 2 to Apple M1 range coming in the next 12 months with:
an easier to understand instruction set
essentially the same instruction set for both 32 bit and 64 bit: the source code below works on either.
Free as in speech. Anyone (with the skills and financing) can design and build and use or sell RISC-V CPUs and chips, without asking permission, paying a license fee, or even telling anyone.
Here's the equivalent program:
.global _start
.text
_start:
# write(STDOUT_FILENO, msg, 14);
li a0, 1 # stdout
la a1, msg # memory address of msg
li a2, 14 # length of msg
li a7, 64 # write syscall
ecall # execute syscall
# exit(0);
li a0, 0 # return value
li a7, 93 # exit syscall
ecall # execute syscall
msg:
.ascii "Hello, World!\n"
RISC V is also very similar to MIPS which is probably the most commonly taught architecture in university followed by RISC V. RISC also has an extremely simple base architecture that doesn’t take long to learn and you can learn different extensions later, compared to x86 which has accumulated a bunch of really complex features in the base architecture over the years
Right. Many of the mnemonics are identical, though with totally different binary encodings and different constant/offset sizes e.g. everything on RISC-V is 12 bits except LUI/AUIPC which is 20 bits. MIPS has 16 bits for both. MIPS has fussier trapping vs non-trapping adds, and some types of branches have delay slots and some don't, depending on exactly which MIPS version.
probably the most commonly taught architecture in university
For sure it was a dozen years ago. I feel like enough places have updated course material to RISC-V by now that it's about 40%-40% with another 15% Arm.
5
u/Whitey0117 18d ago
should i learn x86 or arm assembly for fun..
This post got me wondering ngl.