Thumbnail Image

The Design of a Two Level Code Generator

The Rcode intermediate code used in the University of Waikato Portable Language Implementation Project (PLIP) compiler system has been designed to represent the source program independently of the source language and the target machine environment, with only sufficient structural information to ensure that efficient target machine code can be represented. Like many such intermediate codes, significant work is still required to produce target machine code. This study has investigated the design and use of a second intermediate code that divides the code generator into two phases, based on the observation that generation of target machine code will have many similarities for machines that are architecturally similar. This code is a Generic Action Set (GAS) code that represents common architectural family. The first phase is the generation of GAS code and its optimisation, and is common for all machines in the family. The second phase is the generation of target machine code from GAS code. It has been recognised that generation of target machine code for machines in the family will still involve many similarities, abstraction but machine idiosyncrasies make difficult. However the development of adequate "fluid" abstractions portability definition for machines in the family to assist of compiler code has been studied, using the provided for the GAS family as a basis for the level of abstraction. Producing a code generator for a new machine will often involves very little effort, if one already exists for a similar machine.
Type of thesis
Byrne, M. (1987). The Design of a Two Level Code Generator (Thesis, Master of Science). University of Waikato, Hamilton, New Zealand. Retrieved from https://hdl.handle.net/10289/10075
University of Waikato
All items in Research Commons are provided for private study and research purposes and are protected by copyright with all rights reserved unless otherwise indicated.