mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
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:
parent
7327c345f9
commit
416fd86676
230 changed files with 9835 additions and 5682 deletions
28
tool/build/lib/address.h
Normal file
28
tool/build/lib/address.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_ADDRESS_H_
|
||||
#define COSMOPOLITAN_TOOL_BUILD_LIB_ADDRESS_H_
|
||||
#include "libc/assert.h"
|
||||
#include "third_party/xed/x86.h"
|
||||
#include "tool/build/lib/machine.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
uint64_t AddressDi(struct Machine *, uint32_t);
|
||||
uint64_t AddressSi(struct Machine *, uint32_t);
|
||||
uint64_t DataSegment(struct Machine *, uint32_t, uint64_t);
|
||||
uint64_t AddSegment(struct Machine *, uint32_t, uint64_t, uint8_t[8]);
|
||||
uint8_t *GetSegment(struct Machine *, uint32_t, int) nosideeffect;
|
||||
|
||||
forceinline uint64_t MaskAddress(uint32_t mode, uint64_t x) {
|
||||
if (mode != XED_MODE_LONG) {
|
||||
if (mode == XED_MODE_REAL) {
|
||||
x &= 0xffff;
|
||||
} else {
|
||||
x &= 0xffffffff;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_ADDRESS_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue