mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
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>
36 lines
1.2 KiB
Bash
36 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
# This software is part of the SBCL system. See the README file for
|
|
# more information.
|
|
#
|
|
# This software is derived from the CMU CL system, which was
|
|
# written at Carnegie Mellon University and released into the
|
|
# public domain. The software is in the public domain and is
|
|
# provided with absolutely no warranty. See the COPYING and CREDITS
|
|
# files for more information.
|
|
|
|
WIX_PATH=$WIX/bin
|
|
|
|
SBCL_TOP=../
|
|
cd ./output
|
|
|
|
"$SBCL_TOP/src/runtime/sbcl" --noinform --core "$SBCL_TOP/output/sbcl.core" \
|
|
--disable-debugger --no-sysinit --no-userinit \
|
|
--load ../tools-for-build/rtf.lisp \
|
|
--load ../tools-for-build/wxs.lisp \
|
|
--eval '(progn
|
|
(write-rtf (read-text "../COPYING") "License.rtf")
|
|
(write-wxs "sbcl.wxs")
|
|
(with-open-file (f "version.txt"
|
|
:direction :output
|
|
:if-exists :supersede)
|
|
(format f "~a-~a-windows-binary"
|
|
(lisp-implementation-version)
|
|
#+x86 "x86" #+x86-64 "x86-64" #+arm64 "arm64"))
|
|
(exit))'
|
|
|
|
"$WIX_PATH/candle" sbcl.wxs
|
|
"$WIX_PATH/light" sbcl.wixobj \
|
|
-ext "$WIX_PATH/WixUIExtension.dll" -cultures:en-us \
|
|
-out sbcl-`cat version.txt`.msi
|