[PATCH 10/13] Recognize loongarch64 path in src/cold
| Newsgroups | gmane.lisp.steel-bank.devel |
|---|---|
| Message-ID | <[email protected]> |
This patch updates src/cold to correctly recognize LoongArch64 paths. _______________________________________________ Sbcl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-devel
0010-recognize-loongarch64-path-in-src-cold.patch
(application/octet-stream, 4.1 KB)
From 51a3fc30e7863d764b190d95172c5128cc446e1a Mon Sep 17 00:00:00 2001 From: ZiLong Wang <[email protected]> Date: Sat, 17 Jan 2026 10:28:46 +0800 Subject: [PATCH 10/13] recognize loongarch path in src/cold --- src/cold/base-target-features.lisp-expr | 2 ++ src/cold/build-order.lisp-expr | 1 + src/cold/chill.lisp | 2 +- src/cold/exports.lisp | 4 ++-- src/cold/shared.lisp | 2 +- src/cold/shebang.lisp | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cold/base-target-features.lisp-expr b/src/cold/base-target-features.lisp-expr index 946c1a604..7f2cf2b59 100644 --- a/src/cold/base-target-features.lisp-expr +++ b/src/cold/base-target-features.lisp-expr @@ -353,6 +353,8 @@ ;; an ARMv8 AArch64 CPU ;; :riscv ;; A RISC-V CPU. + ;; :loongarch64 + ;; 64-bit LoongArch CPU ;; (CMU CL also had a :pentium feature, which affected the definition ;; of some floating point vops. It was present but not enabled or ;; documented in the CMU CL code that SBCL is derived from, and has diff --git a/src/cold/build-order.lisp-expr b/src/cold/build-order.lisp-expr index 5df1afda2..1ddcb9b23 100644 --- a/src/cold/build-order.lisp-expr +++ b/src/cold/build-order.lisp-expr @@ -503,6 +503,7 @@ #+arm ("src/code/arm-vm" :not-host) #+arm64 ("src/code/arm64-vm" :not-host) #+riscv ("src/code/riscv-vm" :not-host) + #+loongarch64 ("src/code/loongarch64-vm" :not-host) #+(or arm64 x86-64) ("src/code/simd-fndb") diff --git a/src/cold/chill.lisp b/src/cold/chill.lisp index 20069e077..cd770228b 100644 --- a/src/cold/chill.lisp +++ b/src/cold/chill.lisp @@ -30,7 +30,7 @@ (package-name sb-assem::*backend-instruction-set-package*)) (defun target-platform-keyword () - (let ((arch (intersection '(:arm :arm64 :mips :ppc :ppc64 :riscv :sparc :x86 :x86-64) *features*))) + (let ((arch (intersection '(:arm :arm64 :loongarch64 :mips :ppc :ppc64 :riscv :sparc :x86 :x86-64) *features*))) (assert (= (length arch) 1)) (car arch))) diff --git a/src/cold/exports.lisp b/src/cold/exports.lisp index 737c18b94..91ebfd9f0 100644 --- a/src/cold/exports.lisp +++ b/src/cold/exports.lisp @@ -2997,8 +2997,8 @@ structure representations") "GENCGC-CARD-BYTES" "GENCGC-PAGE-BYTES" "GENCGC-ALLOC-GRANULARITY" - #+(or arm64 ppc ppc64 sparc riscv) "PSEUDO-ATOMIC-INTERRUPTED-FLAG" - #+(or arm64 ppc ppc64 sparc riscv) "PSEUDO-ATOMIC-FLAG" + #+(or arm64 ppc ppc64 sparc riscv loongarch64) "PSEUDO-ATOMIC-INTERRUPTED-FLAG" + #+(or arm64 ppc ppc64 sparc riscv loongarch64) "PSEUDO-ATOMIC-FLAG" #+sb-safepoint "GLOBAL-SAFEPOINT-TRAP" "HALT-TRAP" "IGNORE-ME-SC-NUMBER" "IMMEDIATE-SC-NUMBER" diff --git a/src/cold/shared.lisp b/src/cold/shared.lisp index 9a91cb4ab..60edd0fb0 100644 --- a/src/cold/shared.lisp +++ b/src/cold/shared.lisp @@ -368,7 +368,7 @@ ;;; failure is (not always obvious from when the build fails). (let ((feature-compatibility-tests '(("(and sb-safepoint (not sb-thread))" ":SB-SAFEPOINT requires :SB-THREAD") - ("(and sb-thread (not (or riscv ppc ppc64 x86 x86-64 arm64)))" + ("(and sb-thread (not (or riscv ppc ppc64 x86 x86-64 arm64 loongarch64)))" ":SB-THREAD not supported on selected architecture") ("(and mark-region-gc (not (or x86-64 arm64)))" "mark-region is not supported on selected architecture") diff --git a/src/cold/shebang.lisp b/src/cold/shebang.lisp index 89e79a400..64ebdbb98 100644 --- a/src/cold/shebang.lisp +++ b/src/cold/shebang.lisp @@ -25,7 +25,7 @@ (defvar sb-xc:*features*) (defun target-platform-keyword (&aux (features sb-xc:*features*)) - (let ((arch (intersection '(:arm :arm64 :mips :ppc :ppc64 :riscv :sparc :x86 :x86-64) + (let ((arch (intersection '(:arm :arm64 :loongarch64 :mips :ppc :ppc64 :riscv :sparc :x86 :x86-64) features))) (cond ((not arch) (error "No architecture selected")) ((> (length arch) 1) (error "More than one architecture selected"))) -- 2.20.1