| ▲ | hinkley 2 hours ago | |
Probably not that much because one of the legacies of x86 is that library calling conventions are based on this same registry scarcity. To make an API call there is a convention that a limited number of registers are treated as callee-preserves and the rest are caller-preserves. So your compiler spills them defensively before calling out. You can make a programming language that uses whatever convention you want, but every time you make a system call or a call to a C or Rust library, you're using essentially an FFI and your FFI logic will have to handle the register spill and recovery to match the convention. And if you convert your code to a library, then it'll have to be dumbed down as well. | ||