diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-08-19 16:36:59 +0000 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-08-19 16:36:59 +0000 |
commit | bfda462bca5db1693b2fa1c2845c8f4242d33782 (patch) | |
tree | 81a28cd3f75af75cc30c71a14bfb4c4475b7eae5 /miniany/README | |
parent | 9fc685a2237b789800b770f3bc1eecb8e1bfdf7b (diff) | |
download | compilertests-bfda462bca5db1693b2fa1c2845c8f4242d33782.tar.gz compilertests-bfda462bca5db1693b2fa1c2845c8f4242d33782.tar.bz2 |
c4: use cases
Diffstat (limited to 'miniany/README')
-rw-r--r-- | miniany/README | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/miniany/README b/miniany/README index 851db39..f22c5f7 100644 --- a/miniany/README +++ b/miniany/README @@ -14,6 +14,23 @@ tcc -O0 -g -o c4 c4.c ./c4 c4.c c4.c cc.c < hello.c ``` +# Local version of c4 + +This local version of c4 is used to guarantee that our own bootstrapped +cc.c can also run on c4. This makes sure we are not integrating too +complex things into our own compiler. + +* currently integrated: + - switch statement from switch-and-structs, adapted c4 to use switch + statements instead of ifs (as in switch-and-structs) +* my own changes: + - constants like EOF, EXIT_SUCCESS, NULL + - standard C block comments along to c++ end of line ones + - negative enum initializers + - do/while loops + - more C functions like isspace, getc, strcmp + - some simplified functions for printing like putstring, putint, putnl + # Acknoledgments and references * c4 @@ -22,7 +39,7 @@ tcc -O0 -g -o c4 c4.c 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: + 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 |