Raymond Toy pushed to branch issue-358-macos-git-cert-error at cmucl / cmucl
Commits:
90efb3d5 by Raymond Toy at 2024-10-16T08:56:08-07:00
More debugging of osx:install stage
Add `before_script` to print out what git we're using.
Ignore any failures in this stage too.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -165,6 +165,10 @@ osx:install:
artifacts:
paths:
- snapshot/
+ allow_failure: true
+ before_script:
+ - type -all git
+ - git --version
script:
- echo PATH = $PATH
- ls -F /usr/local/bin
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/90efb3d57e98dbfed159194…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/90efb3d57e98dbfed159194…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-358-macos-git-cert-error at cmucl / cmucl
Commits:
9f1988d7 by Raymond Toy at 2024-10-14T14:20:19-07:00
Fix bad CI syntax introduced in previous debugging commit
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -183,9 +183,9 @@ osx:build:
- darwin-2/*.log
- darwin-3/*.log
- darwin-4/*.log
- needs:
- - #job: osx:install
- artifacts: true
+# needs:
+# - job: osx:install
+# artifacts: true
script:
# Do cross compile first
#- bin/create-target.sh xtarget x86_darwin
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9f1988d755483f804d50d75…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/9f1988d755483f804d50d75…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-355-solaris-x86-fp-trap-handler at cmucl / cmucl
Commits:
39c8b616 by Raymond Toy at 2024-09-01T14:24:21+00:00
Fix 354: Add CI test for executables
- - - - -
c1514a66 by Raymond Toy at 2024-09-01T14:24:22+00:00
Merge branch 'issue-354-add-executable-test-to-ci' into 'master'
Fix 354: Add CI test for executables
See merge request cmucl/cmucl!253
- - - - -
4fce8c07 by Raymond Toy at 2024-09-01T15:13:49+00:00
Fix #352: New compression methods for distribution tarballs
- - - - -
40e553b6 by Raymond Toy at 2024-09-01T15:13:50+00:00
Merge branch 'issue-352-new-compression-for-dist' into 'master'
Fix #352: New compression methods for distribution tarballs
Closes #352
See merge request cmucl/cmucl!252
- - - - -
e20f2727 by Raymond Toy at 2024-09-09T19:04:53+00:00
Fix #357: Include limits.h to get PATH_MAX on Solaris
- - - - -
bca25992 by Raymond Toy at 2024-09-09T19:04:58+00:00
Merge branch 'issue-357-elf-include-limits.h' into 'master'
Fix #357: Include limits.h to get PATH_MAX on Solaris
Closes #357
See merge request cmucl/cmucl!256
- - - - -
56f2d8fd by Raymond Toy at 2024-09-09T20:36:09+00:00
Fix #356: Put x87 status word in low 16 bits of mode word
- - - - -
c8020846 by Raymond Toy at 2024-09-09T20:36:12+00:00
Merge branch 'issue-356-x87-status-word-in-low-part' into 'master'
Fix #356: Put x87 status word in low 16 bits of mode word
Closes #356
See merge request cmucl/cmucl!255
- - - - -
133f2970 by Raymond Toy at 2024-09-09T13:42:36-07:00
Merge branch 'master' into issue-355-solaris-x86-fp-trap-handler
- - - - -
6 changed files:
- .gitlab-ci.yml
- bin/make-dist.sh
- bin/make-extra-dist.sh
- bin/make-main-dist.sh
- bin/make-src-dist.sh
- src/compiler/x86/float-sse2.lisp
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -98,6 +98,18 @@ linux:test:
script:
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
+linux:exec-test:
+ stage: test
+ tags:
+ - linux
+ needs:
+ - job: linux:build
+ artifacts: true
+ script:
+ # Create an executable and test it by printing the version.
+ - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
+ - ./saved-lisp-executable --version
+
linux:cross-test:
stage: test
tags:
@@ -202,6 +214,18 @@ osx:test:
- echo LANG = $LANG
- bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
+osx:exec-test:
+ stage: test
+ tags:
+ - macos-virtualbox
+ needs:
+ - job: osx:build
+ artifacts: true
+ script:
+ # Create an executable and test it by printing the version.
+ - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
+ - ./saved-lisp-executable --version
+
osx:ansi-test:
stage: ansi-test
tags:
=====================================
bin/make-dist.sh
=====================================
@@ -12,10 +12,10 @@
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/tools/make-dist.sh,v 1.20 2011/04/11 16:34:49 rtoy Exp $
usage() {
- echo "make-dist.sh: [-hbg] [-G group] [-O owner] [-I destdir] [-M mandir] [-A arch] [-V version] [-o OS] dir"
+ echo "make-dist.sh: [-h] [-C compress] [-G group] [-O owner] [-I destdir] [-M mandir] [-A arch] [-V version] [-o OS] dir"
echo " -h This help"
- echo " -b Use bzip2 compression"
- echo " -g Use gzip compression"
+ echo " -C compress Compression method to use for the tar archives. Must be one of"
+ echo " bzip2, xz, or gzip. The default depends on the OS"
echo " -G group Group to use"
echo " -O owner Owner to use"
echo " -I destdir Install directly to given directory instead of creating a tarball"
@@ -109,15 +109,20 @@ if expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]' > /dev/null; then
DEFAULT_VERSION="${GIT_HASH}"
fi
-while getopts "G:O:I:M:bghSA:o:V:?" arg
+# Default compression is -J (xz). These variables are passed to the
+# other scripts via the environmen, so export them.
+COMPRESS=-J
+COMPRESS_EXT=xz
+COMPRESS_NAME=xz
+
+while getopts "C:G:O:I:M:hSA:o:V:?" arg
do
case $arg in
+ C) COMPRESS_ARG=$OPTARG ;;
G) GROUP=$OPTARG ;;
O) OWNER=$OPTARG ;;
I) INSTALL_DIR=$OPTARG ;;
M) MANDIR=$OPTARG ;;
- b) ENABLE_BZIP=-b ;;
- g) ENABLE_GZIP=-g ;;
S) MAKE_SRC_DIST=yes ;;
A) ARCH=$OPTARG ;;
o) OS=$OPTARG ;;
@@ -133,6 +138,27 @@ if [ $# -lt 1 ]; then
usage
fi
+# Verify that the -C option is valid
+if [ -n "$COMPRESS_ARG" ]; then
+ case $COMPRESS_ARG in
+ bzip2)
+ COMPRESS=-j
+ COMPRESS_EXT=bz2
+ COMPRESS_NAME=bzip2
+ ;;
+ xz) # Defaults work
+ ;;
+ gzip)
+ COMPRESS=-z
+ COMPRESS_EXT=gz
+ COMPRESS_NAME=gzip
+ ;;
+ *) echo '-C option "'$COMPRESS_ARG'" must be one of bzip2, xz or gzip'
+ exit 1
+ ;;
+ esac
+fi
+
if [ -z "$VERSION" ]; then
# If a default version exists, use it. Otherwise this is an
# error---at least one of these must not be empty.
@@ -171,21 +197,17 @@ fi
echo cmucl-$VERSION-$ARCH-$OS
ROOT=`dirname $0`
-# If no compression options given, default to bzip
-if [ -z "$ENABLE_GZIP" -a -z "$ENABLE_BZIP" ]; then
- ENABLE_BZIP="-b"
-fi
-
-OPTIONS="${GROUP:+ -G ${GROUP}} ${OWNER:+ -O ${OWNER}} ${INSTALL_DIR:+ -I ${INSTALL_DIR}} $ENABLE_GZIP $ENABLE_BZIP"
+GTAR_OPTS="-t ${GTAR:-tar}"
+EXTRA_OPTS="${GROUP:+ -G ${GROUP}} ${OWNER:+ -O ${OWNER}}"
+INSTALL_OPTS="${INSTALL_DIR:+ -I ${INSTALL_DIR}}"
MANDIR="${MANDIR:+ -M ${MANDIR}}"
+OPTIONS="${GTAR_OPTS} ${EXTRA_OPTS} ${INSTALL_OPTS} ${MANDIR}"
+set -x
echo Creating distribution for $ARCH $OS
-$ROOT/make-main-dist.sh $OPTIONS ${MANDIR} $TARGET $VERSION $ARCH $OS || exit 1
-$ROOT/make-extra-dist.sh $OPTIONS $TARGET $VERSION $ARCH $OS || exit 2
+$ROOT/make-main-dist.sh -C $COMPRESS -E $COMPRESS_EXT $OPTIONS ${MANDIR} $TARGET $VERSION $ARCH $OS || exit 1
+$ROOT/make-extra-dist.sh -C $COMPRESS -E $COMPRESS_EXT $OPTIONS $TARGET $VERSION $ARCH $OS || exit 2
if [ X"$MAKE_SRC_DIST" = "Xyes" ]; then
- # If tar is not GNU tar, set the environment variable GTAR to
- # point to GNU tar.
- OPTIONS="${INSTALL_DIR:+ -I ${INSTALL_DIR}} $ENABLE_GZIP $ENABLE_BZIP"
- $ROOT/make-src-dist.sh $OPTIONS -t ${GTAR:-tar} $VERSION
+ $ROOT/make-src-dist.sh -C $COMPRESS -E $COMPRESS_EXT ${GTAR_OPTS} ${INSTALL_OPTS} $VERSION
fi
=====================================
bin/make-extra-dist.sh
=====================================
@@ -1,23 +1,57 @@
#!/bin/sh
-while getopts "G:O:I:bgh?" arg
+usage() {
+ cat <<EOF
+`basename $0` -C option -E ext [-t tar] [-I destdir] [-G group] [-O owner]
+ -h This help
+ -? This help
+ -t tar Tar program to use
+ -C option Tar option for compressing the tarball; required.
+ -E ext Extension to use for the tarball. Must be consistent with
+ -C option. Required.
+ -I destdir Install directly to given directory instead of creating a tarball
+ -G group Group to use
+ -O owner Owner to use
+
+This is generally called by make-dist.sh and not normally invoked by the user
+
+Create a tarball of the extra components for cmucl. This includes things like
+CLX; Hemlock; CLM; contrib library not already included in the main
+distribution; locale messages.
+EOF
+ exit 1
+}
+
+GTAR=tar
+while getopts "C:E:G:O:I:t:h?" arg
do
case $arg in
+ C) COMPRESS=$OPTARG ;;
+ E) COMPRESS_EXT=$OPTARG ;;
G) GROUP="-g $OPTARG" ;;
O) OWNER="-o $OPTARG" ;;
I) INSTALL_DIR=$OPTARG ;;
- b) ENABLE_BZIP=-b ;;
- g) ENABLE_GZIP=-g ;;
+ t) GTAR=$OPTARG ;;
h | \?) usage; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
+# -C and -E options are required
+if [ -z "$COMPRESS" ]; then
+ echo "-C option is required"
+ exit 2
+fi
+
+if [ -z "$COMPRESS_EXT" ]; then
+ echo "-E option is required"
+ exit 2
+fi
+
if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
then
- echo "Usage: $0 target-directory version arch os"
- exit 1
+ usage
fi
if [ ! -d "$1" ]
@@ -134,16 +168,7 @@ done
if [ -z "$INSTALL_DIR" ]; then
sync ; sleep 1 ; sync ; sleep 1 ; sync
echo Tarring extra components
- if [ -n "$ENABLE_GZIP" ]; then
- echo " Compressing with gzip"
- ( cd $DESTDIR >/dev/null ; tar cf - lib ) | \
- gzip -c > cmucl-$VERSION-$ARCH-$OS.extra.tar.gz
- fi
- if [ -n "$ENABLE_BZIP" ]; then
- echo " Compressing with bzip"
- ( cd $DESTDIR >/dev/null ; tar cf - lib ) | \
- bzip2 > cmucl-$VERSION-$ARCH-$OS.extra.tar.bz2
- fi
+ $GTAR -C $DESTDIR $COMPRESS -cf cmucl-$VERSION-$ARCH-$OS.extra.tar.$COMPRESS_EXT lib
echo Cleaning $DESTDIR
[ -d $DESTDIR ] && rm -rf $DESTDIR
=====================================
bin/make-main-dist.sh
=====================================
@@ -1,25 +1,61 @@
#!/bin/sh
-# set -x
-while getopts "G:O:I:M:bgh?" arg
+usage() {
+ cat <<EOF
+`basename $0` -C option -E ext [-h?] [-t tar][-I destdir] [-G group] [-O owner] [-M mandir]
+ target-directory version arch os
+ -h This help
+ -? This help
+ -t tar Tar program to use
+ -C option Tar option for compressing the tarball; required.
+ -E ext Extension to use for the tarball. Must be consistent with
+ -C option. Required.
+ -I destdir Install directly to given directory instead of creating a tarball
+ -G group Group to use
+ -O owner Owner to use
+ -M mandir Install manpages in this subdirectory. Default is man/man1
+
+This is generally called by make-dist.sh and not normally invoked by the user
+
+Create a tarball consisting of the main components needed to distribute
+a binary installation of cmucl. This includes the C executable and support
+libraries; the subsystems like Gray streams, and simple streams; external
+formats; contribs like asdf and defsystem; manpages and READMEs."
+EOF
+ exit 1
+}
+
+GTAR=tar
+while getopts "C:E:G:O:I:M:t:h?" arg
do
case $arg in
+ C) COMPRESS=$OPTARG ;;
+ E) COMPRESS_EXT=$OPTARG ;;
G) GROUP="-g $OPTARG" ;;
O) OWNER="-o $OPTARG" ;;
I) INSTALL_DIR=$OPTARG ;;
M) MANDIR=$OPTARG ;;
- b) ENABLE_BZIP=-b ;;
- g) ENABLE_GZIP=-g ;;
+ t) GTAR=$OPTARG ;;
h | \?) usage; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
+# -C and -E options are required
+if [ -z "$COMPRESS" ]; then
+ echo "-C option is required"
+ exit 2
+fi
+
+if [ -z "$COMPRESS_EXT" ]; then
+ echo "-E option is required"
+ exit 2
+fi
+
if [ "$1" = "" -o "$2" = "" -o "$3" = "" -o "$4" = "" ]
then
- echo "Usage: $0 target-directory version arch os"
- exit 1
+ usage
fi
if [ ! -d "$1" ]
@@ -178,16 +214,7 @@ fi
if [ -z "$INSTALL_DIR" ]; then
sync ; sleep 1 ; sync ; sleep 1 ; sync
echo Tarring main components
- if [ -n "$ENABLE_GZIP" ]; then
- echo " Compressing with gzip"
- ( cd $DESTDIR >/dev/null ; tar cf - . ) | \
- gzip -c > cmucl-$VERSION-$ARCH-$OS.tar.gz
- fi
- if [ -n "$ENABLE_BZIP" ]; then
- echo " Compressing with bzip"
- ( cd $DESTDIR >/dev/null ; tar cf - . ) | \
- bzip2 > cmucl-$VERSION-$ARCH-$OS.tar.bz2
- fi
+ $GTAR -C $DESTDIR $COMPRESS -cf cmucl-$VERSION-$ARCH-$OS.tar.$COMPRESS_EXT .
echo Cleaning $DESTDIR
[ -d $DESTDIR ] && rm -rf $DESTDIR
=====================================
bin/make-src-dist.sh
=====================================
@@ -1,22 +1,31 @@
#!/bin/sh
usage() {
- echo "make-src-dist.sh: [-bgh] [-t gnutar] [-I destdir] version"
- echo " -h This help"
- echo " -b Use bzip2 compression"
- echo " -g Use gzip compression"
- echo " -t tar Name/path to GNU tar"
- echo " -I destdir Install directly to given directory instead of creating a tarball"
- echo ""
- echo 'Create a tar ball of the cmucl sources. The tarball is named '
- echo 'cmucl-src-$version.tar.bz2 (or gz if using gzip compression)'
+ cat <<EOF
+`basename $0` -C option -E ext [-h?] [-t gnutar] [-I destdir] [version]
+ -h This help
+ -? This help
+ -t tar Name/path to GNU tar
+ -C option Tar option for compressing the tarball; required.
+ -E ext Extension to use for the tarball. Must be consistent with
+ -C option. Required.
+ -I destdir Install directly to given directory instead of creating a tarball
+ version The version. Defaults to the current date
+
+This is generally called by make-dist.sh and not normally invoked by the user
+
+Create a tar ball of the cmucl sources."
+EOF
+ exit 1
}
-while getopts "bgh?t:I:" arg
+GTAR=tar
+
+while getopts "C:E:h?t:I:" arg
do
case $arg in
- b) ENABLE_BZIP=-b ;;
- g) ENABLE_GZIP=-g ;;
+ C) COMPRESS=$OPTARG ;;
+ E) COMPRESS_EXT=$OPTARG ;;
t) GTAR=$OPTARG ;;
I) INSTALL_DIR=$OPTARG ;;
h | \?) usage; exit 1 ;;
@@ -25,10 +34,15 @@ done
shift `expr $OPTIND - 1`
-# If no compression given, default to gzip (on the assumption that
-# that is available everywhere.)
-if [ -z "$ENABLE_BZIP" -a -z "$ENABLE_GZIP" ]; then
- ENABLE_GZIP=-b
+# -C and -E options are required
+if [ -z "$COMPRESS" ]; then
+ echo "-C option is required"
+ exit 2
+fi
+
+if [ -z "$COMPRESS_EXT" ]; then
+ echo "-E option is required"
+ exit 2
fi
# If no version is given, default to today's date
@@ -39,20 +53,11 @@ else
fi
echo Creating source distribution
-if [ -n "$ENABLE_GZIP" ]; then
- ZIP="gzip -c"
- ZIPEXT="gz"
-fi
-if [ -n "$ENABLE_BZIP" ]; then
- ZIP="bzip2"
- ZIPEXT="bz2"
-fi
-
GTAR_OPTIONS="--exclude=.git --exclude='*.pot.~*~'"
if [ -z "$INSTALL_DIR" ]; then
- echo " Compressing with $ZIP"
- ${GTAR:-tar} ${GTAR_OPTIONS} -cf - bin src tests | ${ZIP} > cmucl-src-$VERSION.tar.$ZIPEXT
+ # echo " Compressing with $ZIP"
+ ${GTAR} ${GTAR_OPTIONS} ${COMPRESS} -cf cmucl-src-$VERSION.tar.$COMPRESS_EXT bin src tests
else
# Install in the specified directory
- ${GTAR:-tar} ${GTAR_OPTIONS} -cf - bin src tests | (cd $INSTALL_DIR; ${GTAR:-tar} xf -)
+ ${GTAR} ${GTAR_OPTIONS} -cf - bin src tests | (cd $INSTALL_DIR; ${GTAR:-tar} xf -)
fi
=====================================
src/compiler/x86/float-sse2.lisp
=====================================
@@ -1399,7 +1399,8 @@
(inst xor sw-reg #x3f) ; invert exception mask
(move res sw-reg)
;; Put status word in the low 16 bits and the control word in the
- ;; high 16 bits.
+ ;; high 16 bits. This is to match the SSE2 mxcsr register that has
+ ;; the status bits (sticky bits) in lowest part of the word.
(inst rol res 16)))
;; Set the control and status words from the FPU. The low 16 bits
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4032cffb2259f69b559e88…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/4032cffb2259f69b559e88…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
56f2d8fd by Raymond Toy at 2024-09-09T20:36:09+00:00
Fix #356: Put x87 status word in low 16 bits of mode word
- - - - -
c8020846 by Raymond Toy at 2024-09-09T20:36:12+00:00
Merge branch 'issue-356-x87-status-word-in-low-part' into 'master'
Fix #356: Put x87 status word in low 16 bits of mode word
Closes #356
See merge request cmucl/cmucl!255
- - - - -
2 changed files:
- src/code/float-trap.lisp
- src/compiler/x86/float-sse2.lisp
Changes:
=====================================
src/code/float-trap.lisp
=====================================
@@ -102,9 +102,11 @@
;; FPU and only use the SSE2 rounding control bits.
(let* ((x87-modes (vm::x87-floating-point-modes))
(sse-modes (vm::sse2-floating-point-modes))
+ (x87-exceptions (logand #x3f x87-modes))
+ (x87-enables (logand #x3f (ash x87-modes -16)))
(final-mode (logior sse-modes
- (ash (logand #x3f x87-modes) 7) ; control
- (logand #x3f (ash x87-modes -16)))))
+ x87-exceptions
+ (ash x87-enables 7))))
final-mode))
(defun (setf floating-point-modes) (new-mode)
@@ -112,15 +114,17 @@
;; Set the floating point modes for both X87 and SSE2. This
;; include the rounding control bits.
(let* ((rc (ldb float-rounding-mode new-mode))
+ (new-exceptions (logand #x3f new-mode))
+ (new-enables (logand #x3f (ash new-mode -7)))
(x87-modes
- (logior (ash (logand #x3f new-mode) 16)
+ (logior new-exceptions
(ash rc 10)
- (logand #x3f (ash new-mode -7))
+ (ash new-enables 16)
;; Set precision control to be 64-bit, always. We
;; don't use the x87 registers with sse2, so this
;; is ok and would be the correct setting if we
;; ever support long-floats.
- (ash 3 8))))
+ (ash 3 (+ 8 16)))))
(setf (vm::sse2-floating-point-modes) (ldb (byte 24 0) new-mode))
(setf (vm::x87-floating-point-modes) (ldb (byte 24 0) x87-modes)))
new-mode)
=====================================
src/compiler/x86/float-sse2.lisp
=====================================
@@ -1380,7 +1380,7 @@
float-modes)
;; Extract the control and status words from the FPU. The low 16 bits
-;; contain the control word, and the high 16 bits contain the status.
+;; contain the status word, and the high 16 bits contain the control.
(define-vop (x87-floating-point-modes)
(:results (res :scs (unsigned-reg)))
(:result-types unsigned-num)
@@ -1396,12 +1396,16 @@
(inst byte #x66) ; operand size prefix
(inst or sw-reg cw-stack)
(inst xor sw-reg #x3f) ; invert exception mask
- (move res sw-reg)))
+ (move res sw-reg)
+ ;; Put status word in the low 16 bits and the control word in the
+ ;; high 16 bits. This is to match the SSE2 mxcsr register that has
+ ;; the status bits (sticky bits) in lowest part of the word.
+ (inst rol res 16)))
;; Set the control and status words from the FPU. The low 16 bits
-;; contain the control word, and the high 16 bits contain the status.
+;; contain the status word, and the high 16 bits contain the control.
(define-vop (x87-set-floating-point-modes)
- (:args (new :scs (unsigned-reg) :to :result :target res))
+ (:args (new-modes :scs (unsigned-reg) :to :result :target res))
(:results (res :scs (unsigned-reg)))
(:arg-types unsigned-num)
(:result-types unsigned-num)
@@ -1410,7 +1414,12 @@
(:temporary (:sc unsigned-stack) cw-stack)
(:temporary (:sc byte-reg :offset al-offset) sw-reg)
(:temporary (:sc unsigned-reg :offset ecx-offset) old)
+ (:temporary (:sc unsigned-reg) new)
(:generator 6
+ (move new new-modes)
+ ;; Put the status word in the high 16 bits and the control word in
+ ;; the low 16 bits.
+ (inst rol new 16)
(inst mov cw-stack new)
(inst xor cw-stack #x3f) ; invert exception mask
(inst fnstsw)
@@ -1425,7 +1434,7 @@
(inst fldenv (make-ea :dword :base esp-tn))
(inst add esp-tn 28)
DONE
- (move res new)))
+ (move res new-modes)))
(defun sse2-floating-point-modes ()
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/bca25992c5fc536391f39f…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/bca25992c5fc536391f39f…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-356-x87-status-word-in-low-part at cmucl / cmucl
Commits:
4949a011 by Raymond Toy at 2024-09-09T12:07:55-07:00
Address review comments
Add comment to say we're doing this to match the SSE2 mxcsr register
so the sticky bits are in the same place.
- - - - -
1 changed file:
- src/compiler/x86/float-sse2.lisp
Changes:
=====================================
src/compiler/x86/float-sse2.lisp
=====================================
@@ -1398,7 +1398,8 @@
(inst xor sw-reg #x3f) ; invert exception mask
(move res sw-reg)
;; Put status word in the low 16 bits and the control word in the
- ;; high 16 bits.
+ ;; high 16 bits. This is to match the SSE2 mxcsr register that has
+ ;; the status bits (sticky bits) in lowest part of the word.
(inst rol res 16)))
;; Set the control and status words from the FPU. The low 16 bits
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4949a01101a79a81c4fcc90…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4949a01101a79a81c4fcc90…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
e20f2727 by Raymond Toy at 2024-09-09T19:04:53+00:00
Fix #357: Include limits.h to get PATH_MAX on Solaris
- - - - -
bca25992 by Raymond Toy at 2024-09-09T19:04:58+00:00
Merge branch 'issue-357-elf-include-limits.h' into 'master'
Fix #357: Include limits.h to get PATH_MAX on Solaris
Closes #357
See merge request cmucl/cmucl!256
- - - - -
1 changed file:
- src/lisp/elf.c
Changes:
=====================================
src/lisp/elf.c
=====================================
@@ -18,6 +18,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
+#include <limits.h>
#include "os.h"
#include "core.h"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/40e553b60270947945782b…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/40e553b60270947945782b…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-355-solaris-x86-fp-trap-handler at cmucl / cmucl
Commits:
82c50cbc by Raymond Toy at 2024-09-07T06:41:04-07:00
Tighten up float-modes deftype
The existing `float-modes` type is `(unsigned-byte 24)`. However, for
x87, the float mode can be at least 26 bits long. This showed up
running the unit test suite. Examining the bits in the control word
shows that 26 is the max, if you ignore the reserved bits at the high
part of the control word.
For sse2, the mxcsr register only has 16 defined bits.
Thus, split `float-modes` into separate types, one for x87 and one for sse2.
- - - - -
1 changed file:
- src/compiler/x86/float-sse2.lisp
Changes:
=====================================
src/compiler/x86/float-sse2.lisp
=====================================
@@ -1265,7 +1265,8 @@
;;;; Float mode hackery:
-(deftype float-modes () '(unsigned-byte 24))
+(deftype x87-float-modes () '(unsigned-byte 32))
+(deftype sse2-float-modes () '(unsigned-byte 16))
;; For the record, here is the format of the MXCSR register.
;;
@@ -1288,8 +1289,8 @@
;; 0 invalid operation flag
;;
;; See below for rounding control
-(defknown sse2-floating-point-modes () float-modes (flushable))
-(defknown ((setf sse2-floating-point-modes)) (float-modes) float-modes)
+(defknown sse2-floating-point-modes () sse2-float-modes (flushable))
+(defknown ((setf sse2-floating-point-modes)) (sse2-float-modes) sse2-float-modes)
;; Returns exactly the mxcsr register, except the masks are flipped
;; because we want exception enable flags, not masks.
@@ -1375,9 +1376,9 @@
;; 10 double precision (53 bits)
;; 11 double extended precision (64 bits)
-(defknown x87-floating-point-modes () float-modes (flushable))
-(defknown ((setf x87-floating-point-modes)) (float-modes)
- float-modes)
+(defknown x87-floating-point-modes () x87-float-modes (flushable))
+(defknown ((setf x87-floating-point-modes)) (x87-float-modes)
+ x87-float-modes)
;; Extract the control and status words from the FPU. The low 16 bits
;; contain the status word, and the high 16 bits contain the control.
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/82c50cbcb9448008afb72da…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/82c50cbcb9448008afb72da…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-355-solaris-x86-fp-trap-handler at cmucl / cmucl
Commits:
0d4d754f by Raymond Toy at 2024-09-06T19:26:01-07:00
Comment out debugging prints
We leave these in for now in case we need them for more debugging.
- - - - -
1 changed file:
- src/code/float-trap.lisp
Changes:
=====================================
src/code/float-trap.lisp
=====================================
@@ -483,15 +483,17 @@
(defun sigfpe-handler (signal code scp)
(declare (ignore signal)
(type system-area-pointer scp))
+ #+nil
(format t "***Enter Handler***~%")
(let* ((modes (sigcontext-floating-point-modes
(alien:sap-alien scp (* unix:sigcontext))))
(current-x87-modes (vm::x87-floating-point-modes))
(current-sse2-modes (vm::sse2-floating-point-modes)))
+ #+nil
(progn
- (format t "Current modes: ~32,'0b~%" modes)
- (format t "Current HW x87 modes: ~32,'0b~%" current-x87-modes)
- (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
+ (format t "Current modes: ~32,'0b~%" modes)
+ (format t "Current HW x87 modes: ~32,'0b~%" current-x87-modes)
+ (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes))
(multiple-value-bind (fop operands)
(let ((sym (find-symbol "GET-FP-OPERANDS" "VM")))
@@ -505,6 +507,7 @@
;; This means we need to restore the fpu state ourselves.
(unwind-protect
(let ((fpe-info (second (assoc code +fpe-code-info-alist+))))
+ #+nil
(format t "fpe code = ~D~%" code)
(if fpe-info
(error fpe-info
@@ -520,20 +523,25 @@
(logandc2 current-x87-modes trap-bit))
(new-sse2-modes
(logandc2 current-sse2-modes trap-bit)))
- (format t "***Cleanup***~%")
- (format t "Trap bit: ~D~%" trap-bit)
- (format t "Current modes: ~32,'0b~%" (vm::floating-point-modes))
- (format t "Current HW x87 modes: ~32,'0b~%" current-x87-modes)
- (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
- (format t "New x87 modes: ~32,'0b~%" new-x87-modes)
- (format t "New sse2 modes: ~32,'0b~%" new-sse2-modes)
+ #+nil
+ (progn
+ (format t "***Cleanup***~%")
+ (format t "Trap bit: ~D~%" trap-bit)
+ (format t "Current modes: ~32,'0b~%" (vm::floating-point-modes))
+ (format t "Current HW x87 modes: ~32,'0b~%" current-x87-modes)
+ (format t "Current HW sse2 modes: ~32,'0b~%" current-sse2-modes)
+ (format t "New x87 modes: ~32,'0b~%" new-x87-modes)
+ (format t "New sse2 modes: ~32,'0b~%" new-sse2-modes))
+ #+nli
(format t "Setting new sse2 modes~%")
(setf (vm::sse2-floating-point-modes) new-sse2-modes)
+ #+nil
(format t "Setting new x87 modes~%")
(setf (vm::x87-floating-point-modes) new-x87-modes)
-
- (format t "new x87 modes: ~32,'0b~%" (vm::x87-floating-point-modes))
- (format t "new sse2 modes: ~32,'0b~%" (vm::sse2-floating-point-modes))))))))
+ #+nil
+ (progn
+ (format t "new x87 modes: ~32,'0b~%" (vm::x87-floating-point-modes))
+ (format t "new sse2 modes: ~32,'0b~%" (vm::sse2-floating-point-modes))))))))
#-(and solaris x86)
(macrolet
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/0d4d754fe5b899005b6f6d8…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/0d4d754fe5b899005b6f6d8…
You're receiving this email because of your account on gitlab.common-lisp.net.