Skip to main content

CS304: Compilers

Page path
  • Home /
  • Courses /
  • Course Catalog /
  • Computer Science /
  • CS304: Compilers /
  • Unit 8: Code Generation /
  • 8.4: Generation of Machine Code
Back to 'Unit 8: Code Generation '
  • 8.4: Generation of Machine Code

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

      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.

    •  University of California, Berkeley: Paul Hilfinger's "Registers, Functions, Parameters" URL

      Read these notes on generation of machine code from intermediate code.

    •  Torben Ægidius Mogensen's "Basics of Compiler Design, Chapter 9 and Chapter 10" URL

      Read Chapters 9 and 10. Chapter 9 overlaps the above reading, and is a supplementary discussion of the problem of mapping a large number of variables used in an intermediate language translation into a smaller number of registers, plus memory locations available on the target machine. Chapter 10 covers function calls using a stack, activation records, and frame pointers. Look over these chapters and read the parts that will add to your understanding of register allocation and function calls.

    • University of California, Berkeley: Paul Hilfinger's "Lectures 32-34" Page

      Watch these videos.

    •  Stanford University: Keith Schwarz's "Register Allocation" and "Garbage Collection" URL

      Read these notes, as well as the ones on Garbage Collection. These are very well-done formal presentations and give a lot of detail. Register allocation, linear scan and Chaitin's algorithm are explained. Regarding garbage collection, reference counting, mark-and-sweep, and stop-and-copy are explained.

Navigation

Art History
Biology
Business Administration
Chemistry
Communication
Economics
English
History
Mathematics

Creative Commons License
© Saylor Academy 2010-2018 except as otherwise noted. Excluding course final exams, content authored by Saylor Academy is available under a Creative Commons Attribution 3.0 Unported license. Third-party materials are the copyright of their respective owners and shared under various licenses. See www.saylor.org/open/licensinginformation for detailed licensing information.

Saylor Academy and Saylor.org® are trade names of the Constitution Foundation, a 501(c)(3) organization through which our educational activities are conducted.

Terms of Use | Privacy Policy