A Retargetable C Compiler
豆瓣
Design and Implementation
David R. Hanson / Christopher W. Fraser
简介
Designed as a self-study guide, the book describes the real-world tradeoffs encountered in building a production-quality, platform-retargetable compiler. The authors examine the implementation of lcc, a production-quality, research-oriented retargetable compiler, designed at AT&T Bell Laboratories for the ANSI C programming language. The authors' innovative approach-a "literate program" that intermingles the text with the source code-uses a line-by-line explanation of the code to demonstrate how lcc is built.
contents
1. Introduction
2. Storage Management
3. Symbol Management
4. Types
5. Code Generation Interface
6. Lexical Analysis
7. Parsing
8. Expressions
9. Expression Semantics
10. Statements
11. Declarations
12. Generating Intermediate Code
13. Structuring the Code Generator
14. Selecting and Emitting Instructions
15. Register Allocation
16. Generating MIPS R3000 Code
17. Generating SPARC Code
18. Generating Intel X86 Code
19. Retrospective