/ Home page of Thomas Lundqvist / Publications / thesis95

Harry Gunnarsson and Thomas Lundqvist's master thesis

[thesis95]Harry Gunnarsson and Thomas Lundqvist: "Porting the GNU C Compiler to the Thor Microprocessor," Göteborg, Sweden, 1995.


In this master thesis project an attempt has been made to port the freeware GNU C Compiler version 2.7.0 to the Thor microprocessor. The resulting compiler compiles ANSI C programs and generates assembler code for Thor. The compiler is not validated, and to be useful it also needs an implementation of the standard C library.

The GNU C Compiler has a world wide reputation of being a very good compiler able to deliver fast and reliable code. Furthermore, the design of the compiler is made with the thought of making ports to several different machines possible. Naturally, that is the most important reason for choosing GNU CC for this project. Since the GNU C Compiler is a freeware program, even the source code is freely accessible, and without the source code the project would have been impossible.

The Thor microprocessor is designed for use in space borne embedded computer systems. The instruction set is stack oriented and this feature makes it unique compared to other architectures available today.

One problem that made the project very interesting was the fact that GNU CC is intended to work on traditional architectures with a set of registers. On Thor there are no register due to the stack oriented instruction set.

Download copy: