Retargeting a C Compiler for a DSP Processor

The purpose of this thesis is to retarget a C compiler for a DSP processor. Developing a new compiler from scratch is a major task. Instead, modifying an existing compiler so that it generates code for another target is a common way to develop compilers for new processors.This is called retargeting. This thesis describes how this was done with the LCC C compiler for the Motorola DSP56002 processor.

Contents

1 Introduction
1.1 Background
1.2 Purpose and goal
1.3 The reader
1.4 Reading guidelines
2 DSP
2.1 Introduction
2.2 Motorola DSP56002
2.2.1 Data buses
2.2.2 Address buses
2.2.3 Data ALU
2.2.4 Address generation unit
2.2.5 Program control unit
2.3 Instruction set
2.4 Assembly
3 Compilers
3.1 Introduction
3.2 The analysis-synthesis model
3.3 Phases
3.4 Analysis
3.4.1 Lexical analysis
3.4.2 Syntax analysis
3.4.3 Semantic analysis
3.5 Synthesis
3.5.1 Intermediate code generation
3.5.2 Code optimization
3.5.3 Code generation
3.6 Symbol table
3.7 Error handler
3.8 Front and back end
3.9 Environment
3.9.1 Preprocessor
3.9.2 Assembler
3.9.3 Linker and loader
3.10 Compiler tools
4 LCC
4.1 Introduction
4.2 C
4.3 The compiler
4.3.1 Lexical analysis
4.3.2 Syntax analysis
4.3.3 Semantic analysis
4.3.4 Intermediate code generation
4.3.5 Back end
5 Implementation
5.1 Introduction
5.2 The compiler
5.2.1 Data types and sizes
5.2.2 Register usage
5.2.3 Memory usage
5.2.4 Frame layout
5.2.5 Calling convention
5.2.6 Naming convention
5.3 Retargeting
5.3.1 Configuration
5.3.2 Declarations
5.3.3 Rules
5.3.4 C code
5.4 Special features
5.5 Other changes to LCC…

…………..

Author: Antelius, Henrik

Source: Linköping University

Download URL 2: Visit Now

Leave a Comment