diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index d800e1486a37928fee54f453f5d5d8ccbad6aeff..6616146700d3a0a62a6c477f6fd88f1d7ab323be 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 0a5c2246e8c160d1b86a013ad85e1a3ed8635d0d..9dbf560b4b2b1292c0babd10f7cdd3358c870f2a 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