I made a C Compiler in Python.
These are the compiler passes I made for the compiler:
I used GCC for preprocessing and assembling in Linux.
The compiler outputs assembly GCC GAS assembler.
The compiler has multiple passes. It has an intermediate representation TAC (Three Address Code).
In that way it can support mulitple frontends and multiple bakends.
I made the TAC AST, the parser AST, the assembly AST and I fixed up instructions in assembly.
This is the output of the compiler:
I debugged the assembly code in GDB.
No comments:
Post a Comment