A Simple and a Retargetable Code Generator for TCGS
Ruys, T.C. (1995) A Simple and a Retargetable Code Generator for TCGS. [Masters Thesis]
|Abstract:||The Twente Compiler Generator System (TCGS) is a parser-generator system which is typically used to generate a compiler that, given an input program, generates abstract stack code. A code generator for TCGS translates this stack code generated by a TCGS compiler to assembler code for a particular target machine. |
This thesis discusses two code generators for TCGS: GUMP and COGGEN.
The simplest strategy to translate stack code into assembler code is to macro expand each stack code instruction to an equivalent sequence of assembler code instructions. This simple strategy is used in the code generator GUMP.
COGGEN, which stands for Code-Generator Generator, is a retargetable code generator. The intermediate language used in COGGEN modules is the Register Transfer Language (RTL). COGGEN consists of several modules. COGGEN’s expander translates abstract stack code of the TCGS compiler to RTL-code. COGGEN’s assigner maps the temporaries in the RTL-code upon machine registers of the target machine. From a machine description, COGGEN’s transformer builds the transducer, an automaton which translates RTL-code to assembler code for the target machine.
Both code generators are implemented for Intel’s 8086 microprocessor. Code generated with GUMP86 is 40 times faster than TCGS’ interpreter and code generated with COGGEN86 is roughly 65 times faster than TCGS’ interpreter.
|Item Type:||Masters Thesis|
Electrical Engineering, Mathematics and Computer Science (EEMCS)
|Link to this item:||http://purl.utwente.nl/publications/65306|
|Export this item as:||BibTeX|
Daily downloads in the past month
Monthly downloads in the past 12 months
Repository Staff Only: item control page