x86 JIT compiler in 86 lines
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dmytro Sirenko 8083d12663 Merge pull request #4 from r-lyeh/master 4 years ago
tests Added tests/fib.c for benchmarking 4 years ago
JIT.md JIT.md cleanup 4 years ago
LICENSE Initial commit 5 years ago
README.md README updated; ./c4x86 c4.c hello.c 5 years ago
c4.c void support 4 years ago
c4x86.c MSVC support 4 years ago
dlfcn32.h MSVC support 4 years ago
hello.c initial 5 years ago
mman32.h MSVC support 4 years ago

README.md

c4 - C in four functions

An exercise in minimalism.

Try the following:

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

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

c4x86 - JIT compiler for x86 in 86 lines

An exercise in bit-twiddling masochism.

x86 only, not self-hosted!

gcc -m32 c4x86.c -o c4x86
./c4x86 hello.c
./c4x86 c4.c hello.c