Make improvements

- Emulator can now test the αcτµαlly pδrταblε εxεcµταblε bootloader

- Whipped up a webserver named redbean. It services 150k requests per
  second on a single core. Bundling assets inside zip enables extremely
  fast serving for two reasons. The first is that zip central directory
  lookups go faster than stat() system calls. The second is that both
  zip and gzip content-encoding use DEFLATE, therefore, compressed
  responses can be served via the sendfile() system call which does an
  in-kernel copy directly from the zip executable structure. Also note
  that red bean zip executables can be deployed easily to all platforms,
  since these native executables work on Linux, Mac, BSD, and Windows.

- Address sanitizer now works very well
This commit is contained in:
Justine Tunney 2020-09-06 21:39:00 -07:00
parent 7327c345f9
commit 416fd86676
230 changed files with 9835 additions and 5682 deletions

View file

@ -58,6 +58,105 @@
abort(); \
}
int64_t Bsu(int w, int h, uint64_t x, uint64_t y, uint32_t *f) {
switch (h & 7) {
case BSU_SHR:
switch (w) {
case 0:
return Shr8(x, y, f);
case 1:
return Shr16(x, y, f);
case 2:
return Shr32(x, y, f);
case 3:
return Shr64(x, y, f);
default:
unreachable;
}
case BSU_SAL:
case BSU_SHL:
switch (w) {
case 0:
return Shl8(x, y, f);
case 1:
return Shl16(x, y, f);
case 2:
return Shl32(x, y, f);
case 3:
return Shl64(x, y, f);
default:
unreachable;
}
case BSU_SAR:
switch (w) {
case 0:
return Sar8(x, y, f);
case 1:
return Sar16(x, y, f);
case 2:
return Sar32(x, y, f);
case 3:
return Sar64(x, y, f);
default:
unreachable;
}
case BSU_ROL:
switch (w) {
case 0:
return Rol8(x, y, f);
case 1:
return Rol16(x, y, f);
case 2:
return Rol32(x, y, f);
case 3:
return Rol64(x, y, f);
default:
unreachable;
}
case BSU_ROR:
switch (w) {
case 0:
return Ror8(x, y, f);
case 1:
return Ror16(x, y, f);
case 2:
return Ror32(x, y, f);
case 3:
return Ror64(x, y, f);
default:
unreachable;
}
case BSU_RCR:
switch (w) {
case 0:
return Rcr8(x, y, f);
case 1:
return Rcr16(x, y, f);
case 2:
return Rcr32(x, y, f);
case 3:
return Rcr64(x, y, f);
default:
unreachable;
}
case BSU_RCL:
switch (w) {
case 0:
return Rcl8(x, y, f);
case 1:
return Rcl16(x, y, f);
case 2:
return Rcl32(x, y, f);
case 3:
return Rcl64(x, y, f);
default:
unreachable;
}
default:
unreachable;
}
}
int64_t RunGolden(char w, int h, uint64_t x, uint64_t y, uint32_t *f) {
switch (h & 7) {
case BSU_ROR: