Make improvements

- You can now run `make -j8 toolchain` on Windows
- You can now run `make -j` on MacOS ARM64 and BSD OSes
- You can now use our Emacs dev environment on MacOS/Windows
- Fix bug where the x16 register was being corrupted by --ftrace
- The programs under build/bootstrap/ are updated as fat binaries
- The Makefile now explains how to download cosmocc-0.0.12 toolchain
- The build scripts under bin/ now support "cosmo" branded toolchains
- stat() now goes faster on Windows (shaves 100ms off `make` latency)
- Code cleanup and added review on the Windows signal checking code
- posix_spawnattr_setrlimit() now works around MacOS ARM64 bugs
- Landlock Make now favors posix_spawn() on non-Linux/OpenBSD
- posix_spawn() now has better --strace logging on Windows
- fstatat() can now avoid EACCES in more cases on Windows
- fchmod() can now change the readonly bit on Windows
This commit is contained in:
Justine Tunney 2023-10-14 20:57:15 -07:00
parent 06c6baaf50
commit c9fecf3a55
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
109 changed files with 1188 additions and 454 deletions

View file

@ -68,14 +68,15 @@ ftrace_hook:
#elif defined(__aarch64__)
adrp x16,__ftrace
ldr w16,[x16,#:lo12:__ftrace]
cmp w16,0
ble 1f
stp x29,x30,[sp,-384]!
mov x29,sp
stp x0,x1,[sp,16]
adrp x0,__ftrace
ldr w0,[x0,#:lo12:__ftrace]
cmp w0,0
ble 1f
stp x2,x3,[sp,32]
stp x4,x5,[sp,48]
stp x6,x7,[sp,64]
@ -83,12 +84,12 @@ ftrace_hook:
stp x10,x11,[sp,96]
stp x12,x13,[sp,112]
stp x14,x15,[sp,128]
str x19,[sp,160]
stp x16,x19,[sp,160]
stp x20,x21,[sp,176]
stp x22,x23,[sp,192]
stp x24,x25,[sp,208]
stp x26,x27,[sp,224]
str x28,[sp,240]
stp x17,x28,[sp,240]
stp q0,q1,[sp,256]
stp q2,q3,[sp,288]
stp q4,q5,[sp,320]
@ -96,27 +97,27 @@ ftrace_hook:
bl ftracer
ldp x0,x1,[sp,16]
ldp x2,x3,[sp,32]
ldp x4,x5,[sp,48]
ldp x6,x7,[sp,64]
ldp x8,x9,[sp,80]
ldp x10,x11,[sp,96]
ldp x12,x13,[sp,112]
ldp x14,x15,[sp,128]
ldr x19,[sp,160]
ldp x20,x21,[sp,176]
ldp x22,x23,[sp,192]
ldp x24,x25,[sp,208]
ldp x26,x27,[sp,224]
ldr x28,[sp,240]
ldp q0,q1,[sp,256]
ldp q2,q3,[sp,288]
ldp q4,q5,[sp,320]
ldp q6,q7,[sp,352]
ldp q4,q5,[sp,320]
ldp q2,q3,[sp,288]
ldp q0,q1,[sp,256]
ldp x17,x28,[sp,240]
ldp x26,x27,[sp,224]
ldp x24,x25,[sp,208]
ldp x22,x23,[sp,192]
ldp x20,x21,[sp,176]
ldp x16,x19,[sp,160]
ldp x14,x15,[sp,128]
ldp x12,x13,[sp,112]
ldp x10,x11,[sp,96]
ldp x8,x9,[sp,80]
ldp x6,x7,[sp,64]
ldp x4,x5,[sp,48]
ldp x2,x3,[sp,32]
1: ldp x0,x1,[sp,16]
ldp x29,x30,[sp],384
1: ret
ret
#endif /* __x86_64__ */
.endfn ftrace_hook,globl,hidden