cosmopolitan/third_party/chibicc/README.cosmo

40 lines
1.6 KiB
Plaintext
Raw Normal View History

chibicc is the simplest/tiniest/hackable/readable c11 compiler in the
world that can build projects like python but goes 2x slower than gcc
with 2x the code size, because it doesn't optimize or color registers
although it can compile code at 5x the speed and could be even faster
which is great, considering it's a 220kb αcτµαlly pδrταblε εxεcµταblε
local enhancements
2020-12-09 12:00:48 +00:00
- support dce
- support gnu asm
- support __int128
2020-12-09 12:00:48 +00:00
- support _Static_assert
- support __vector_size__
2020-12-09 12:00:48 +00:00
- support __builtin_add_overflow, etc.
- support __builtin_memcpy, strlen, strpbrk, etc.
- support __builtin_constant_p, __builtin_likely, etc.
- support __builtin_isunordered, __builtin_islessgreater, etc.
- support __builtin_ctz, __builtin_bswap, __builtin_popcount, etc.
2020-12-09 12:00:48 +00:00
- support __constructor__, __section__, __cold__, -ffunction-sections, etc.
- support building -x assembler-with-cpp a.k.a. .S files
- support profiling w/ -mcount / -mfentry / -mnop-mcount
- improve error messages to trace macro expansions
- reduce #lines of generated assembly by a third
- reduce #bytes of generated binary by a third
local bug fixes
2020-12-09 12:00:48 +00:00
- allow casted values to be lvalues
- permit parentheses around string-initializer
- fix 64-bit bug in generated code for struct bitfields
2020-12-09 12:00:48 +00:00
- fix bug where last statement in statement expression couldn't have label
- print_tokens (chibicc -E) now works in the case of adjacent string literals
local changes
- use tabs in generated output
- generated code no longer assumes red zone
- emit .size directives for function definitions
- use fisttp long double conversions if built w/ -msse3