mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 19:10:30 +00:00
Add chibicc
This program popped up on Hacker News recently. It's the only modern compiler I've ever seen that doesn't have dependencies and is easily modified. So I added all of the missing GNU extensions I like to use which means it might be possible soon to build on non-Linux and have third party not vendor gcc binaries.
This commit is contained in:
parent
e44a0cf6f8
commit
8da931a7f6
298 changed files with 19493 additions and 11950 deletions
30
third_party/chibicc/README.cosmo
vendored
Normal file
30
third_party/chibicc/README.cosmo
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
|
||||
- support __asm__
|
||||
- support __int128
|
||||
- support __vector_size__
|
||||
- support __builtin_memcpy
|
||||
- support __builtin_constant_p, __builtin_likely, etc.
|
||||
- support __builtin_isunordered, __builtin_islessgreater, etc.
|
||||
- support __builtin_ctz, __builtin_bswap, __builtin_popcount, etc.
|
||||
- support __constructor__, __destructor__, __section__, __cold__, etc.
|
||||
- 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
|
||||
|
||||
- fix 64-bit bug in generated code for struct bitfields
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue