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:
Justine Tunney 2020-12-05 12:20:41 -08:00
parent e44a0cf6f8
commit 8da931a7f6
298 changed files with 19493 additions and 11950 deletions

View file

@ -31,7 +31,7 @@ unsigned windex$k8(short *, size_t) hidden;
unsigned windex$avx2(short *, size_t) hidden;
unsigned windex$sse4(short *, size_t) hidden;
const short kW[64] aligned(32) = {
const short kW[64] forcealign(32) = {
8281, 3883, 1365, 1786, 9006, 3681, 5563, 8013, 5787, 9063, 2923,
3564, 6122, 32, 1436, 0741, 7957, 9219, 1320, 2083, 1904, 8905,
2465, 9122, 9563, 1290, 4474, 3988, 9920, 8325, 1088, 2915, 33,
@ -40,13 +40,13 @@ const short kW[64] aligned(32) = {
1730, 2041, 7707, 5096, 6876, 1324, 1242, 5283, 0x7fff,
};
const short kW2[32] aligned(32) = {
const short kW2[32] forcealign(32) = {
8281, 1, 1365, 1786, 9006, 3681, 5563, 8013, 5787, 9063, 2923,
3564, 6122, 32, 1436, 0741, 7957, 9219, 1320, 2083, 1904, 8905,
2465, 9122, 9563, 1290, 4474, 3988, 9920, 8325, 1088, 2915,
};
const short kW3[64] aligned(32) = {
const short kW3[64] forcealign(32) = {
8281, 0x7fff, 1365, 1786, 9006, 3681, 5563, 8013, 5787, 9063, 2923,
3564, 6122, 32, 1436, 0741, 7957, 9219, 1320, 2083, 1904, 8905,
2465, 9122, 9563, 1290, 4474, 3988, 9920, 8325, 1088, 2915, 33,
@ -64,7 +64,7 @@ const short kW3[64] aligned(32) = {
})
TEST(windex, testRealWorldPicks) {
const short kPicks[96] aligned(32) = {
const short kPicks[96] forcealign(32) = {
103, 85, 145, 146, 121, 103, 145, 187, 146, 189,
121, 103, 139, 121, 63, 105, 105, 147, 60, 103,
103, 146, 121, 103, 139, 121, 139, 121, 157, 139,