It's easy to forget how register constrained the x86 architecture is. Even a gameboy had more general purpose registers!
miniblog.
Related Posts
A really fun (10 minute) talk on developing an LLVM backend for 6502, a chip with only three registers and a teeny tiny stack: https://www.youtube.com/watch?v=2lW3WHPtmKo
x86 Register Encoding https://eklitzke.org/x86-register-encoding (fascinating article on how compilers choose which registers to use — save bytes!)
LLVM does not scale down well if CPUs have very few general purpose registers: http://t.co/eEvS22b310 (I believe GCC is marginally better)