[cmucl-cvs] [git] CMU Common Lisp branch master updated. snapshot-2012-05-3-gc4ee759

Raymond Toy rtoy at common-lisp.net
Fri May 25 03:27:44 UTC 2012

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  c4ee759adf765707fba62c154315f0ed3e9036db (commit)
      from  c17392f461f177128fe189fc3f3efe30f836eec3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c4ee759adf765707fba62c154315f0ed3e9036db
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Thu May 24 20:27:37 2012 -0700

    Clear matching current exceptions when enabling new exceptions.  This
    prevents the exception from being resignaled immediately.
    o Clear current and accrued exception bits that match any new enabled
      exceptions specified by :traps.
    o Update.

diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp
index d800e14..6616146 100644
--- a/src/code/float-trap.lisp
+++ b/src/code/float-trap.lisp
@@ -155,7 +155,19 @@
    currently in effect."
   (let ((modes (floating-point-modes)))
     (when traps-p
-      (setf (ldb float-traps-byte modes) (float-trap-mask traps)))
+      (let ((trap-mask-bits (float-trap-mask traps)))
+	(setf (ldb float-traps-byte modes) trap-mask-bits)
+	#+(and x86 sse2)
+	(progn
+	  ;; Clear out any current or accrued exceptions that match
+	  ;; the traps that we are enabling.  If we don't then
+	  ;; enabling the traps causes the exceptions to be signaled
+	  ;; immediately.  This is a bit annoying.  If the user really
+	  ;; wants to resignal the exceptions, he can do that himself.
+	  (setf (ldb float-sticky-bits modes)
+		(logandc2 (ldb float-sticky-bits modes) trap-mask-bits))
+	  (setf (ldb float-exceptions-byte modes)
+		(logandc2 (ldb float-exceptions-byte modes) trap-mask-bits)))))
     (when round-p
       (setf (ldb float-rounding-mode modes)
 	    (or (cdr (assoc rounding-mode rounding-mode-alist))
@@ -175,6 +187,7 @@
       (when (member :invalid current-exceptions)
  	;; Clear out the bits for the detected invalid operation
  	(setf (ldb vm:float-invalid-op-1-byte modes) 0)))
     (when fast-mode-p
       (if fast-mode
 	  (setq modes (logior float-fast-bit modes))
diff --git a/src/general-info/release-20d.txt b/src/general-info/release-20d.txt
index 0a5c224..9dbf560 100644
--- a/src/general-info/release-20d.txt
+++ b/src/general-info/release-20d.txt
@@ -42,7 +42,14 @@ New in this release:
     * Updated to Unicode 6.1.0.
     * Many additional aliases for external formats added that match
       the glibc iconv aliases.
-    * Implement faster LOGCOUNT function, if :SSE3 feature is available.
+    * Implement faster LOGCOUNT function on x86, if :SSE3 feature is
+      available.  (Only applies to new uses of LOGCOUNT.  The core
+      uses the default version.)
+    * On x86, SET-FLOATING-POINT-MODES clears any current and accrued
+      exceptions that match exceptions in :TRAPS.  Previously,
+      enabling a trap when the current exception also listed that trap
+      caused the exception to be immediately signaled.  This no longer
+      happens and now matches how ppc and sparc behave.
   * ANSI compliance fixes:
     * CMUCL was not printing pathnames like (make-pathname :directory


Summary of changes:
 src/code/float-trap.lisp         |   15 ++++++++++++++-
 src/general-info/release-20d.txt |    9 ++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

CMU Common Lisp

More information about the cmucl-cvs mailing list