August 2024
Intermediate to advanced
792 pages
22h 45m
English

Up until now, you’ve allocated space for every pseudoregister on the stack. This strategy is simple but painfully inefficient. Because instructions can’t always operate on values in memory directly, you sometimes need to generate extra instructions to copy values between these stack locations and registers. Even worse, the assembly code you generate has to access memory constantly, even though registers are faster. Now you’ll solve those problems. You’ll finish up your compiler by adding a register allocation ...
Read now
Unlock full access