Hacker News new | ask | show | jobs
by isidor3 1131 days ago
It is interesting to me how both instruction sets have converged on splitting operations into simpler micro ops. The author briefly mentions RISC-V as having "better" core instructions, but it makes me wonder if having the best possible instructions would even help that much.

If you made a CPU that directly ran off of some convergent microcode, would you then lose because of bandwidth of getting those instructions to the chip? Or is compressing instruction streams already a pretty-well-solved problem if you're able to do it from a clean slate, instead of being tied to what instruction representations a chip happened to be using many years ago?

2 comments

> If you made a CPU that directly ran off of some convergent microcode

I think that’s the original idea behind RISC

Yes, and obviously ARM didn't chose the instructions in its reduced set optimally, if the best implementations require those instructions to be split into smaller ones. But that doesn't really speak to if that's because it's just better to pack instructions that way, or because these implementations of ARM and x86 just need to do it to be performant in spite of deficiencies in their instruction sets.
ARM is a weird beast across the spectrum of RISC designs. The original ISA design is inspired by Berkley RISC (which had only two stage pipeline) and then optimized to what can be reasonably cheaply done in the silicon process used, with the hardware implementation bearing striking similarity to traditional non pipelined "CISC" designs. This design for made cheap implementation of various instructions, like four operand ALU operations or instructions that do multiple memory accesses, which are more or less unthinkable in other RISC designs designed for pipelining and 1 IPC.
Microcode is often attributed to [1] from 1952.

[1] M. V. Wilkes, J. B. Stringer, Micro-programming and the design of the control circuits in an electronic digital computer.

It's arguable that Babbage's design for the Analytical Engine included microcode.

See, i.a., https://www.fourmilab.ch/babbage/glossary.html

Interesting, I had no idea. Wilkes doesn't cite Babbage, oh dear!
It would be interesting if a program could define some new instructions by specifying the microcode :)

Though that might make context switches rather expensive.

And if you're going down that route, perhaps time to think about FPGAs.