mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48: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
|
@ -266,7 +266,7 @@ struct plm_audio_t {
|
|||
float D[1024];
|
||||
float V[1024];
|
||||
float U[32];
|
||||
} aligned(64);
|
||||
} forcealign(64);
|
||||
|
||||
typedef plm_audio_t plm_audio_t;
|
||||
|
||||
|
|
|
@ -77,12 +77,12 @@ struct plm_samples_t {
|
|||
double time;
|
||||
unsigned int count;
|
||||
#ifdef PLM_AUDIO_SEPARATE_CHANNELS
|
||||
float left[PLM_AUDIO_SAMPLES_PER_FRAME] aligned(32);
|
||||
float right[PLM_AUDIO_SAMPLES_PER_FRAME] aligned(32);
|
||||
float left[PLM_AUDIO_SAMPLES_PER_FRAME] forcealign(32);
|
||||
float right[PLM_AUDIO_SAMPLES_PER_FRAME] forcealign(32);
|
||||
#else
|
||||
float interleaved[PLM_AUDIO_SAMPLES_PER_FRAME * 2] aligned(32);
|
||||
float interleaved[PLM_AUDIO_SAMPLES_PER_FRAME * 2] forcealign(32);
|
||||
#endif
|
||||
} aligned(32);
|
||||
} forcealign(32);
|
||||
|
||||
typedef struct plm_samples_t plm_samples_t;
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "libc/str/str.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "third_party/dtoa/dtoa.h"
|
||||
#include "tool/viz/lib/knobs.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -611,8 +611,8 @@ static struct Pick PickBlockUnicodeAnsi(struct TtyRgb tl, struct TtyRgb tr,
|
|||
struct TtyRgb bl2 = GetQuant(bl);
|
||||
struct TtyRgb br2 = GetQuant(br);
|
||||
unsigned i, p1, p2;
|
||||
uint16_t picks1[96] aligned(32);
|
||||
uint16_t picks2[32] aligned(32);
|
||||
uint16_t picks1[96] forcealign(32);
|
||||
uint16_t picks2[32] forcealign(32);
|
||||
memset(picks1, 0x79, sizeof(picks1));
|
||||
memset(picks2, 0x79, sizeof(picks2));
|
||||
PickUnicode(picks1, tl, tr, bl, br, tl2, tr2, bl2, br2);
|
||||
|
@ -625,7 +625,7 @@ static struct Pick PickBlockUnicodeAnsi(struct TtyRgb tl, struct TtyRgb tr,
|
|||
static struct Pick PickBlockUnicodeTrue(struct TtyRgb tl, struct TtyRgb tr,
|
||||
struct TtyRgb bl, struct TtyRgb br) {
|
||||
unsigned i;
|
||||
uint16_t picks[96] aligned(32);
|
||||
uint16_t picks[96] forcealign(32);
|
||||
memset(picks, 0x79, sizeof(picks));
|
||||
PickUnicode(picks, tl, tr, bl, br, tl, tr, bl, br);
|
||||
i = windex(picks, 96);
|
||||
|
@ -648,8 +648,8 @@ static struct Pick PickBlockCp437Ansi(struct TtyRgb tl, struct TtyRgb tr,
|
|||
struct TtyRgb bl2 = GetQuant(bl);
|
||||
struct TtyRgb br2 = GetQuant(br);
|
||||
unsigned i, p1, p2;
|
||||
uint16_t picks1[32] aligned(32);
|
||||
uint16_t picks2[32] aligned(32);
|
||||
uint16_t picks1[32] forcealign(32);
|
||||
uint16_t picks2[32] forcealign(32);
|
||||
memset(picks1, 0x79, sizeof(picks1));
|
||||
memset(picks2, 0x79, sizeof(picks2));
|
||||
PickCp437(picks1, tl, tr, bl, br, tl2, tr2, bl2, br2);
|
||||
|
@ -662,7 +662,7 @@ static struct Pick PickBlockCp437Ansi(struct TtyRgb tl, struct TtyRgb tr,
|
|||
static struct Pick PickBlockCp437True(struct TtyRgb tl, struct TtyRgb tr,
|
||||
struct TtyRgb bl, struct TtyRgb br) {
|
||||
unsigned i;
|
||||
uint16_t picks[32] aligned(32);
|
||||
uint16_t picks[32] forcealign(32);
|
||||
memset(picks, 0x79, sizeof(picks));
|
||||
PickCp437(picks, tl, tr, bl, br, tl, tr, bl, br);
|
||||
return kPicksCp437[windex(picks, 32)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue