3 ms·
> But there is a lot of work for the compiler here, wow. Knowing the maximum number of registers that is needed for any function call made within a function? Ou
by pcwalton 11y ago
> But there is a lot of work for the compiler here, wow. Knowing the maximum number of registers that is needed for any function call made within a function? Ouch.
Compilers already do that, to allocate outgoing argument space that can be reused between procedure calls. Saves needless stack manipulation for spilled outgoing parameters.
> And again, rotating the registers to avoid hitting the stack, incredibly powerful.
SPARC did this too. It's a classic RISCism: https://en.wikipedia.org/wiki/Register_window https://en.wikipedia.org/wiki/Register_window
- simula67 11y ago> SPARC did this too. I thought this experiment was a failure since most operating systems do multitasking : http://ieng9.ucsd.edu/~cs30x/sparcstack.html http://ieng9.ucsd.edu/~cs30x/sparcstack.html