Add complete ARM64 Windows (AArch64 WoA) support to SBCL. This
enables building and running SBCL natively on Windows 11 ARM devices.
Key design decisions:
- x18 register reserved as TEB pointer (Windows ARM64 ABI requirement),
matching the existing Darwin reservation
- Safepoint GC with fake_foreign_function_call to save register context
for precise stack scanning (ARM64 uses separate C and control stacks)
- VEH (Vectored Exception Handling) for ARM64, decoding BRK instructions
which Windows reports as EXCEPTION_ILLEGAL_INSTRUCTION
- sb_udivmodti4 takes hi/lo split arguments to avoid __uint128_t ABI
issues on LLP64 where unsigned long is 32 bits
- FP exception traps disabled (ARM64 Windows does not deliver FP
exceptions even with FPCR trap bits set)
- Dynamic space pages committed on demand (Windows reserves but does
not commit the full dynamic space upfront)
New files:
- src/runtime/Config.arm64-win32: Build configuration
- src/runtime/arm64-win32-os.c: OS layer (VEH, context access, FP)
- src/runtime/arm64-win32-os.h: Platform header
- .github/workflows/windows-arm64.yml: CI workflow
Modified files grouped by subsystem:
Runtime (ARM64-specific):
- arm64-arch.c: Windows memory APIs, LLP64-safe pointer storage,
sb_udivmodti4 split-argument ABI, static space NIL header guard
- arm64-assem.S: Windows calling conventions for call_into_lisp and
call_into_c, TlsGetValue for thread pointer, x18 reservation
Runtime (Windows general):
- win32-os.c: ARM64 safepoint page handling, BRK exception decode,
ARM64 VEH, dynamic space page commit, ARM64 debug printing
Compiler:
- vm.lisp: Reserve x18 on Windows (matching Darwin)
- c-call.lisp: Don't zero control-stack-pointer on Windows (not FFCA)
- parms.lisp: Address space layout for Windows ARM64
- tramps.lisp: Save CSP to thread for GC, don't zero CSP on Windows
- genesis.lisp: GC_SAFEPOINT_PAGE_ADDR for non-x86-64 platforms
- parms.lisp (generic): Update safepoint space comment
- debug-int.lisp: NFP handling for ARM64 Windows
- float-trap.lisp: Disable FP traps on ARM64 Windows
- coreparse.c: ARM64 guard for TEXT_SPACE_START assignment
Build system:
- make-config.sh: ARM64 Windows detection and feature flags
- make-windows-installer.sh: ARM64 architecture in installer
CI:
- linux-arm64.yml, mac.yml: Robustness fixes for repo naming
- windows-arm64.yml: New workflow for ARM64 Windows builds
Tests:
- subr.sh: Auto-detect sbcl.exe on Windows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SBCL can be build on macOS 10.5 by avoiding two things:
`pthread_setname_np` which is useless, and `clock_gettime` which
requires some works to be emulated on the right way.
Uses NDK as C crosscompiler and ADB to run code on the target device.
Uses both :linux and :android features (android is almost a linux).
It also reserves a folder android-libs/ for putting precompiled
libraries to link agains (for example zstd for core compression).
See doc/internals-notes/Android-build.txt for more details
This commit contains the sb-simd contrib in its most recent form. The
original sb-simd repository will be archived, and development of sb-simd
will now be a part of the regular SBCL development. Thanks for everyone
who made this work possible!
This mechanism allows developers to selectively disable the build of
certain contribs. Each --without-CONTRIB flag supplied to make.sh ends up
in the CONTRIB_BLOCKLIST variable that is part of the build configuration.
Each contrib that is mentioned in that blocklist is neither built nor
tested.
I hope this mechanism makes the enormous compile times of my sb-simd
contrib a bit more tolerable :)
* Don't bother with FUNCDEF. I've seen make-config pick the wrong definition.
Not sure how or why. Apart from call_into_lisp, most of the assembly code
could be written as lisp asm routines anyway.
* Remove dead code in sparc-arch.c
* Don't offer a choice of cheneygc
:LINKAGE-TABLE wasn't present in *FEATURES* since rev 5efa93883f, so users
can't have been testing for it for quite some time.
LOAD-COLD-FOREIGN-SYMBOL-TABLE simply does not exist any more.
And 'sbcl.nm' ceased being produced in rev cf6a01774b.
Implement signal-handling properly, not because linux+safepoint is expected
to work, but because the "strictly" mode was horrifically wrong by calling
pthread_create() in a signal handler, so this change removes that.