Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
c4 - C in four functions
========================

c5 - C in four functions + AST + back-end code generator
========================================================
An exercise in minimalism.

This branch extends **c4.c** by adding:

* Abstract Syntax Tree creation
* Back-end code generator function: **gen()**
* Standard ordering of function parameters on stack
* Native x86 version: **c5x86.c**
* Various optimizations

Try the following:

gcc -o c4 c4.c (you may need the -m32 option on 64bit machines)
./c4 hello.c
./c4 -s hello.c
gcc -o c5 c5.c (you may need the -m32 option on 64bit machines)
./c5 hello.c
./c5 -s hello.c

./c4 c4.c hello.c
./c4 c4.c c4.c hello.c

./c5 c5.c hello.c
./c5 c5.c c5.c hello.c
Loading