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>
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
name: Windows arm64
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: windows-11-arm
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { sys: clangarm64, env: clang-aarch64, arch: arm64}
|
|
|
|
fail-fast: false
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
install: mingw-w64-${{matrix.env}}-clang mingw-w64-${{matrix.env}}-toolchain make diffutils git libzstd-devel
|
|
msystem: ${{matrix.sys}}
|
|
|
|
- name: install host sbcl
|
|
shell: pwsh
|
|
run: |
|
|
choco install sbcl -source tools-for-build
|
|
- name: install WiX Toolset
|
|
shell: pwsh
|
|
run: |
|
|
choco install wixtoolset
|
|
$wixPath = (Get-ChildItem "C:\Program Files (x86)\WiX Toolset*" | Select-Object -First 1).FullName
|
|
echo "WIX=$wixPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
- name: build
|
|
env:
|
|
SBCL_HOME: "/c/Program Files/Steel Bank Common Lisp/1.4.14"
|
|
run: |
|
|
PATH=$PATH:"/c/Program Files/Steel Bank Common Lisp/1.4.14"
|
|
export PATH
|
|
./make.sh --arch=${{matrix.arch}} --with-sb-core-compression --xc-host='sbcl --lose-on-corruption --disable-ldb --disable-debugger'
|
|
- name: make installer
|
|
env:
|
|
WIX: ${{ env.WIX }}
|
|
run: |
|
|
./make-windows-installer.sh
|
|
mkdir sbcl-windows-installer; mv output/*msi sbcl-windows-installer
|
|
- name: save installer
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sbcl-windows-installer-${{ matrix.sys }}
|
|
path: sbcl-windows-installer
|
|
- name: tests
|
|
continue-on-error: true
|
|
working-directory: tests
|
|
run: ./run-tests.sh
|
|
- name: ansi-tests
|
|
continue-on-error: true
|
|
working-directory: tests
|
|
run: ./ansi-tests.sh
|
|
|
|
|
|
|