Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/float-trap.lisp
    --- a/src/code/float-trap.lisp
    +++ b/src/code/float-trap.lisp
    @@ -417,11 +417,14 @@
     			code)))))))
     
     (macrolet
    -    ((with-float-traps (name logical-op docstring)
    +    ((with-float-traps (name merge-traps docstring)
            ;; Define macros to enable or disable floating-point
            ;; exceptions.  Masked exceptions and enabled exceptions only
            ;; differ whether we AND in the bits or OR them, respectively.
    -       ;; Logical-op is the operation to use.
    +       ;; MERGE-TRAPS is the logical operation to merge the traps with
    +       ;; the current floating-point mode.  Thus, use  and MERGE-EXCEPTIONS is the
    +       ;; logical operation to merge the exceptions (sticky bits) with
    +       ;; the current mode.
            (let ((macro-name (symbolicate "WITH-FLOAT-TRAPS-" name)))
     	 `(progn
     	    (defmacro ,macro-name (traps &body body)
    @@ -450,7 +453,8 @@
     			(progn
     			  (setf (floating-point-modes)
     				(ldb (byte 32 0)
    -				     (,',logical-op ,orig-modes ,(logand trap-mask exception-mask))))
    +				     (logand (,',merge-traps ,orig-modes ,trap-mask)
    +					     ,exception-mask)))
     			  ,@body)
     		     ;; Restore the original traps and exceptions.
     		     (setf (floating-point-modes)