Get codebase completely working with LLVM
You can now build Cosmopolitan with Clang:
make -j8 MODE=llvm
o/llvm/examples/hello.com
The assembler and linker code is now friendly to LLVM too.
So it's not needed to configure Clang to use binutils under
the hood. If you love LLVM then you can now use pure LLVM.
This commit is contained in:
@@ -362,7 +362,7 @@ static struct Cell derasterize(unsigned char block[CN][YS * XS]) {
|
||||
unsigned char bf[1u << MC][2];
|
||||
rgb2lin(CN * YS * XS, lb[0], block[0]);
|
||||
n = combinecolors(bf, block);
|
||||
best = -1u;
|
||||
best = FLT_MAX;
|
||||
cell.rune = 0;
|
||||
for (i = 0; i < n; ++i) {
|
||||
b = bf[i][0];
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.h"
|
||||
|
||||
/ Duplicates chrominance samples horizontally, e.g.
|
||||
/
|
||||
/ 12345678--------
|
||||
/ → 1122334455667788
|
||||
/
|
||||
/ @param %edi is size of %rsi array in bytes
|
||||
/ @param %rsi is char[edi/16][16] output and %rsi==%rdx is OK
|
||||
/ @param %rdx is char[edi/16][8] input
|
||||
/ @return %rax is %rsi
|
||||
// Duplicates chrominance samples horizontally, e.g.
|
||||
//
|
||||
// 12345678--------
|
||||
// → 1122334455667788
|
||||
//
|
||||
// @param %edi is size of %rsi array in bytes
|
||||
// @param %rsi is char[edi/16][16] output and %rsi==%rdx is OK
|
||||
// @param %rdx is char[edi/16][8] input
|
||||
// @return %rax is %rsi
|
||||
doublechrominance:
|
||||
.leafprologue
|
||||
.profilable
|
||||
|
||||
@@ -78,7 +78,7 @@ static const char *GetStorageSpecifier(const char *type, int *out_width,
|
||||
|
||||
static void EmitSection(long yn, long xn, int w, int arrayalign, int emit(),
|
||||
void *a) {
|
||||
char alignstr[20];
|
||||
char alignstr[21];
|
||||
uint64toarray_radix10(arrayalign, alignstr);
|
||||
if (arrayalign <= 8 && yn * xn * w == 8) {
|
||||
emit("\t.rodata.cst", a);
|
||||
@@ -105,7 +105,7 @@ void *FormatStringTableAsAssembly(long yn, long xn, const char *const T[yn][xn],
|
||||
const char *name, const char *scope) {
|
||||
int w, align;
|
||||
const char *storage;
|
||||
char ynstr[20], xnstr[20];
|
||||
char ynstr[21], xnstr[21];
|
||||
name = firstnonnull(name, "M");
|
||||
storage = GetStorageSpecifier(firstnonnull(type, "long"), &w, &align);
|
||||
uint64toarray_radix10(yn, ynstr);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
void *FormatStringTableAsCode(long yn, long xn, const char *const T[yn][xn],
|
||||
int emit(), void *arg, const char *type,
|
||||
const char *name, const char *ignored) {
|
||||
char ynstr[20], xnstr[20];
|
||||
char ynstr[21], xnstr[21];
|
||||
uint64toarray_radix10(yn, ynstr);
|
||||
uint64toarray_radix10(xn, xnstr);
|
||||
emit(type, arg);
|
||||
|
||||
@@ -287,7 +287,7 @@ static int16_t pcmscale_[PLM_AUDIO_SAMPLES_PER_FRAME * 2 / 8][8];
|
||||
static bool fullclear_, historyclear_, tuned_, yonly_, gotvideo_;
|
||||
static int homerow_, lastrow_, playfd_, infd_, outfd_, nullfd_, speakerfails_;
|
||||
static char host_[DNS_NAME_MAX + 1], status_[7][200], logpath_[PATH_MAX],
|
||||
fifopath_[PATH_MAX], chansstr_[16], sratestr_[16], port_[8];
|
||||
fifopath_[PATH_MAX], chansstr_[32], sratestr_[32], port_[32];
|
||||
|
||||
static void OnCtrlC(void) {
|
||||
longjmp(jb_, 1);
|
||||
|
||||
Reference in New Issue
Block a user