blob: fcd9e0661ff1d655ec60ac7cd68884a57b51d759 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Building
```
./build.sh cc tcc hosted d
./build.sh cc tcc freestanding d
```
# Running on c4:
```
tcc -O0 -g -o c4 c4.c
./c4 cc.c < hello.c
./c4 c4.c cc.c < hello.c
./c4 c4.c c4.c cc.c < hello.c
```
# Acknoledgments and references
* c4
* https://github.com/rswier/c4.git
c4 - C in four functions
minimalistic C compiler running on an emulator on the IR, inspiration
for this project
* https://github.com/rswier/c4/blob/switch-and-structs/c4.c:
c4 adaptions to provide switch and structs:
* https://github.com/EarlGray/c4: a X86 JIT version of c4
* https://github.com/jserv/amacc: based on C4, JIT or native code, for
ARM, quite well documented, also very nice list of compiler
resources on Github page
* selfie
* http://selfie.cs.uni-salzburg.at/:
C* self-hosting C compiler (also emulator, hypervisor) for RISCV,
inspiration for what makes up a minimal C language
* tiny.c
* http://www.iro.umontreal.ca/~felipe/IFT2030-Automne2002/Complements/tinyc.c
* c.c in swieros: https://github.com/rswier/swieros.git
* documentation
* "Compiler Construction", Niklaus Wirth
* https://github.com/DoctorWkt/acwj
|