Commit graph

357 commits

Author SHA1 Message Date
arthur bdc8c073cf Basic support for avx512 2026-07-01 04:31:38 +03:00
Sylvia Harrington cb716e24d6 sb-simd: arm64 support 2026-07-01 01:15:08 +03:00
Piotr Kubaj db0328683b ppc64: fix big-endian ELFv2 build
There are numerous assumptions that big-endian => ELFv1, little-endian
=> ELFv2. That is incorrect, there are systems running on big-endian
ELFv2.
2026-06-06 18:36:03 +02:00
Stas Boukarev e18fb41b84 More windows-arm64 fixes
The main one is creating a fake_foreign_function_call around calls to
sub_gc.
2026-02-15 01:38:24 +03:00
SANO,Masatoshi aa0fa1c56e Add ARM64 Windows platform support
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>
2026-02-12 21:44:09 +03:00
ZiLong Wang 2a32af6a0f Add loongarch in make-config.sh 2026-01-19 06:34:44 +03:00
Piotr Kubaj b5f29ccede Add support for powerpc, powerpc64 and powerpc64le on FreeBSD
powerpc64le is tested by self-hosted recompilation. powerpc64 and
powerpc currently untested.
2026-01-15 21:53:59 +00:00
Douglas Katzman cd959e7086 Rename :avoid-clock-gettime
And rely on tree-shaker to remove unused symbols
2025-08-12 16:37:52 -04:00
Douglas Katzman c6f4cadb11 Rename a feature to :os-provides-thing instead of :avoid-
I'll fix :avoid-clock-gettime separately (this one was easier)
2025-08-12 11:18:51 -04:00
Stas Boukarev f4da14d6e4 Remove where-is-mcontext.c
That's pretty old. Using the same code for ppc32/ppc64 appears to
work.
2024-11-09 21:16:33 +03:00
Stas Boukarev 8d02e6a913 Build sb-perf only on linux. 2024-03-08 16:28:33 +03:00
Christophe Rhodes 116a4aaa8f Use SOURCE_DATE_EPOCH if set in build-id.inc
Based on an OpenSUSE patch suggested by Bernhard M. Wiedemann
2024-02-29 22:11:17 +00:00
Stas Boukarev 90a81f8394 Check for a compatible posix_spawn. 2024-02-06 23:18:51 +03:00
Douglas Katzman d16d1140f1 Remove FIXME
Rev aed385536b added SB-IMPL:+INTERNAL-FEATURES+
2023-11-26 20:28:15 -05:00
Sebastien Marie 8d883c0713 ppc code doesn't support gcc-tls, do not try to use it for openbsd-powerpc 2023-11-25 12:28:27 +03:00
Kirill A. Korinsky 11533f4e45 Darwin: fix build without legacy support library
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.
2023-08-30 22:37:22 +02:00
Sergey Fedorov f2ab0c4dc8 ppc/Darwin: Misc fixes for PPC 2023-08-30 22:37:22 +02:00
Kirill A. Korinsky 64e971b975 Darwin: recovery support non dispatch semaphores
See: 160448fd04
2023-08-30 22:37:22 +02:00
Kirill A. Korinsky 26c3b0b439 x86/Darwin: Revert x86-darwin files
See:
 - 75a9f0dc55
 - 7bd2ec99c7
2023-08-30 22:37:22 +02:00
Sébastien Marie 9fe9cc37a5 openbsd: enable :gcc-tls build
Few adjustement in asm aarch64 code to reach __thread variable via emutls
implementation.
2023-08-10 13:46:24 -04:00
Stas Boukarev 70a4741793 Faster canonicalize-whitespace
Don't write any files if they have not changed.
2023-08-04 23:12:44 +03:00
Stas Boukarev 15e7e061de Speed up make-config.sh on darwin-arm64
macOS likes to phone home for each newly compiled executable, hardcode
the output of grovel-features.sh
2023-08-04 23:12:33 +03:00
Douglas Katzman 6bcc976b70 Remove all remnants of FSHOW and QSHOW
Keep whatever little bit of C code was enabled by qshow for #+win32,
and good riddance to everything else.
2023-07-15 11:58:25 -04:00
Douglas Katzman a0cce53130 Enable gcc-tls for x86-64 on macOS 2023-07-15 11:37:59 -04:00
Douglas Katzman 7a313e819a Fix for pedantic shell such as on SunOS 2023-06-29 15:03:42 -04:00
Gleefre 562a1a329a Add android build system (crosscompiling with NDK)
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
2023-04-21 15:08:19 -04:00
Stas Boukarev 4fa1562c28 Use wrappers for sb-posix:stat again on x86-64.
Some systems don't work without wrappers.

Probably fixes lp#2013110
2023-03-28 20:55:27 +03:00
Stas Boukarev bb95badc18 Don't use :largefile on 64 bit systems.
It's not needed after a826687375
2023-03-15 02:28:11 +03:00
Stas Boukarev 35653abcf9 Survive if there's no support __builtin_cpu_init for avx2.c 2023-03-13 21:54:48 +03:00
Stas Boukarev 5bfc749bda Largefile support on linux-arm64.
Fixes lp#2011453
2023-03-13 20:41:33 +03:00
Stas Boukarev a2c61499ae Enable immobile-space on windows. 2022-11-01 00:10:33 +03:00
Stas Boukarev 9bf8ab85e6 Don't build sb-simd if the host doesn't support AVX2. 2022-06-21 16:59:23 +03:00
Stas Boukarev 3189adf43f Rename CONTRIB_BLOCKLIST to SBCL_CONTRIB_BLOCKLIST.
And read its value in make-config.sh
2022-06-21 13:59:06 +03:00
Marco Heisig 724690647b Merge sb-simd.
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!
2022-06-21 07:59:31 +02:00
Marco Heisig 27d56363fc Contribs can now be disabled individually with --without-CONTRIB.
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 :)
2022-06-21 07:59:31 +02:00
Douglas Katzman 7bd2ec99c7 Fail early in make-config on unbuildable x86+darwin
If this change draws no objections during freeze/testing, all the
obsolete files can be pruned for the release after this month's.
2022-06-15 17:24:02 -04:00
Douglas Katzman 9410e43291 Simplify configuration
When testing x86-64 without immobile-space you now only have to remove
that one feature, and the dependennt features are disabled automatically.
2022-05-13 11:13:40 -04:00
Douglas Katzman d692ebfd67 Disable :mach-exception-handler for x86-64 darwin
Per https://groups.google.com/g/sbcl-devel/c/-bFBJJPFgww/m/NpPqWZvQBQAJ
2022-05-12 13:59:56 -04:00
Douglas Katzman 813250e7d7 Remove obsolete selections from make-config
* Sparc allows only gencgc, not cheneygc
* PPC/Darwin was removed
2022-04-26 11:07:20 -04:00
Charles Zhang 00770c602d riscv: Fix SB-THREAD.
And enable it by default so it doesn't break again.
2022-03-09 02:22:26 -08:00
Douglas Katzman 6cf18c77e2 sparc: Simplify build junk
* 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
2022-03-08 10:04:52 -05:00
Stas Boukarev e31821b925 Don't enable sb-thread on freebsd correctly.
This time.
2021-12-20 19:26:35 +03:00
Stas Boukarev 958837d5df Don't enable sb-thread on freebsd-x86-64 by default just yet.
sb-concurrency has failing tests.
2021-12-18 21:09:48 +03:00
Stas Boukarev ac3739eae3 Support freebsd-arm64 2021-12-18 17:56:22 +03:00
Stas Boukarev d64ea8e624 Enable gcc-tls on arm64-darwin. 2021-10-20 02:59:13 +03:00
Douglas Katzman 633de0ca28 Remove obsolete :linkage-table from make-config
: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.
2021-04-20 12:06:55 -04:00
Douglas Katzman 2562793b3e Remove :SB-WTIMER feature
Keep the win32 implementation obviously.
Enable the formerly disabled timer tests on darwin + safepoint.
2021-03-04 18:47:30 -05:00
Douglas Katzman 5de51c1ffd Remove :SB-THRUPTION feature keyword
Everything it guarded is changed to test :SB-SAFEPOINT instead.
2021-03-03 00:20:53 -05:00
Douglas Katzman f4e0b865e4 Remove safepoint-strictly
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.
2021-03-01 17:54:13 -05:00
Stas Boukarev 57f0140859 Darwin ARM64 support.
Not complete yet.
2021-02-03 22:54:31 +03:00