Torben Ægidius Mogensen's "Basics of Compiler Design, Chapter 8: Machine-Code Generation"

Read Chapter 8. It describes the translation from a low-level intermediate language to machine code. This translation addresses the handling of restrictions on the machine language; for example, a finite number of registers is a restriction of a target machine and its machine language. The intermediate language assumes an unlimited number of registers, i.e., virtual register machine.