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

@ -31,6 +31,7 @@
#include "libc/x/xasprintf.h"
#include "tool/decode/lib/idname.h"
#include "tool/decode/lib/x86idnames.h"
#ifdef __x86_64__
#define CANIUSE(FEATURE) caniuse(#FEATURE, X86_HAVE(FEATURE))
#define SHOW(CONSTANT) show(#CONSTANT, CONSTANT)
@ -333,3 +334,5 @@ int main(int argc, char *argv[]) {
return 0;
}
#endif /* __x86_64__ */

View file

@ -47,6 +47,7 @@
#include "third_party/getopt/getopt.h"
#include "third_party/stb/stb_image.h"
#include "third_party/stb/stb_image_resize.h"
#ifdef __x86_64__
#define HELPTEXT \
"\n\
@ -616,3 +617,5 @@ int main(int argc, char *argv[]) {
munmap(rgb, ROUNDUP(size, FRAMESIZE));
return 0;
}
#endif /* __x86_64__ */

View file

@ -42,6 +42,7 @@
#include "libc/time/time.h"
#include "tool/decode/lib/flagger.h"
#include "tool/decode/lib/idname.h"
#ifdef __x86_64__
char *GetString(struct NtUnicodeString *s) {
static char buf[1024];
@ -537,3 +538,5 @@ int main(int argc, char *argv[]) {
PrintModulesMemoryOrder();
return 0;
}
#endif /* __x86_64__ */

View file

@ -1409,7 +1409,9 @@ static void OnExit(void) {
}
static void MakeLatencyLittleLessBad(void) {
#ifdef __x86_64__
_peekall();
#endif
LOGIFNEG1(sys_mlockall(MCL_CURRENT));
LOGIFNEG1(nice(-5));
}

View file

@ -25,6 +25,7 @@
#include "libc/sysv/consts/sa.h"
#include "libc/sysv/consts/sig.h"
#include "third_party/xed/x86.h"
#ifdef __x86_64__
#define OUTPATH "vdso.elf"
@ -80,3 +81,5 @@ int main(int argc, char *argv[]) {
return 0;
}
#endif /* __x86_64__ */

View file

@ -43,6 +43,7 @@ TOOL_VIZ_DIRECTDEPS = \
LIBC_X \
LIBC_ZIPOS \
NET_HTTP \
THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_DLMALLOC \
THIRD_PARTY_GDTOA \
THIRD_PARTY_GETOPT \
@ -81,7 +82,8 @@ o/$(MODE)/tool/viz/printimage.com.dbg: \
o/$(MODE)/tool/viz/printimage.com: \
o/$(MODE)/tool/viz/printimage.com.dbg \
o/$(MODE)/third_party/zip/zip.com \
o/$(MODE)/tool/build/symtab.com
o/$(MODE)/tool/build/symtab.com \
$(VM)
@$(MAKE_OBJCOPY)
@$(MAKE_SYMTAB_CREATE)
@$(MAKE_SYMTAB_ZIP)
@ -89,7 +91,8 @@ o/$(MODE)/tool/viz/printimage.com: \
o/$(MODE)/tool/viz/printvideo.com: \
o/$(MODE)/tool/viz/printvideo.com.dbg \
o/$(MODE)/third_party/zip/zip.com \
o/$(MODE)/tool/build/symtab.com
o/$(MODE)/tool/build/symtab.com \
$(VM)
@$(MAKE_OBJCOPY)
@$(MAKE_SYMTAB_CREATE)
@$(MAKE_SYMTAB_ZIP)