A retargetable C compiler : design and implementation / Christopher W. Fraser and David R. Hanson.
By: Fraser, Christopher W.
Contributor(s): Hanson, David R. (David Roy).
Material type: BookPublisher: Redwood City, CA : Benjamin/Cummings Pub. Co, 1995Description: xv, 564 p. : ill. ; 25 cm.ISBN: 0805316701.Subject(s): C (Computer program language) | Compilers (Computer programs)DDC classification: 005.453Item type | Current library | Call number | Copy number | Status | Date due | Barcode | Item holds |
---|---|---|---|---|---|---|---|
General Lending | MTU Bishopstown Library Lending | 005.453 (Browse shelf(Opens below)) | 1 | Available | 00009983 |
Enhanced descriptions from Syndetics:
Examining the implementation of lcc, a production-quality, research-oriented retargetable compiler, designed at AT&T Bell Laboratories for the ANSI C programming language, this book is designed for professionals who seek a detailed examination of a real-world compiler. A thorough and accurate picture of the lcc compiler is provided, and a line-by-line explanation of the code demonstrates how the compiler is built. The accompanying disk holds the full source code for the lcc compiler, the three back ends and the code-generator.
Bibliography:(pages 535-540) and index.
Introduction -- Storage Management -- Symbol Management -- Types -- Code Generation Interface -- Lexical Analysis -- Parsing -- Expressions -- Expression Semantics -- Statements -- Declarations -- Generating Intermediate Code -- Structuring the Code Generator -- Selecting and Emitting Instructions -- Register Allocation -- Generating MIPS R3000 Code -- Generating SPARC Code -- Generating X86 Code -- Retrospective.
Table of contents provided by Syndetics
- Preface
- 1 Introduction
- Literate Programs
- How to Read This Book
- Overview
- Design
- Common Declarations
- Syntax Specifications
- Errors
- 2 Storage Management
- Memory Management Interface
- Arena Representation
- Allocating Space
- Deallocating Space
- Strings
- 3 Types
- Representing Symbols
- Representing Symbol Tables
- Changing Scope
- Finding and Installing Identifiers
- Labels
- Constants
- Generated Variables
- 4 Code Generation Interface
- Representing Types
- Type Management
- Type Predicates
- Type Constructors
- Function Types
- Structure and Enumeration Types
- Type-Checking Functions
- Type Mapping
- 5 Lexical Analysis
- Type Metrics
- Interface Records
- Symbols
- Types
- Dag Operators
- Interface Flags
- Initialization
- Definitions
- Constants
- Functions
- Interface Binding
- Upcalls
- 6 Parsing
- Input
- Recognizing Tokens
- Recognizing Keywords
- Recognizing Identifiers
- Recognizing Numbers
- Recognizing Character Constants and Strings
- 7 Expressions
- Languages and Grammars
- Ambiguity and Parse Trees
- Top-Down Parsing
- FIRST and FOLLOW Sets
- Writing Parsing Functions
- Handling Syntax Errors
- 8 Expression Semantics
- Representing Expressions
- Parsing Expressions
- Parsing C Expressions
- Assignment Expressions
- Conditional Expressions
- Binary Expressions
- Unary and Postfix Expressions
- Primary Expressions
- 9 Expression Semantics
- Conversions
- Unary and Postfix Operators
- Function Calls
- Binary Operators
- Assignments
- Conditionals
- Constant Folding
- 10 Statements
- Representing Code
- Execution Points
- Recognizing Statements
- If Statements
- Labels and Gotos
- Loops
- Switch Statements
- Return Statements
- Managing Labels and Jumps
- 11 Declarations
- Translation Units
- Declarations
- Declarators
- Function Declarators
- Structure Specifiers
- Function Definitions
- Compound Statements
- Finalization
- The Main Program
- 12 Generating Immediate Code
- Eliminating Common Subexpressions
- Building Nodes
- Flow of Control
- Assignments
- Function Calls
- Enforcing Evaluation Order
- Driving Code Generation
- Eliminating Multiply Referenced Nodes
- 13 Structuring the Code Generator
- Organization of the Code Generator
- Interface Extensions
- Upcalls
- Node Extensions
- Symbol Extensions
- Frame Layout
- Generating Code to Copy Blocks
- Initialization
- 14 Selecting and Emitting instructions
- Specifications
- Labelling the Tree
- Reducing the Tree
- Cost Functions
- De
Excerpt provided by Syndetics
Author notes provided by Syndetics
Since 1975, Christopher W. Fraser has researched compiling, particularly producing code generators automatically from compact specs, and has published many technical articles in this area. He originated retargetable peephole optimization, which GCC, a popular C compiler, uses to help select instructions. From 1977 until 1986, Fraser taught computer science, including compiling, at the University of Arizona. Since 1986, Fraser has conducted computing research at AT&T Bell Laboratories in Murray Hill, New Jersey.
David R. Hanson is a Professor of Computer Science at Princeton University with more than 20 years of research experience in programming languages. He has conducted research in conjunction with Bell Laboratories and is the co-author of lcc, a production quality, research compiler for the C language that is popular with the Unix community. lcc is presented and analyzed in the book A Retargetable C Compiler: Design and Implementation , by Christopher Fraser and David Hanson (c) 1995, Addison-Wesley.
0805316701AB04062001