<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6fda2a62d1d5333e83080ba93834594bf77622f2">https://github.com/macports/macports-ports/commit/6fda2a62d1d5333e83080ba93834594bf77622f2</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 6fda2a62d1d sbcl: pin 2.2.5 before 10.7
</span>6fda2a62d1d is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6fda2a62d1d5333e83080ba93834594bf77622f2
</span>Author: Kirill A. Korinsky <kirill@korins.ky>
AuthorDate: Tue Jun 6 19:04:53 2023 +0200
<span style='display:block; white-space:pre;color:#404040;'> sbcl: pin 2.2.5 before 10.7
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> I've pin 2.2.5 before 10.7 for everything, to make support much easy.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> PowerPC support was backported from 2.2.2 into 2.2.5.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> I also reorganized patches to keep it as git trees.
</span>---
lang/sbcl/Portfile | 103 +-
...g-when-root-directory-contain-non-ASCII-c.patch | 26 +
....diff => 0002-add-MacPorts-XDG_DATA_DIRS.patch} | 14 +-
...NOTONIC-when-CLOCK_PROCESS_CPUTIME_ID-un.patch} | 14 +-
lang/sbcl/files/0004-Disable-pdf-manual.patch | 22 +
lang/sbcl/files/0005-Use-MacPorts-zstd.patch | 43 +
...rwin-disable-custom-nanosleep-before-10.6.patch | 46 +
...-recovery-support-non-dispatch-semaphores.patch | 135 +++
...win-mask-out-O_LARGEFILE-in-fcntl.1-test.patch} | 15 +-
...> 1004-x86-Darwin-revert-OS_THREAD_STACK.patch} | 15 +-
...x86-Darwin-fix-build-by-old-preprocessor.patch} | 15 +-
...6-Darwin-disable-failing-stat-mode-tests.patch} | 18 +-
...1007-x86-Darwin-add-missed-OS_CONTEXT_PC.patch} | 11 +
.../files/1008-x86-Darwin-fix-syntax-typos.patch | 40 +
...-Revert-Delete-support-for-and-darwin-ppc.patch | 1191 ++++++++++++++++++++
...Config.ppc-use-right-compiler-and-deploym.patch | 49 +
...ppc-assem.S-fix-wrong-assembler-code-chun.patch | 35 +
.../files/1012-ppc-Darwin-Misc-fixes-for-PPC.patch | 80 ++
...Darwin-make-config.sh-use-gcc-tls-for-ppc.patch | 26 +
...ppc-assem-a-minor-fix-to-assembler-syntax.patch | 33 +
lang/sbcl/files/patch-config-darwin-arm64.diff | 13 -
lang/sbcl/files/patch-config-darwin-x86_64.diff | 13 -
.../patch-contrib-sb-posix-posix-tests.lisp.diff | 12 -
lang/sbcl/files/patch-make-doc.diff | 8 -
lang/sbcl/files/patch-use-right-gcc.diff | 12 -
25 files changed, 1864 insertions(+), 125 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/Portfile b/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c782a3d1bb1..c252cad2935 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,7 +11,7 @@ name sbcl
</span> # Please bump the revision of math/maxima (and when it exists
# math/maxima-devel) and fricas when this port changes.
version 2.3.5
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
categories lang
license BSD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -33,62 +33,50 @@ master_sites sourceforge
</span>
use_bzip2 yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-contrib-sb-posix-posix-tests.lisp.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-macports-xdg-data-dir.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-missed-CLOCK_PROCESS_CPUTIME_ID.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See: https://github.com/catap/sbcl/tree/macports
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles 0001-fix-building-when-root-directory-contain-non-ASCII-c.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0002-add-MacPorts-XDG_DATA_DIRS.patch
</span>
checksums rmd160 95a02d7a489137602ebba333b83bfc1d9eb794be \
sha256 89c90720cf9d05dbcd90d690e381a2514c0f1807159e0d7222220c5a8c2d5186 \
size 7474392
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# NOTE: keep so-called legacy version of SBCL on everything before 10.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Historically 2.2.5 was the last version with support x86/Darwin, and 2.2.2 was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# the last version with ppc/Darwin. We had backported support of ppc/Darwin to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# 2.2.5 and use it as baseline for legacy version.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.platform} eq "darwin" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version 2.2.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ epoch 1
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.major} < 10} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 1.3.9 is the last version of SBCL which can be build before 10.6
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 1.3.9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- epoch 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 55225af6c20d39db1b158b7c07685ff6e3a8d5bf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 8584b541370fd6ad6e58d3f97982077dfcab240f30d4e9b18f15da91c2f13ed1 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 7029912
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 d0da4fd941890372f3558bafb18433497c67c0ee \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 af0f09d4379113dfd5aa255279cb3df9cb9cac0bcd65369cc43dd857ca51de6e \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 5758174
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {${configure.build_arch} eq "ppc"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2.2.2 is the last version of SBCL with ppc-Darwin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 2.2.2
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- epoch 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 4960ccd562302f3223e2db7d32b9ecc50cf76536 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 8790dbbe97711dce14bb823125ce5b185b0073cf2f3cbf37bdd1ad380e7950f6 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 6716272
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- universal_variant no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } elseif {${configure.build_arch} eq "i386"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # 2.2.5 is the last version of SBCL support of with i386-Darwin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- version 2.2.5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- revision 0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- epoch 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 55225af6c20d39db1b158b7c07685ff6e3a8d5bf \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 8584b541370fd6ad6e58d3f97982077dfcab240f30d4e9b18f15da91c2f13ed1 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 7029912
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-i386-mask-out-O_LARGEFILE-in-fcntl-1-test.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-i386-revert-OS_THREAD_STACK.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-i386-old-preprocessor.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-i386-contrib-sb-posix-posix-tests.lisp.diff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-i386-missed-context.diff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- universal_variant no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-platform darwin powerpc {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See: https://github.com/catap/sbcl/tree/macports-legacy
</span> patchfiles-append \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-use-right-gcc.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1001-Darwin-disable-custom-nanosleep-before-10.6.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1002-Darwin-recovery-support-non-dispatch-semaphores.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1003-x86-Darwin-mask-out-O_LARGEFILE-in-fcntl.1-test.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1004-x86-Darwin-revert-OS_THREAD_STACK.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1005-x86-Darwin-fix-build-by-old-preprocessor.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1006-x86-Darwin-disable-failing-stat-mode-tests.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1007-x86-Darwin-add-missed-OS_CONTEXT_PC.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1008-x86-Darwin-fix-syntax-typos.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1009-ppc-Darwin-Revert-Delete-support-for-and-darwin-ppc.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1010-ppc-Darwin-Config.ppc-use-right-compiler-and-deploym.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1011-ppc-Darwin-ppc-assem.S-fix-wrong-assembler-code-chun.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1012-ppc-Darwin-Misc-fixes-for-PPC.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1013-ppc-Darwin-make-config.sh-use-gcc-tls-for-ppc.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1014-ppc-Darwin-ppc-assem-a-minor-fix-to-assembler-syntax.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # NOTE: Mach exception handler was a pain and was removed since 2.2.9,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # let me disabled it anyway that makes things more consistent and allows to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # avoid issues by different SDK / XCode version for legacy systems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See: https://github.com/sbcl/sbcl/commit/7026bb841aa63c4d43339afb49d837a4497c468a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.post_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --without-mach-exception-handler
</span> }
distfiles ${name}-${version}-source${extract.suffix}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -99,6 +87,9 @@ depends_build-append \
</span>
# clock_gettime
legacysupport.newest_darwin_requires_legacy 15
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# NOTE: check that it can be removed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0003-Use-CLOCK_MONOTONIC-when-CLOCK_PROCESS_CPUTIME_ID-un.patch
</span>
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -146,15 +137,15 @@ build.args-append \
</span> --prefix=${prefix} \
--xc-host=${prefix}/libexec/sbcl-bootstrap/bin/sbcl
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${build_arch} eq "i386"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${configure.build_arch} eq "i386"} {
</span> build.args-append \
--arch=x86
<span style='display:block; white-space:pre;background:#ffe0e0;'>-} elseif {${build_arch} eq "x86_64"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} elseif {${configure.build_arch} eq "x86_64"} {
</span> build.args-append \
--arch=x86-64
} else {
build.args-append \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- --arch=${build_arch}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --arch=${configure.build_arch}
</span> }
post-build {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -163,12 +154,14 @@ post-build {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {![variant_isset threads] && ${build_arch} ne "ppc"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# NOTE seems that threads never works on PowerPC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See: https://github.com/sbcl/sbcl/commit/33a6b2817f3e2a8cf98d162a2b40c50d259295c4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {![variant_isset threads] && ${configure.build_arch} ne "ppc"} {
</span> default_variants +fancy
}
variant html conflicts pdf description {Installs documentation in HTML and Info formats.} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append patch-make-doc.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0004-Disable-pdf-manual.patch
</span> depends_build-append bin:texi2dvi:texinfo
depends_build-append bin:makeinfo:texinfo
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -191,7 +184,7 @@ variant fancy conflicts threads description {Configure SBCL compilation with all
</span> if {[vercmp ${version} 2.2.6] >= 0} {
depends_lib-delete port:zlib
depends_lib-append port:zstd
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patchfiles-append patch-config-darwin-${build_arch}.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append 0005-Use-MacPorts-zstd.patch
</span>
post-patch {
reinplace -W ${worksrcpath} "s|@@PREFIX@@|${prefix}|g" \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/0001-fix-building-when-root-directory-contain-non-ASCII-c.patch b/lang/sbcl/files/0001-fix-building-when-root-directory-contain-non-ASCII-c.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..41076c7d629
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/0001-fix-building-when-root-directory-contain-non-ASCII-c.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From e15ff18d708f21060c0559acabd0c94907e5cc4b Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 5 Jun 2023 12:39:43 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] fix building when root directory contain non-ASCII characters
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ contrib/sb-posix/posix-tests.lisp | 3 ++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git contrib/sb-posix/posix-tests.lisp contrib/sb-posix/posix-tests.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b7fc49e47..d32b3abde 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- contrib/sb-posix/posix-tests.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ contrib/sb-posix/posix-tests.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -511,7 +511,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #-(and darwin x86)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (deftest readdir.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (let ((dir (sb-posix:opendir "/")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((dir (sb-posix:opendir "/"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sb-alien::*default-c-string-external-format* :latin-1))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (unwind-protect
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (block dir-loop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (loop for dirent = (sb-posix:readdir dir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-macports-xdg-data-dir.diff b/lang/sbcl/files/0002-add-MacPorts-XDG_DATA_DIRS.patch
</span>similarity index 68%
rename from lang/sbcl/files/patch-macports-xdg-data-dir.diff
rename to lang/sbcl/files/0002-add-MacPorts-XDG_DATA_DIRS.patch
<span style='display:block; white-space:pre;color:#808080;'>index 0fd7aaeef41..c507ee2ae86 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-macports-xdg-data-dir.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/0002-add-MacPorts-XDG_DATA_DIRS.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,5 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From aff729128386a61ac89cf545ddf1b96df0282787 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:19:10 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] add MacPorts' XDG_DATA_DIRS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ contrib/asdf/uiop.lisp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> diff --git contrib/asdf/uiop.lisp contrib/asdf/uiop.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 5e52e7745..25c1a6365 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5e52e7745..8a597ec8f 100644
</span> --- contrib/asdf/uiop.lisp
+++ contrib/asdf/uiop.lisp
@@ -7188,7 +7188,7 @@ also \"Configuration DSL\"\) in the ASDF manual."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -11,3 +20,6 @@ index 5e52e7745..25c1a6365 100644
</span>
(defun xdg-config-dirs (&rest more)
"The preference-ordered set of additional base paths to search for configuration files.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-missed-CLOCK_PROCESS_CPUTIME_ID.diff b/lang/sbcl/files/0003-Use-CLOCK_MONOTONIC-when-CLOCK_PROCESS_CPUTIME_ID-un.patch
</span>similarity index 52%
rename from lang/sbcl/files/patch-missed-CLOCK_PROCESS_CPUTIME_ID.diff
rename to lang/sbcl/files/0003-Use-CLOCK_MONOTONIC-when-CLOCK_PROCESS_CPUTIME_ID-un.patch
<span style='display:block; white-space:pre;color:#808080;'>index 4d533ab3996..d8e8ce06177 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-missed-CLOCK_PROCESS_CPUTIME_ID.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/0003-Use-CLOCK_MONOTONIC-when-CLOCK_PROCESS_CPUTIME_ID-un.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,7 +1,14 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-Emulate https://github.com/macports/macports-legacy-support/pull/58
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From d773dffdf6f03d4168ae8febbd8468ca8bdda8fa Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 12:08:08 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Use CLOCK_MONOTONIC when CLOCK_PROCESS_CPUTIME_ID unavailable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/runtime.h | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 4 insertions(+)
</span>
diff --git src/runtime/runtime.h src/runtime/runtime.h
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index d18d68e4c..a3bd75c42 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d18d68e4c..34707a04a 100644
</span> --- src/runtime/runtime.h
+++ src/runtime/runtime.h
@@ -416,4 +416,8 @@ extern struct lisp_startup_options lisp_startup_options;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,3 +20,6 @@ index d18d68e4c..a3bd75c42 100644
</span> +#endif
+
#endif /* _SBCL_RUNTIME_H_ */
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/0004-Disable-pdf-manual.patch b/lang/sbcl/files/0004-Disable-pdf-manual.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..9569409597d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/0004-Disable-pdf-manual.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 5abffa167689977e1236e7489b780194cd67cb21 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 12:09:09 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Disable pdf manual
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ doc/make-doc.sh | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git doc/make-doc.sh doc/make-doc.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index fe8f261cd..e592ac342 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- doc/make-doc.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ doc/make-doc.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -3,4 +3,4 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ . ../find-gnumake.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ find_gnumake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-(cd ./manual ; $GNUMAKE html pdf info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(cd ./manual ; $GNUMAKE html info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/0005-Use-MacPorts-zstd.patch b/lang/sbcl/files/0005-Use-MacPorts-zstd.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7c96e60b903
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/0005-Use-MacPorts-zstd.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,43 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 4a8c4ed98b62317b2e216ee21f67703a89b33634 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:20:33 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Use MacPorts zstd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/Config.arm64-darwin | 4 +++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/Config.x86-64-darwin | 4 +++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 6 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/Config.arm64-darwin src/runtime/Config.arm64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0d3ed389a..d66bd6099 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/Config.arm64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/Config.arm64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,7 +18,9 @@ ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OS_LIBS += -lpthread
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- OS_LIBS += -lzstd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OS_LIBS += -L@@PREFIX@@/lib -lzstd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DEPEND_FLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBSBCL = libsbcl.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/Config.x86-64-darwin src/runtime/Config.x86-64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2d9e7a669..5a4181f10 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/Config.x86-64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/Config.x86-64-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,7 +29,9 @@ ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OS_LIBS += -lpthread
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- OS_LIBS += -lzstd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OS_LIBS += -L@@PREFIX@@/lib -lzstd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ DEPEND_FLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBSBCL = libsbcl.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1001-Darwin-disable-custom-nanosleep-before-10.6.patch b/lang/sbcl/files/1001-Darwin-disable-custom-nanosleep-before-10.6.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5d7ccc6f7a4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1001-Darwin-disable-custom-nanosleep-before-10.6.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From c50dd158d97de78834c2a0d1f9eb7bdbe0ffac89 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 15:15:56 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Darwin: disable custom nanosleep before 10.6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See: https://github.com/sbcl/sbcl/commit/6d28b641b659b2be6ad7b329ae09cb592c1162a1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/darwin-os.c | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/wrap.c | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 5 insertions(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/darwin-os.c src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5a1d8dcd2..41760f5b4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -245,6 +245,8 @@ os_sem_destroy(os_sem_t *sem)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* nanosleep() is not re-entrant on some versions of Darwin,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * reimplement it using the underlying syscalls. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -302,3 +304,5 @@ sb_nanosleep(time_t sec, int nsec) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/wrap.c src/runtime/wrap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 8f8999e8a..94daf3fa7 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/wrap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/wrap.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -524,7 +524,7 @@ int s_issock(mode_t mode)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif /* !LISP_FEATURE_WIN32 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef LISP_FEATURE_UNIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(LISP_FEATURE_DARWIN) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* nanosleep() is not re-entrant on some versions of Darwin and is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * reimplemented using the underlying syscalls.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1002-Darwin-recovery-support-non-dispatch-semaphores.patch b/lang/sbcl/files/1002-Darwin-recovery-support-non-dispatch-semaphores.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..11fec10def8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1002-Darwin-recovery-support-non-dispatch-semaphores.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,135 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 0c51715917e23f4a5e65b3bf6cca8868c2a1759f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:28:45 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Darwin: recovery support non dispatch semaphores
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See: https://github.com/sbcl/sbcl/commit/160448fd0485daf69e81f9fe9eeb8515ed01db49
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/darwin-os.c | 55 ++++++++++++++++++++++++++++++++++++++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/darwin-os.h | 6 ++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/os-common.c | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/os.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 4 files changed, 61 insertions(+), 4 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/darwin-os.c src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 41760f5b4..699400857 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -216,7 +216,7 @@ void darwin_init(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_SB_THREAD && defined USE_DARWIN_GCD_SEMAPHORES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ inline void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_sem_init(os_sem_t *sem, unsigned int value)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -243,6 +243,59 @@ os_sem_destroy(os_sem_t *sem)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dispatch_release(*sem);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined LISP_FEATURE_SB_THREAD && defined CANNOT_USE_POSIX_SEM_T
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++inline void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_sem_init(os_sem_t *sem, unsigned int value)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (KERN_SUCCESS!=semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, (int)value))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lose("os_sem_init(%p): %s", sem, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++inline void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_sem_wait(os_sem_t *sem, char *what)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ kern_return_t ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ restart:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FSHOW((stderr, "%s: os_sem_wait(%p)\n", what, sem));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ret = semaphore_wait(*sem);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FSHOW((stderr, "%s: os_sem_wait(%p) => %s\n", what, sem,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ KERN_SUCCESS==ret ? "ok" : strerror(errno)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch (ret) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case KERN_SUCCESS:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* It is unclear just when we can get this, but a sufficiently
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * long wait seems to do that, at least sometimes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * However, a wait that long is definitely abnormal for the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * GC, so we complain before retrying.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case KERN_OPERATION_TIMED_OUT:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fprintf(stderr, "%s: os_sem_wait(%p): %s", what, sem, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This is analogous to POSIX EINTR. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case KERN_ABORTED:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ goto restart;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lose("%s: os_sem_wait(%p): %lu, %s",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ what, sem, (long unsigned)ret, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_sem_post(os_sem_t *sem, char *what)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (KERN_SUCCESS!=semaphore_signal(*sem))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lose("%s: os_sem_post(%p): %s", what, sem, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FSHOW((stderr, "%s: os_sem_post(%p) ok\n", what, sem));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_sem_destroy(os_sem_t *sem)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (-1==semaphore_destroy(mach_task_self(), *sem))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lose("os_sem_destroy(%p): %s", sem, strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/darwin-os.h src/runtime/darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f13669fb0..e4257e0ee 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -36,10 +36,14 @@ typedef ucontext_t os_context_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void darwin_init(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(LISP_FEATURE_SB_THREAD) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060) && !defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define USE_DARWIN_GCD_SEMAPHORES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <dispatch/dispatch.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef dispatch_semaphore_t os_sem_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CANNOT_USE_POSIX_SEM_T
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mach/semaphore.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef semaphore_t os_sem_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif /* _DARWIN_OS_H */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/os-common.c src/runtime/os-common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 34ede0769..32a81a8bd 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/os-common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/os-common.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -112,7 +112,7 @@ os_get_errno(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return errno;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined LISP_FEATURE_SB_THREAD && defined LISP_FEATURE_UNIX && !defined USE_DARWIN_GCD_SEMAPHORES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_SB_THREAD && defined LISP_FEATURE_UNIX && !defined USE_DARWIN_GCD_SEMAPHORES && !defined CANNOT_USE_POSIX_SEM_T
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_sem_init(os_sem_t *sem, unsigned int value)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/os.h src/runtime/os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index afae2d825..7a21caa9d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -226,7 +226,7 @@ extern char *os_get_runtime_executable_path();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define OS_VM_SIZE_FMTX PRIxPTR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined LISP_FEATURE_SB_THREAD && defined LISP_FEATURE_UNIX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# ifndef USE_DARWIN_GCD_SEMAPHORES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if !defined USE_DARWIN_GCD_SEMAPHORES && !defined CANNOT_USE_POSIX_SEM_T
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <semaphore.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef sem_t os_sem_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-i386-mask-out-O_LARGEFILE-in-fcntl-1-test.diff b/lang/sbcl/files/1003-x86-Darwin-mask-out-O_LARGEFILE-in-fcntl.1-test.patch
</span>similarity index 64%
rename from lang/sbcl/files/patch-i386-mask-out-O_LARGEFILE-in-fcntl-1-test.diff
rename to lang/sbcl/files/1003-x86-Darwin-mask-out-O_LARGEFILE-in-fcntl.1-test.patch
<span style='display:block; white-space:pre;color:#808080;'>index ab1300485be..56ec8df5798 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-i386-mask-out-O_LARGEFILE-in-fcntl-1-test.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1003-x86-Darwin-mask-out-O_LARGEFILE-in-fcntl.1-test.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,13 +1,21 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 26981717310f83f7e7c4c96ba58d28dbae00cc60 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:27:10 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: mask out O_LARGEFILE in fcntl.1 test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> See:
- https://github.com/sbcl/sbcl/commit/bebec0fb89ceefde0f1d584da439989bc12ad17d
- https://github.com/sbcl/sbcl/commit/cc425f4be3125c3ba48418cc76bc1d3d3260a431
- https://github.com/sbcl/sbcl/commit/306beeae30de474fb46c3efd31e8e2ea5acb65fb
<span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ contrib/sb-posix/posix-tests.lisp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span>
diff --git contrib/sb-posix/posix-tests.lisp contrib/sb-posix/posix-tests.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index a75d91646..962fbb452 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0a642bd5c..fc00f6aba 100644
</span> --- contrib/sb-posix/posix-tests.lisp
+++ contrib/sb-posix/posix-tests.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -434,7 +434,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -421,7 +421,7 @@
</span>
;; O_LARGEFILE is always set on 64-bit *nix platforms even though the whole
;; flag makes no sense.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -16,3 +24,6 @@ index a75d91646..962fbb452 100644
</span> (deftest fcntl.1
(let ((fd (sb-posix:open "/dev/null" sb-posix::o-nonblock)))
(logtest (sb-posix:fcntl fd sb-posix::f-getfl)
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-i386-revert-OS_THREAD_STACK.diff b/lang/sbcl/files/1004-x86-Darwin-revert-OS_THREAD_STACK.patch
</span>similarity index 69%
rename from lang/sbcl/files/patch-i386-revert-OS_THREAD_STACK.diff
rename to lang/sbcl/files/1004-x86-Darwin-revert-OS_THREAD_STACK.patch
<span style='display:block; white-space:pre;color:#808080;'>index c271597e9f3..2188eebe09e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-i386-revert-OS_THREAD_STACK.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1004-x86-Darwin-revert-OS_THREAD_STACK.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,12 +1,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 7d2b2b52dfe3e67d4302562c592d2c0945e17482 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:29:33 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: revert OS_THREAD_STACK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> See:
- https://github.com/sbcl/sbcl/commit/e3490371ab2207d5280084df0c76aee1a14879c2
- https://github.com/sbcl/sbcl/commit/c7590d3d7e73a4da203b71493a9cb353d8280f1c
<span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/cold/shared.lisp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span>
diff --git src/cold/shared.lisp src/cold/shared.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index c0b32fc6c..4e0f92b56 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b8ce82702..484d8c17f 100644
</span> --- src/cold/shared.lisp
+++ src/cold/shared.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -285,7 +285,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -288,7 +288,7 @@
</span> (push :compact-symbol sb-xc:*features*))
(when (target-featurep '(:and :sb-thread (:not :win32)))
(push :pauseless-threadstart sb-xc:*features*))
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,3 +23,6 @@ index c0b32fc6c..4e0f92b56 100644
</span> (push :os-thread-stack sb-xc:*features*))
(when (target-featurep '(:and :x86 :int4-breakpoints))
;; 0xCE is a perfectly good 32-bit instruction,
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-i386-old-preprocessor.diff b/lang/sbcl/files/1005-x86-Darwin-fix-build-by-old-preprocessor.patch
</span>similarity index 52%
rename from lang/sbcl/files/patch-i386-old-preprocessor.diff
rename to lang/sbcl/files/1005-x86-Darwin-fix-build-by-old-preprocessor.patch
<span style='display:block; white-space:pre;color:#808080;'>index 8e82e24d467..3bb31580083 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-i386-old-preprocessor.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1005-x86-Darwin-fix-build-by-old-preprocessor.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,10 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 7e47cffaea3593f03011a94853cf9f1b7b87a33c Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:30:39 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: fix build by old preprocessor
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> See: https://github.com/sbcl/sbcl/commit/931a2dcfa20187ba5477d4df5d160fc15e605db5
<span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/x86-assem.S | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 1 insertion(+), 1 deletion(-)
</span>
diff --git src/runtime/x86-assem.S src/runtime/x86-assem.S
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index f4070c545..717be9755 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index df19ace80..cace4261c 100644
</span> --- src/runtime/x86-assem.S
+++ src/runtime/x86-assem.S
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -844,7 +844,7 @@ GNAME(arch_scrub_control_stack):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -705,7 +705,7 @@ GNAME(arch_scrub_control_stack):
</span> * guard page upper bound in ECX, and our hard guard
* page upper bound in EDX. */
lea -4(%esp), %eax
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,3 +21,6 @@ index f4070c545..717be9755 100644
</span> mov %edx, %ecx
add 8(%esp), %ecx
add 12(%esp), %edx
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-i386-contrib-sb-posix-posix-tests.lisp.diff b/lang/sbcl/files/1006-x86-Darwin-disable-failing-stat-mode-tests.patch
</span>similarity index 56%
rename from lang/sbcl/files/patch-i386-contrib-sb-posix-posix-tests.lisp.diff
rename to lang/sbcl/files/1006-x86-Darwin-disable-failing-stat-mode-tests.patch
<span style='display:block; white-space:pre;color:#808080;'>index 76ab6e1455f..c4b9159593a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-i386-contrib-sb-posix-posix-tests.lisp.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1006-x86-Darwin-disable-failing-stat-mode-tests.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,8 +1,17 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From a6dccb448eabaf91eb2ecbde72e198f4fd7c6e0c Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:31:20 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: disable failing stat-mode tests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ contrib/sb-posix/posix-tests.lisp | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 2 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> diff --git contrib/sb-posix/posix-tests.lisp contrib/sb-posix/posix-tests.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-index 7c94a430d..b32a41893 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index fc00f6aba..936f6c366 100644
</span> --- contrib/sb-posix/posix-tests.lisp
+++ contrib/sb-posix/posix-tests.lisp
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -341,6 +341,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -328,6 +328,7 @@
</span> (,mode (sb-posix::stat-mode ,stat)))
,@body)))
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,7 +19,7 @@ index 7c94a430d..b32a41893 100644
</span> (deftest stat-mode.1
(with-stat-mode (mode *test-directory*)
(sb-posix:s-isreg mode))
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -357,6 +358,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -344,6 +345,7 @@
</span> (sb-posix:s-ischr mode))
nil)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,3 +27,6 @@ index 7c94a430d..b32a41893 100644
</span> (deftest stat-mode.4
(with-stat-mode (mode *test-directory*)
(sb-posix:s-isblk mode))
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-i386-missed-context.diff b/lang/sbcl/files/1007-x86-Darwin-add-missed-OS_CONTEXT_PC.patch
</span>similarity index 74%
rename from lang/sbcl/files/patch-i386-missed-context.diff
rename to lang/sbcl/files/1007-x86-Darwin-add-missed-OS_CONTEXT_PC.patch
<span style='display:block; white-space:pre;color:#808080;'>index a690ea19a37..35dee8b29ca 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-i386-missed-context.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1007-x86-Darwin-add-missed-OS_CONTEXT_PC.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,4 +1,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From aa9a60795e8f23b715a17630eefe70712abf2c6d Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:31:51 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: add missed OS_CONTEXT_PC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> See: https://github.com/sbcl/sbcl/commit/3bf3c33f9e291f2edbdfe8ba7c57128586923e41
<span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/x86-darwin-os.h | 6 +++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 5 insertions(+), 1 deletion(-)
</span>
diff --git src/runtime/x86-darwin-os.h src/runtime/x86-darwin-os.h
index 7ff303b96..cf6487815 100644
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,3 +32,6 @@ index 7ff303b96..cf6487815 100644
</span> #define EIP eip
#define ESP esp
#define EBP ebp
<span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1008-x86-Darwin-fix-syntax-typos.patch b/lang/sbcl/files/1008-x86-Darwin-fix-syntax-typos.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e37742a5a5d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1008-x86-Darwin-fix-syntax-typos.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,40 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 5bd3a25311bf971106c8a02c95ddf9e147950349 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: "Kirill A. Korinsky" <kirill@korins.ky>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 10:32:35 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x86/Darwin: fix syntax typos
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/x86-darwin-os.c | 6 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 insertions(+), 3 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/x86-darwin-os.c src/runtime/x86-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bba95e318..5ac13f970 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/x86-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/x86-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -91,7 +91,7 @@ int arch_os_thread_init(struct thread *thread) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * we've exhausted it */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sigstack.ss_sp = calc_altstack_base(thread);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sigstack.ss_flags = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sigstack.ss_size = calc_altstack_size(thread;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sigstack.ss_size = calc_altstack_size(thread);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sigaltstack(&sigstack,0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1; /* success */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -514,6 +514,8 @@ catch_exception_raise(mach_port_t exception_port,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_restore_fp_control(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -525,5 +527,3 @@ os_restore_fp_control(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* reset exception flags and restore control flags on x87 FPU */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ asm ("fldcw %0" : : "m" (fpu_control_word));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1009-ppc-Darwin-Revert-Delete-support-for-and-darwin-ppc.patch b/lang/sbcl/files/1009-ppc-Darwin-Revert-Delete-support-for-and-darwin-ppc.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..954d8d92f0a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1009-ppc-Darwin-Revert-Delete-support-for-and-darwin-ppc.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,1191 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 1e8e2859809ca3ab632b603491d74d0497d2db58 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 5 Jun 2023 22:03:43 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: Revert "Delete support for #+(and darwin ppc)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This reverts commit 217791a738a5960092e38106e9931c424cd4ee98.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/code/alieneval.lisp | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/code/float-trap.lisp | 2 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/code/ppc-vm.lisp | 3 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/compiler/ppc/c-call.lisp | 282 +++++++++++++++++++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/compiler/ppc/float.lisp | 65 +++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/compiler/ppc/parms.lisp | 10 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/compiler/ppc/vm.lisp | 12 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/compiler/ppc64/parms.lisp | 7 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/Config.ppc-darwin | 41 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/monitor.c | 4 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-arch.c | 2 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-assem.S | 165 +++++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-darwin-os.c | 142 +++++++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-darwin-os.h | 29 +++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-lispregs.h | 15 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc64-lispregs.h | 10 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/float.pure.lisp | 4 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/foreign-stack-alignment.impure.lisp | 3 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 18 files changed, 787 insertions(+), 11 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create mode 100644 src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create mode 100644 src/runtime/ppc-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create mode 100644 src/runtime/ppc-darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/code/alieneval.lisp src/code/alieneval.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ac6193366..cfc83d455 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/code/alieneval.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/code/alieneval.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25,7 +25,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defun guess-alignment (bits)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (cond ((null bits) nil)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- #-(and x86 (not win32)) ((> bits 32) 64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-(or (and x86 (not win32)) (and ppc darwin)) ((> bits 32) 64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ((> bits 16) 32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ((> bits 8) 16)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ((> bits 1) 8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/code/float-trap.lisp src/code/float-trap.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ec78d4903..697618fe1 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/code/float-trap.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/code/float-trap.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -119,6 +119,8 @@ in effect."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (setf (ldb float-precision-control modes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (or (cdr (assoc precision +precision-mode-alist+))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (error "unknown precision mode: ~S" precision))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: This apparently doesn't work on Darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-(and darwin ppc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (setf (floating-point-modes) modes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (values))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/code/ppc-vm.lisp src/code/ppc-vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4783c0d00..30ba89b09 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/code/ppc-vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/code/ppc-vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,7 +46,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; Given a signal context, return the floating point modes word in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; the same format as returned by FLOATING-POINT-MODES.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-;;; FIXME: surely this must be accessible somewhere under *BSD?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; FIXME: surely this must be accessible somewhere under Darwin? Or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; under NetBSD?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+linux
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (define-alien-routine ("os_context_fp_control" context-floating-point-modes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (unsigned 32)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/compiler/ppc/c-call.lisp src/compiler/ppc/c-call.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 464ce441e..b2bf4ecdb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/compiler/ppc/c-call.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/compiler/ppc/c-call.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,14 +19,19 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defconstant +stack-alignment-bytes+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;; Duh. PPC Linux (and VxWorks) adhere to the EABI.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 7)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin 7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; But Darwin doesn't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin 15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defstruct arg-state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (gpr-args 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (fpr-args 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;; SVR4 [a]abi wants two words on stack (callee saved lr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;; backpointer).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (stack-frame-size 2))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin (stack-frame-size 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; PowerOpen ABI wants 8 words on the stack corresponding to GPR3-10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; in addition to the 6 words of link area (see number-stack-displacement)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin (stack-frame-size (+ 8 6)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defun int-arg (state prim-type reg-sc stack-sc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (let ((reg-args (arg-state-gpr-args state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,6 +62,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; Excess floats stored on the stack are stored as floats.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; We follow gcc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (define-alien-type-method (single-float :arg-tn) (type state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (let* ((fprs (arg-state-fpr-args state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -69,6 +75,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (setf (arg-state-stack-frame-size state) (+ stack-offset 1))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (make-wired-tn* 'single-float single-stack-sc-number stack-offset))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; If a single-float arg has to go on the stack, it's promoted to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; double. That way, C programs can get subtle rounding errors when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; unrelated arguments are introduced.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(define-alien-type-method (single-float :arg-tn) (type state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let* ((fprs (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (gprs (arg-state-gpr-args state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond ((< gprs 8) ; and by implication also (< fprs 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Assign outgoing FPRs starting at FP1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (list (make-wired-tn* 'single-float single-reg-sc-number (1+ fprs))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int-arg state 'signed-byte-32 signed-reg-sc-number signed-stack-sc-number)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((< fprs 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; See comments below for double-float.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-stack-frame-size state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-wired-tn* 'single-float single-reg-sc-number (1+ fprs)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Pass on stack only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((stack-offset (arg-state-stack-frame-size state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-stack-frame-size state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-wired-tn* 'single-float single-stack-sc-number stack-offset))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (define-alien-type-method (double-float :arg-tn) (type state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (let* ((fprs (arg-state-fpr-args state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -83,6 +114,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (setf (arg-state-stack-frame-size state) (+ stack-offset 2))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (make-wired-tn* 'double-float double-stack-sc-number stack-offset))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(define-alien-type-method (double-float :arg-tn) (type state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((fprs (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (gprs (arg-state-gpr-args state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond ((< gprs 8) ; and by implication also (< fprs 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Assign outgoing FPRs starting at FP1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; The PowerOpen ABI says float values are stored in float
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; regs. But if we're calling a varargs function, we also
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; need to put the float into some gprs. We indicate this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; to %alien-funcall ir2-convert by making a list of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; TNs for the float reg and for the int regs.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (list (make-wired-tn* 'double-float double-reg-sc-number (1+ fprs))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int-arg state 'signed-byte-32 signed-reg-sc-number signed-stack-sc-number)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int-arg state 'unsigned-byte-32 unsigned-reg-sc-number unsigned-stack-sc-number)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((< fprs 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-fpr-args state))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (list (make-wired-tn* 'double-float double-reg-sc-number (1+ fprs))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int-arg state 'signed-byte-32 signed-reg-sc-number signed-stack-sc-number)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (int-arg state 'unsigned-byte-32 unsigned-reg-sc-number unsigned-stack-sc-number)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Pass on stack only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((stack-offset (arg-state-stack-frame-size state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf (arg-state-stack-frame-size state) 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-wired-tn* 'double-float double-stack-sc-number stack-offset))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; Result state handling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defstruct result-state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -93,6 +153,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (0 nl0-offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (1 nl1-offset)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; FIXME: These #-DARWIN methods should be adjusted to take a state
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; argument, firstly because that's our "official" API (see
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; src/code/host-alieneval) and secondly because that way we can
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;;; probably have less duplication of code. -- CSR, 2003-07-29
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (define-alien-type-method (system-area-pointer :result-tn) (type state)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (let ((num-results (result-state-num-results state)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -143,6 +208,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; Sort out long longs, by splitting them up. However, need to take
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; care about register/stack alignment and whether they will fully
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; fit into registers or must go on the stack.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (deftransform %alien-funcall ((function type &rest args))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (aver (sb-c:constant-lvar-p type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (let* ((type (sb-c:lvar-value type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -238,6 +304,67 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ,@(new-args))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (sb-c::give-up-ir1-transform))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(deftransform %alien-funcall ((function type &rest args))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (aver (sb-c:constant-lvar-p type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let* ((type (sb-c:lvar-value type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (arg-types (alien-fun-type-arg-types type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (result-type (alien-fun-type-result-type type)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (aver (= (length arg-types) (length args)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; We need to do something special for 64-bit integer arguments
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; and results.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (if (or (some #'(lambda (type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (and (alien-integer-type-p type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (> (sb-alien::alien-integer-type-bits type) 32)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ arg-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (and (alien-integer-type-p result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (> (sb-alien::alien-integer-type-bits result-type) 32)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (collect ((new-args) (lambda-vars) (new-arg-types))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (dolist (type arg-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((arg (gensym)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (lambda-vars arg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond ((and (alien-integer-type-p type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (> (sb-alien::alien-integer-type-bits type) 32))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; 64-bit long long types are stored in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; consecutive locations, most significant word
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; first (big-endian).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-args `(ash ,arg -32))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-args `(logand ,arg #xffffffff))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (if (alien-integer-type-signed type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-arg-types (parse-alien-type '(signed 32) nil))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-arg-types (parse-alien-type '(unsigned 32) nil)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-arg-types (parse-alien-type '(unsigned 32) nil)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-args arg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (new-arg-types type)))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond ((and (alien-integer-type-p result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (> (sb-alien::alien-integer-type-bits result-type) 32))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((new-result-type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((sb-alien::*values-type-okay* t))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (parse-alien-type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (if (alien-integer-type-signed result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ '(values (signed 32) (unsigned 32))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ '(values (unsigned 32) (unsigned 32)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ nil))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `(lambda (function type ,@(lambda-vars))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (multiple-value-bind (high low)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (%alien-funcall function
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ',(make-alien-fun-type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :arg-types (new-arg-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :result-type new-result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ,@(new-args))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (logior low (ash high 32))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `(lambda (function type ,@(lambda-vars))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (declare (ignore type))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (%alien-funcall function
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ',(make-alien-fun-type
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :arg-types (new-arg-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :result-type result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ,@(new-args))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sb-c::give-up-ir1-transform))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (define-vop (foreign-symbol-sap)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (:translate foreign-symbol-sap)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (:policy :fast-safe)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -341,12 +468,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ `(deref (sap-alien (sap+ ,sap ,offset) (* ,type)))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;; The "Mach-O Runtime Conventions" document for OS X almost
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;; specifies the calling convention (it neglects to mention that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;; the linkage area is 24 bytes).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defconstant n-foreign-linkage-area-bytes 24)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; On linux only use 8 bytes for LR and Back chain. JRXR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; 2006/11/10.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defconstant n-foreign-linkage-area-bytes 8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; Returns a vector in static space containing machine code for the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; callback wrapper. Linux version. JRXR. 2006/11/13
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defun alien-callback-assembler-wrapper (index result-type argument-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (flet ((make-gpr (n)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (make-random-tn :kind :normal :sc (sc-or-lose 'any-reg) :offset n))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -561,4 +696,145 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned-long))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sap (length buffer))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ vector))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;; Returns a vector in static space containing machine code for the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;; callback wrapper
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defun alien-callback-assembler-wrapper (index result-type argument-types)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (flet ((make-gpr (n)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-random-tn :kind :normal :sc (sc-or-lose 'any-reg) :offset n))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-fpr (n)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (make-random-tn :kind :normal :sc (sc-or-lose 'double-reg) :offset n)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let* ((segment (make-segment)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (assemble (segment)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; To save our arguments, we follow the algorithm sketched in the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; "PowerPC Calling Conventions" section of that document.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; CLH: There are a couple problems here. First, we bail if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; we run out of registers. AIUI, we can just ignore the extra
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; args here and we will be ok...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((words-processed 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (gprs (mapcar #'make-gpr '(3 4 5 6 7 8 9 10)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (fprs (mapcar #'make-fpr '(1 2 3 4 5 6 7 8 9 10 11 12 13)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (stack-pointer (make-gpr 1)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (labels ((save-arg (type words)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((integerp (not (alien-float-type-p type)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (offset (+ (* words-processed n-word-bytes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ n-foreign-linkage-area-bytes)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond (integerp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (dotimes (k words)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((gpr (pop gprs)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (when gpr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stw gpr stack-pointer offset))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf words-processed)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf offset n-word-bytes))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; The handling of floats is a little ugly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; because we hard-code the number of words
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; for single- and double-floats.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((alien-single-float-type-p type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (pop gprs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((fpr (pop fprs)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (when fpr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stfs fpr stack-pointer offset)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf words-processed))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((alien-double-float-type-p type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (setf gprs (cddr gprs))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((fpr (pop fprs)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (when fpr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stfd fpr stack-pointer offset)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (incf words-processed 2))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (bug "Unknown alien floating point type: ~S" type))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (mapc #'save-arg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argument-types
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (mapcar (lambda (arg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (ceiling (alien-type-bits arg) n-word-bits))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argument-types))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Set aside room for the return area just below sp, then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; actually call funcall3: funcall3 (call-alien-function,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; index, args, return-area)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; INDEX is fixnumized, ARGS and RETURN-AREA don't need to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; because they're word-aligned. Kinda gross, but hey ...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let* ((n-return-area-words
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (ceiling (or (alien-type-bits result-type) 0) n-word-bits))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (n-return-area-bytes (* n-return-area-words n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: magic constant, and probably n-args-bytes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (args-size (* 3 n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: n-frame-bytes?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (frame-size (logandc2 (+ n-foreign-linkage-area-bytes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ n-return-area-bytes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ args-size
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ +stack-alignment-bytes+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ +stack-alignment-bytes+)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (destructuring-bind (sp r0 arg1 arg2 arg3 arg4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (mapcar #'make-gpr '(1 0 3 4 5 6))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: This is essentially the same code as LR in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; insts.lisp, but attempting to use (INST LR ...) instead
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; of this function results in callbacks not working. Why?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; --njf, 2006-01-04
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (flet ((load-address-into (reg addr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((high (ldb (byte 16 16) addr))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (low (ldb (byte 16 0) addr)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lis reg high)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst ori reg reg low))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Setup the args
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (load-address-into arg1 (static-fdefn-fun-addr 'enter-alien-callback))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (loadw arg1 arg1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst li arg2 (fixnumize index))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst addi arg3 sp n-foreign-linkage-area-bytes)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: This was (- (* RETURN-AREA-SIZE N-WORD-BYTES)), while
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; RETURN-AREA-SIZE was (* N-RETURN-AREA-WORDS N-WORD-BYTES):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; I assume the intention was (- N-RETURN-AREA-BYTES), but who knows?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; --NS 2005-06-11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst addi arg4 sp (- n-return-area-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME! FIXME FIXME: What does this FIXME refer to?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Save sp, setup the frame
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst mflr r0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stw r0 sp (* 2 n-word-bytes)) ; FIXME: magic constant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stwu sp sp (- frame-size))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Make the call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (load-address-into r0 (foreign-symbol-address "funcall3"))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst mtlr r0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst blrl))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; We're back! Restore sp and lr, load the return value from just
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; under sp, and return.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz sp sp 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz r0 sp (* 2 n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst mtlr r0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (cond
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((sb-alien::alien-single-float-type-p result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((f1 (make-fpr 1)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lfs f1 sp (- (* n-return-area-words n-word-bytes)))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((sb-alien::alien-double-float-type-p result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let ((f1 (make-fpr 1)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lfd f1 sp (- (* n-return-area-words n-word-bytes)))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((sb-alien::alien-void-type-p result-type)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Nothing to do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (t
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (loop with gprs = (mapcar #'make-gpr '(3 4))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ repeat n-return-area-words
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for gpr = (pop gprs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for offset from (- (* n-return-area-words n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ by n-word-bytes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unless gpr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (bug "Out of return registers in alien-callback trampoline."))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz gpr sp offset))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst blr))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (finalize-segment segment)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; Now that the segment is done, convert it to a static
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; vector we can point foreign code to.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (let* ((buffer (sb-assem:segment-buffer segment))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (vector (make-static-vector (length buffer)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :element-type '(unsigned-byte 8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :initial-contents buffer))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sap (vector-sap vector)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (alien-funcall
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (extern-alien "ppc_flush_icache"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (function void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ system-area-pointer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ unsigned-long))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sap (length buffer))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vector)))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/compiler/ppc/float.lisp src/compiler/ppc/float.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 28a6d2e90..91ddfab72 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/compiler/ppc/float.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/compiler/ppc/float.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -849,3 +849,68 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (:translate imagpart)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (:note "complex double float imagpart")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (:variant :imag))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;; This vop and the next are intended to be used only for moving a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;; float to an integer arg location (register or stack) for C callout.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++;; See %alien-funcall ir2convert in aliencomp.lisp.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(define-vop (move-double-to-int-arg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:args (float :scs (double-reg)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:results (hi-bits :scs (signed-reg signed-stack))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (lo-bits :scs (unsigned-reg unsigned-stack)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:temporary (:scs (double-stack)) stack-temp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:temporary (:scs (signed-reg)) temp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:arg-types double-float)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:result-types signed-num unsigned-num)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:policy :fast-safe)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:vop-var vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:generator 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sc-case float
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (double-reg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stfd float (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sc-case hi-bits
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (signed-reg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz hi-bits (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (signed-stack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz temp (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stw temp nsp-tn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset hi-bits))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sc-case lo-bits
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned-reg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz lo-bits (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (* (1+ (tn-offset stack-temp)) n-word-bytes)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (unsigned-stack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz temp (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (* (1+ (tn-offset stack-temp)) n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stw temp nsp-tn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset lo-bits))))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(define-vop (move-single-to-int-arg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:args (float :scs (single-reg)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:results (bits :scs (signed-reg signed-stack)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:temporary (:scs (double-stack)) stack-temp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:temporary (:scs (signed-reg)) temp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:arg-types single-float)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:result-types signed-num)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:policy :fast-safe)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:vop-var vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (:generator 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sc-case float
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (single-reg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stfs float (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (sc-case bits
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (signed-reg
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz bits (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (signed-stack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst lwz temp (current-nfp-tn vop)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset stack-temp))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (inst stw temp nsp-tn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (tn-byte-offset bits))))))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/compiler/ppc/parms.lisp src/compiler/ppc/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4a99d5054..42d21e340 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/compiler/ppc/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/compiler/ppc/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -103,7 +103,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :dynamic-space-start
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+linux #x4f000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+netbsd #x4f000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- #+openbsd #x4f000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+openbsd #x4f000000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin #x10000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defconstant linkage-table-growth-direction :up)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defconstant linkage-table-entry-size 16)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -135,6 +136,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defparameter dynamic-0-space-start #x4f000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defparameter dynamic-0-space-end #x5cfff000)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-gencgc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defparameter dynamic-0-space-start #x10000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defparameter dynamic-0-space-end #x3ffff000)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defenum (:start 8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ halt-trap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/compiler/ppc/vm.lisp src/compiler/ppc/vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index af6cc1ea0..70579f47b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/compiler/ppc/vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/compiler/ppc/vm.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -20,7 +20,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;; work. This must be a power of 2 - see BYTES-REQUIRED-FOR-NUMBER-STACK.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defconstant number-stack-displacement
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (* 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (* #-darwin 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ n-word-bytes))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;;; Define the registers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -52,8 +53,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg nl6 9)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg fdefn 10)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg nargs 11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (defreg nfp 12)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (defreg cfunc 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME: some kind of comment here would be nice.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;; FIXME II: this also reveals the need to autogenerate lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin (defreg cfunc 12)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin (defreg nfp 12)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+darwin (defreg nfp 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-darwin (defreg cfunc 13)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg bsp 14)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg cfp 15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defreg csp 16)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/compiler/ppc64/parms.lisp src/compiler/ppc64/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2004cd4db..b38677c4d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/compiler/ppc64/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/compiler/ppc64/parms.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -124,6 +124,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defparameter dynamic-0-space-start #x4f000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defparameter dynamic-0-space-end #x5cfff000)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#+darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #-gencgc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (progn
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defparameter dynamic-0-space-start #x10000000)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defparameter dynamic-0-space-end #x3ffff000)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defenum (:start 8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ halt-trap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/Config.ppc-darwin src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 000000000..b34a07236
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,41 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# -*- makefile -*- for the C-level run-time support for SBCL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# This software is part of the SBCL system. See the README file for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# more information.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# This software is derived from the CMU CL system, which was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# written at Carnegie Mellon University and released into the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# public domain. The software is in the public domain and is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# provided with absolutely no warranty. See the COPYING and CREDITS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# files for more information.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LINKFLAGS += -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++OS_LIBS = -lSystem -lc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OS_LIBS += -lz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CC = gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ASSEM_SRC = ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ARCH_SRC = ppc-arch.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CPPFLAGS += -no-cpp-precomp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifdef LISP_FEATURE_GENCGC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GC_SRC = fullcgc.c gencgc.c traceroot.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LIBSBCL = libsbcl.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ USE_LIBSBCL = -Wl,-force_load libsbcl.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++.PHONY: after-grovel-headers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Nothing to do.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++after-grovel-headers:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/monitor.c src/runtime/monitor.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1ce9a9cfa..613ce0b01 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/monitor.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/monitor.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -600,6 +600,10 @@ print_context(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ brief_print((lispobj)(*os_context_register_addr(context,i)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(LISP_FEATURE_DARWIN) && defined(LISP_FEATURE_PPC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("DAR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 41)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf("DSISR:\t\t 0x%08lx\n", (unsigned long)(*os_context_register_addr(context, 42)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef REG_PC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf("PC:\t\t 0x%08lx\n", (unsigned long)os_context_pc(context));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-arch.c src/runtime/ppc-arch.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1822d8a76..6dd6fb8e0 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc-arch.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-arch.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,8 +46,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Caveat callers. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined (LISP_FEATURE_DARWIN) || defined(LISP_FEATURE_LINUX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef PT_DAR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define PT_DAR 41
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef PT_DSISR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define PT_DSISR 42
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-assem.S src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index eacb9704d..5179870bd 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -16,8 +16,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "genesis/static-symbols.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "genesis/thread.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CSYMBOL(x) _ ## x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define CSYMBOL(x) x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FUNCDEF(x) .text @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ .align 3 @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_##x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define GFUNCDEF(x) .globl _ ## x @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ FUNCDEF(x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FUNCDEF(x) .text ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .align 3 ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .type x,@function ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25,23 +37,52 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define GFUNCDEF(x) .globl x ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FUNCDEF(x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SET_SIZE(x)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define SET_SIZE(x) .size x,.-x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Load a register from a global, using the register as an intermediary */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* The register will be a fixnum for one instruction, so this is gc-safe */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define load(reg,global) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg,ha16(global) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lwz reg,lo16(global)(reg) ; Comment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define store(reg,temp,global) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis temp,ha16(global) @\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stw reg,lo16(global)(temp) ; Comment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define load(reg,global) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis reg,global@ha; lwz reg,global@l(reg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define store(reg,temp,global) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis temp,global@ha; stw reg,global@l(temp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FIRST_SAVE_FPR 14 /* lowest-numbered non-volatile FPR */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FIRST_SAVE_GPR 13 /* lowest-numbered non-volatile GPR */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define NGPR_SAVE_BYTES(n) ((32-(n))*4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FRAME_ARG_BYTES(n) (((((n)+6)*4)+15)&~15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FIRST_SAVE_GPR 14 /* lowest-numbered non-volatile GPR */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NGPR_SAVE_BYTES(n) ((32-(~1&((n)+1)))*4)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FRAME_ARG_BYTES(n) (((((n)+2)*4)+15)&~15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NFPR_SAVE_BYTES(n) ((32-(n))*8)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FRAME_SIZE(first_g,first_f,out_arg_words,savecr) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++(NFPR_SAVE_BYTES(first_f)+ NGPR_SAVE_BYTES(first_g)+ FRAME_ARG_BYTES(out_arg_words))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SAVE_FPR(n) stfd f##n,-8*(32- n)(r11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define SAVE_GPR(n) stw r##n,-4*(32- n)(r11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FULL_FRAME_SIZE (FRAME_SIZE(FIRST_SAVE_GPR,FIRST_SAVE_FPR,8,1)+15&~15)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RESTORE_FPR(n) lfd f##n,-8*(32- n)(r11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define RESTORE_GPR(n) lwz r##n,-4*(32- n)(r11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FRAME_SIZE(first_g,first_f,out_arg_words,savecr) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (NFPR_SAVE_BYTES(first_f)+ NGPR_SAVE_BYTES(first_g)+ FRAME_ARG_BYTES(out_arg_words+savecr))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define SAVE_FPR(n) stfd n,-8*(32-(n))(11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,6 +91,105 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define RESTORE_FPR(n) lfd n,-8*(32-(n))(11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define RESTORE_GPR(n) lwz n,-4*(32-(n))(11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define C_FULL_PROLOG \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ nop @\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ nop @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mfcr REG(0) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stw REG(0),4(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mflr REG(0) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stw REG(0),8(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mr REG(11),REG(1) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ stwu REG(1),-FULL_FRAME_SIZE(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(14) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(15) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(16) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(17) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(18) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(19) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(20) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(21) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(22) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(23) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(24) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(25) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(26) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(27) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(28) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(29) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(30) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_FPR(31) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ la REG(11),-NFPR_SAVE_BYTES(FIRST_SAVE_FPR)(REG(11)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(13) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(14) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(15) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(16) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(17) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(18) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(19) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(20) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(21) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(22) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(23) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(24) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(25) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(26) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(27) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(28) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(29) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(30) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SAVE_GPR(31)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define C_FULL_EPILOG \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ la REG(11),FULL_FRAME_SIZE-NFPR_SAVE_BYTES(FIRST_SAVE_FPR)(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(13) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(14) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(15) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(16) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(17) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(18) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(19) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(20) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(21) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(22) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(23) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(24) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(25) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(26) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(27) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(28) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(29) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(30) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_GPR(31) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ la REG(11),NFPR_SAVE_BYTES(FIRST_SAVE_FPR)(REG(11)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(14) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(15) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(16) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(17) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(18) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(19) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(20) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(21) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(22) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(23) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(24) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(25) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(26) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(27) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(28) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(29) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(30) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ RESTORE_FPR(31) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lwz REG(1),0(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lwz REG(0),4(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mtcr REG(0) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lwz REG(0),8(REG(1)) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mtlr REG(0) @ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define C_FULL_PROLOG \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mflr 0 ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -141,6 +281,8 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lwz 0,4(1) ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mtlr 0 ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define BEGIN_PSEUDO_ATOMIC stb reg_NULL,THREAD_PSEUDO_ATOMIC_BITS_OFFSET(reg_THREAD)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define END_PSEUDO_ATOMIC \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stb reg_THREAD, THREAD_PSEUDO_ATOMIC_BITS_OFFSET(reg_THREAD) ; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -198,6 +340,9 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Call out to obtain our TLS block. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ load(reg_NL0,CSYMBOL(specials))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* This won't work on darwin: wrong fixup style. And is it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * supposed to be lis/ori or lis/addi? Or does it differ
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * between darwin and everything else again? */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis reg_CFUNC,CSYMBOL(pthread_getspecific)@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ori reg_CFUNC,reg_CFUNC,CSYMBOL(pthread_getspecific)@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mtctr reg_CFUNC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -228,8 +373,13 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ li reg_L1,0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ li reg_L2,0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ li reg_LIP,0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg_NULL,hi16(NIL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ori reg_NULL,reg_NULL,lo16(NIL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis reg_NULL,NIL@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ori reg_NULL,reg_NULL,NIL@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Turn on pseudo-atomic */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BEGIN_PSEUDO_ATOMIC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -258,8 +408,13 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lwz reg_A3,12(reg_CFP)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Calculate LRA */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg_LRA,ha16(lra)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ addi reg_LRA,reg_LRA,lo16(lra)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis reg_LRA,lra@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ori reg_LRA,reg_LRA,lra@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ addi reg_LRA,reg_LRA,OTHER_POINTER_LOWTAG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Function is an indirect closure */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -364,12 +519,22 @@ lra:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mr reg_NL3,reg_NARGS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* PowerOpen (i.e. OS X) requires the callee address in r12
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (a.k.a. CFUNC), so move it back there, too. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ mfctr reg_CFUNC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Into C we go. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bctrl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Re-establish NIL */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg_NULL,hi16(NIL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ori reg_NULL,reg_NULL,lo16(NIL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lis reg_NULL,NIL@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ori reg_NULL,reg_NULL,NIL@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* And reg_ZERO */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ li reg_ZERO,0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-darwin-os.c src/runtime/ppc-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 000000000..9258e273b
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,142 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This is the PowerPC/Darwin incarnation of arch-dependent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * OS-dependent routines. See also "bsdos.c".
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This software is part of the SBCL system. See the README file for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * more information.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * This software is derived from the CMU CL system, which was
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * written at Carnegie Mellon University and released into the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * public domain. The software is in the public domain and is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * provided with absolutely no warranty. See the COPYING and CREDITS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * files for more information.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "sbcl.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "globals.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "runtime.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <signal.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <ucontext.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <limits.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mach-o/dyld.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "arch.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "interr.h" /* for declaration of lose */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#error "Define threading support functions"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int arch_os_thread_init(struct thread *thread) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 1; /* success */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int arch_os_thread_cleanup(struct thread *thread) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 1; /* success */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_register_t *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_register_addr(os_context_t *context, int offset)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ppc_ss_struct_t *state = &context->uc_mcontext->PPC_DARWIN_REGIFY(ss);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ switch(offset) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 2:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 3:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 4:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r4);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 5:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 6:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r6);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 7:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 8:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 9:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r9);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 10:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r10);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 11:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r11);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 12:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r12);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 13:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r13);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 14:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r14);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 15:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r15);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 16:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r16);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 17:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r17);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 18:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r18);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 19:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r19);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 20:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r20);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 21:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r21);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 22:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r22);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 23:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r23);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 24:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r24);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 25:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r25);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 26:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r26);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 27:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r27);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 28:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r28);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 29:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r29);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 30:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r30);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 31:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &state->PPC_DARWIN_REGIFY(r31);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 41:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* PT_DAR */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &context->uc_mcontext->PPC_DARWIN_REGIFY(es).PPC_DARWIN_REGIFY(dar);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ case 42:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* PT_DSISR */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &context->uc_mcontext->PPC_DARWIN_REGIFY(es).PPC_DARWIN_REGIFY(dsisr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ default:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lose("bad offset to os_context_register_addr");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_register_t *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_lr_addr(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &context->uc_mcontext->PPC_DARWIN_REGIFY(ss).PPC_DARWIN_REGIFY(lr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_register_t *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_ctr_addr(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &context->uc_mcontext->PPC_DARWIN_REGIFY(ss).PPC_DARWIN_REGIFY(ctr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_register_t *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_context_cr_addr(os_context_t *context)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return (os_context_register_t *) &context->uc_mcontext->PPC_DARWIN_REGIFY(ss).PPC_DARWIN_REGIFY(cr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++os_flush_icache(os_vm_address_t address, os_vm_size_t length)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* see ppc-arch.c */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ppc_flush_icache(address,length);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-darwin-os.h src/runtime/ppc-darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+new file mode 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 000000000..36ec9d4d2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-darwin-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -0,0 +1,29 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef _PPC_DARWIN_OS_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define _PPC_DARWIN_OS_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "darwin-os.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef unsigned int os_context_register_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "arch-os-generic.inc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* On OS X 10.5, the field names for the thread state have changed and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * now are prepended with __. Use some #define hackery to deal with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * this.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if __DARWIN_UNIX03
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PPC_DARWIN_REGIFY(foo) __ ## foo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef ppc_thread_state_t ppc_ss_struct_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define PPC_DARWIN_REGIFY(foo) foo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++typedef ppc_saved_state_t ppc_ss_struct_t;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* __DARWIN_UNIX03 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define OS_CONTEXT_PC(context) context->uc_mcontext->PPC_DARWIN_REGIFY(ss).PPC_DARWIN_REGIFY(srr0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif /* _PPC_DARWIN_OS_H */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-lispregs.h src/runtime/ppc-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 35815eedc..02074728d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined __ASSEMBLER__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define REG(num) r##num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FREG(num) f##num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define REG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FREG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define REG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FREG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NREGS 32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15,8 +25,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_NL6 REG(9) /* Last (7th) FF param */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_FDEFN REG(10) /* was NL7 until recently -dan */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_NARGS REG(11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define reg_CFUNC REG(12) /* Silly to blow a reg on FF-name */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define reg_NFP REG(13) /* Lisp may save around FF-call */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_NFP REG(12) /* Lisp may save around FF-call */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_CFUNC REG(13) /* Silly to blow a reg on FF-name */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_BSP REG(14) /* Binding stack pointer */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_CFP REG(15) /* Control/value stack frame pointer */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define reg_CSP REG(16) /* Control/value stack top */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc64-lispregs.h src/runtime/ppc64-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e0c31f7cd..7fefc085e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc64-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc64-lispregs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined LISP_FEATURE_DARWIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined __ASSEMBLER__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define REG(num) r##num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FREG(num) f##num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define REG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define FREG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define REG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define FREG(num) num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NREGS 32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/float.pure.lisp tests/float.pure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 9bc9670b7..fd2a7d22f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/float.pure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/float.pure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -98,7 +98,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (assert (= 0.0d0 (scale-float 1.0d0 (1- most-negative-fixnum)))))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (with-test (:name (:scale-float-overflow :bug-372)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- :fails-on (or :arm64))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ :fails-on (or :arm64 (and :darwin :ppc)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (flet ((test (form)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (assert-error (funcall (checked-compile `(lambda () ,form)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :allow-style-warnings t))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -135,6 +135,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (with-test (:name (:addition-overflow :bug-372)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :fails-on (or :arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (and :ppc :openbsd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (and :ppc :darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (and :x86 :netbsd)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (assert-error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (sb-sys:without-interrupts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -155,6 +156,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (with-test (:name (:addition-overflow :bug-372 :take-2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ :fails-on (or :arm64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (and :ppc :openbsd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (and :ppc :darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (and :x86 :netbsd)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (assert-error
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (sb-sys:without-interrupts
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/foreign-stack-alignment.impure.lisp tests/foreign-stack-alignment.impure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bd505938d..23b431f3e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/foreign-stack-alignment.impure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/foreign-stack-alignment.impure.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,7 +34,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defvar *required-alignment*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (or #+arm 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+mips 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- #+ppc 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+(and ppc darwin) 16
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+(and ppc (not darwin)) 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+(or arm64 x86 x86-64 riscv ppc64) 16
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+sparc 8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (error "Unknown platform")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1010-ppc-Darwin-Config.ppc-use-right-compiler-and-deploym.patch b/lang/sbcl/files/1010-ppc-Darwin-Config.ppc-use-right-compiler-and-deploym.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c03cb41a7f4
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1010-ppc-Darwin-Config.ppc-use-right-compiler-and-deploym.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,49 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 51d53157fb6af25c9085cfeff1e959742f5407bd Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 5 Jun 2023 22:29:05 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: Config.ppc: use right compiler and deployment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/Config.ppc-darwin | 18 ++++++++++++++----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 14 insertions(+), 4 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/Config.ppc-darwin src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b34a07236..34376a0a6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -9,8 +9,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # provided with absolutely no warranty. See the COPYING and CREDITS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # files for more information.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CFLAGS = -g -Wall -O2 -fdollars-in-identifiers -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-LINKFLAGS += -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifdef SBCL_MACOSX_VERSION_MIN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS += -mmacosx-version-min=$(SBCL_MACOSX_VERSION_MIN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LINKFLAGS += -mmacosx-version-min=$(SBCL_MACOSX_VERSION_MIN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ifdef LISP_FEATURE_DARWIN9_OR_BETTER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS += -mmacosx-version-min=10.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LINKFLAGS += -mmacosx-version-min=10.5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFLAGS += -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LINKFLAGS += -mmacosx-version-min=10.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -19,8 +31,6 @@ ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OS_LIBS += -lz
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-CC = gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ASSEM_SRC = ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ARCH_SRC = ppc-arch.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1011-ppc-Darwin-ppc-assem.S-fix-wrong-assembler-code-chun.patch b/lang/sbcl/files/1011-ppc-Darwin-ppc-assem.S-fix-wrong-assembler-code-chun.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..8ba90ec9780
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1011-ppc-Darwin-ppc-assem.S-fix-wrong-assembler-code-chun.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 17eb2d4786e4a3c1c966403fc1a8d971cd9f287d Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 5 Jun 2023 22:30:34 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: ppc-assem.S: fix wrong assembler code chunk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-assem.S | 12 +++++++-----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 7 insertions(+), 5 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-assem.S src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5179870bd..154e79d12 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -340,11 +340,13 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Call out to obtain our TLS block. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ load(reg_NL0,CSYMBOL(specials))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- /* This won't work on darwin: wrong fixup style. And is it
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * supposed to be lis/ori or lis/addi? Or does it differ
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * between darwin and everything else again? */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- lis reg_CFUNC,CSYMBOL(pthread_getspecific)@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ori reg_CFUNC,reg_CFUNC,CSYMBOL(pthread_getspecific)@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN /* FIXME: should it be lis/ori or lis/addi? */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg_CFUNC,hi16(CSYMBOL(pthread_getspecific))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ori reg_CFUNC,reg_CFUNC,lo16(CSYMBOL(pthread_getspecific))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ lis reg_CFUNC,CSYMBOL(pthread_getspecific)@h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ori reg_CFUNC,reg_CFUNC,CSYMBOL(pthread_getspecific)@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mtctr reg_CFUNC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bctrl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mr reg_THREAD, reg_NL0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1012-ppc-Darwin-Misc-fixes-for-PPC.patch b/lang/sbcl/files/1012-ppc-Darwin-Misc-fixes-for-PPC.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..80ed509d385
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1012-ppc-Darwin-Misc-fixes-for-PPC.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,80 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 015cc3d0a5e438dde1a751343d56021a77fcc389 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Mon, 5 Jun 2023 22:51:40 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: Misc fixes for PPC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ contrib/sb-grovel/def-to-lisp.lisp | 5 +++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make-config.sh | 11 +++++++++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/Config.ppc-darwin | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tests/run-compiler.sh | 1 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 4 files changed, 19 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git contrib/sb-grovel/def-to-lisp.lisp contrib/sb-grovel/def-to-lisp.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 90ab33ae3..00c489b79 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- contrib/sb-grovel/def-to-lisp.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ contrib/sb-grovel/def-to-lisp.lisp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -281,6 +281,11 @@ code:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ,(format nil "-mmacosx-version-min=~A"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (or (sb-ext:posix-getenv "SBCL_MACOSX_VERSION_MIN")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "10.4")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #+(and ppc darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ `("-arch" "ppc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ,(format nil "-mmacosx-version-min=~A"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (or (sb-ext:posix-getenv "SBCL_MACOSX_VERSION_MIN")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "10.4")))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #+(and x86-64 sunos) '("-m64")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (list "-o"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (namestring tmp-a-dot-out)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git make-config.sh make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b161690cf..0d0f76dce 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -651,8 +651,15 @@ case "$sbcl_arch" in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $GNUMAKE -C tools-for-build where-is-mcontext -I ../src/runtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tools-for-build/where-is-mcontext > src/runtime/ppc-linux-mcontext.h || (echo "error running where-is-mcontext"; exit 1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif [ "$sbcl_os" = "darwin" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- echo "Unsupported configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # We provide a dlopen shim, so a little lie won't hurt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf ' :os-provides-dlopen' >> $ltf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # The default stack ulimit under darwin is too small to run PURIFY.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Best we can do is complain and exit at this stage
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if [ "`ulimit -s`" = "512" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo "Your stack size limit is too small to build SBCL."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ echo "See the limit(1) or ulimit(1) commands and the README file."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ppc64)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/Config.ppc-darwin src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 34376a0a6..f53b4d12b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/Config.ppc-darwin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -45,6 +45,10 @@ ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ USE_LIBSBCL = -Wl,-force_load libsbcl.a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ifdef LISP_FEATURE_SB_THREAD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ OS_LIBS += -lpthread
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .PHONY: after-grovel-headers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Nothing to do.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git tests/run-compiler.sh tests/run-compiler.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 913e2c8a7..d157f6206 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/run-compiler.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/run-compiler.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -14,6 +14,7 @@ args=
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ case "$platform" in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Darwin-X86-64) args="-arch x86_64" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Darwin-X86) args="-arch i386" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Darwin-PowerPC) args="-arch ppc" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SunOS-X86-64) args=-m64 ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Linux-X86) args="-m32" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Linux-PowerPC) args="-m32" ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1013-ppc-Darwin-make-config.sh-use-gcc-tls-for-ppc.patch b/lang/sbcl/files/1013-ppc-Darwin-make-config.sh-use-gcc-tls-for-ppc.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..18835ead851
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1013-ppc-Darwin-make-config.sh-use-gcc-tls-for-ppc.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 16661aa73e9b896939e8249ba3dd22a60729a5be Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 00:01:51 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: make-config.sh: use gcc-tls for ppc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ make-config.sh | 3 +++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git make-config.sh make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0d0f76dce..c225fde85 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ make-config.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -568,6 +568,9 @@ case "$sbcl_os" in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ $sbcl_arch = "arm64" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ printf ' :darwin-jit :gcc-tls' >> $ltf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if [ $sbcl_arch = "ppc" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ printf ' :gcc-tls' >> $ltf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ link_or_copy $sbcl_arch-darwin-os.h target-arch-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ link_or_copy bsd-os.h target-os.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ link_or_copy Config.$sbcl_arch-darwin Config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/1014-ppc-Darwin-ppc-assem-a-minor-fix-to-assembler-syntax.patch b/lang/sbcl/files/1014-ppc-Darwin-ppc-assem-a-minor-fix-to-assembler-syntax.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..f4db0092ea9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/sbcl/files/1014-ppc-Darwin-ppc-assem-a-minor-fix-to-assembler-syntax.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,33 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 300c4b89883a7a0ec75b5fb498309b95d8c58f4d Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Tue, 6 Jun 2023 16:37:08 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] ppc/Darwin: ppc-assem: a minor fix to assembler syntax
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/runtime/ppc-assem.S | 7 +++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 7 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/runtime/ppc-assem.S src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 154e79d12..f424d02fd 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/runtime/ppc-assem.S
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -302,9 +302,16 @@ x:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* store old SP and switch to new stack */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lwz REG(10),THREAD_ALIEN_STACK_START_OFFSET(REG(3))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef LISP_FEATURE_DARWIN /* FIXME: is this correct? */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ addis REG(10),REG(10),ha16(ALIEN_STACK_SIZE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if ALIEN_STACK_SIZE % 65536 != 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ addi REG(10),REG(10),lo16(ALIEN_STACK_SIZE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ addis REG(10),REG(10),ALIEN_STACK_SIZE@ha
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if ALIEN_STACK_SIZE % 65536 != 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ addi REG(10),REG(10),ALIEN_STACK_SIZE@l
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ stwu REG(1),-16(REG(10))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mr REG(1),REG(10)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.41.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-config-darwin-arm64.diff b/lang/sbcl/files/patch-config-darwin-arm64.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 874eabbc46e..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-config-darwin-arm64.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,13 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/runtime/Config.arm64-darwin.orig 2022-06-30 00:27:00.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/runtime/Config.arm64-darwin 2022-07-12 21:45:30.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -29,7 +29,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- OS_LIBS += -lpthread
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- OS_LIBS += -lzstd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ OS_LIBS += -L@@PREFIX@@/lib -lzstd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ DEPEND_FLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ CFLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LIBSBCL = libsbcl.a
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-config-darwin-x86_64.diff b/lang/sbcl/files/patch-config-darwin-x86_64.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 953f9f5bfe8..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-config-darwin-x86_64.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,13 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/runtime/Config.x86-64-darwin.orig 2022-06-30 00:27:00.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/runtime/Config.x86-64-darwin 2022-07-12 21:45:55.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -29,7 +29,9 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- OS_LIBS += -lpthread
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ifdef LISP_FEATURE_SB_CORE_COMPRESSION
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- OS_LIBS += -lzstd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ OS_LIBS += -L@@PREFIX@@/lib -lzstd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ DEPEND_FLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ CFLAGS += -I@@PREFIX@@/include
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- LIBSBCL = libsbcl.a
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-contrib-sb-posix-posix-tests.lisp.diff b/lang/sbcl/files/patch-contrib-sb-posix-posix-tests.lisp.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index eefd604d637..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-contrib-sb-posix-posix-tests.lisp.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,12 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- contrib/sb-posix/posix-tests.lisp.orig 2016-08-14 17:09:24.000000000 +0900
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ contrib/sb-posix/posix-tests.lisp 2016-08-14 17:11:32.000000000 +0900
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -536,7 +536,8 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- nil)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (deftest readdir.1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- (let ((dir (sb-posix:opendir "/")))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (let ((dir (sb-posix:opendir "/"))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+ (sb-alien::*default-c-string-external-format* :latin-1))
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (unwind-protect
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (block dir-loop
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- (loop for dirent = (sb-posix:readdir dir)
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-make-doc.diff b/lang/sbcl/files/patch-make-doc.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 7b845338361..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-make-doc.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,8 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- doc/make-doc.sh.orig 2010-10-10 13:43:10.000000000 +0200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ doc/make-doc.sh 2010-10-10 13:43:28.000000000 +0200
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -3,4 +3,4 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- . ../find-gnumake.sh
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- find_gnumake
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--(cd ./manual ; $GNUMAKE html pdf info)
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+(cd ./manual ; $GNUMAKE html info)
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/sbcl/files/patch-use-right-gcc.diff b/lang/sbcl/files/patch-use-right-gcc.diff
</span>deleted file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0de8aa1593b..00000000000
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/sbcl/files/patch-use-right-gcc.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,12 +0,0 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# macports:lang/sbcl 'gcc' should "just work"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# so remove reference to compiler in source configuration
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>---- src/runtime/Config.ppc-darwin.orig 2018-02-28 03:00:32.000000000 -0600
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ src/runtime/Config.ppc-darwin 2018-03-31 18:30:57.000000000 -0500
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -19,7 +19,6 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- OS_LIBS += -lz
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- endif
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--CC = gcc
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ASSEM_SRC = ppc-assem.S ldso-stubs.S
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ARCH_SRC = ppc-arch.c
</span></pre><pre style='margin:0'>
</pre>