Fantastic discussion of register allocation limitations on HN:
miniblog.
Related Posts
A new class of typosquatting attacks for malicious packages: register package names that are hallucinated by ChatGPT: https://vulcan.io/blog/ai-hallucinations-package-risk
(h/t @rauschma)
The more I learn about register allocators, the less I want to write programs in assembly. It's really nice having a compiler minimise spills.
TIL that AMD64 instructions generally don't support immediates greater than 32-bit: https://c9x.me/notes/2015-09-19.html
If you really need a large immediate value, you need to use MOV into a register first.