Port a lot more code to AARCH64

- Introduce epoll_pwait()
- Rewrite -ftrapv and ffs() libraries in C code
- Use more FreeBSD code in math function library
- Get significantly more tests passing on qemu-aarch64
- Fix many Musl long double functions that were broken on AARCH64
This commit is contained in:
Justine Tunney 2023-05-14 09:32:15 -07:00
parent 91791e9f38
commit 550b52abf6
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
158 changed files with 6018 additions and 3499 deletions

View file

@ -54,6 +54,7 @@ TOOL_NET_DIRECTDEPS = \
NET_HTTP \
NET_HTTPS \
THIRD_PARTY_ARGON2 \
THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_GDTOA \
THIRD_PARTY_GETOPT \
THIRD_PARTY_LINENOISE \

View file

@ -139,8 +139,10 @@
STATIC_STACK_SIZE(0x40000);
STATIC_YOINK("zip_uri_support");
#if !IsTiny()
#ifdef __x86_64__
STATIC_YOINK("ShowCrashReportsEarly");
#endif
#endif
/**
* @fileoverview redbean - single-file distributable web server
@ -171,8 +173,8 @@ STATIC_YOINK("ShowCrashReportsEarly");
#define MONITOR_MICROS 150000
#define READ(F, P, N) readv(F, &(struct iovec){P, N}, 1)
#define WRITE(F, P, N) writev(F, &(struct iovec){P, N}, 1)
#define LockInc(P) asm volatile("lock incq\t%0" : "=m"(*(P)))
#define LockDec(P) asm volatile("lock decq\t%0" : "=m"(*(P)))
#define LockInc(P) (*(_Atomic(typeof(*(P))) *)(P))++
#define LockDec(P) (*(_Atomic(typeof(*(P))) *)(P))--
#define AppendCrlf(P) mempcpy(P, "\r\n", 2)
#define HasHeader(H) (!!cpm.msg.headers[H].a)
#define HeaderData(H) (inbuf.p + cpm.msg.headers[H].a)