X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat-trap.lisp;h=6c1b5c5307a949628c4e844203f5dec19750544c;hb=2c6b90e36a7c0377cd79625eb6c94d580f98cb93;hp=39293abca100a32018ece11e97324c5e2dd1f512;hpb=0b3ec4b1d978b887db175b7b3bada8e727683e15;p=sbcl.git diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index 39293ab..6c1b5c5 100644 --- a/src/code/float-trap.lisp +++ b/src/code/float-trap.lisp @@ -128,6 +128,7 @@ ;;; Signal the appropriate condition when we get a floating-point error. (defun sigfpe-handler (signal info context) (declare (ignore signal info)) + (declare (ignore context)) ; stub! (declare (type system-area-pointer context)) ;; FIXME: The find-the-detailed-problem code below went stale with ;; the big switchover to POSIX signal handling and signal contexts @@ -174,15 +175,16 @@ (trap-mask (dpb (lognot (float-trap-mask traps)) float-traps-byte #xffffffff)) (exception-mask (dpb (lognot (sb!vm::float-trap-mask traps)) - float-sticky-bits #xffffffff))) - `(let ((orig-modes (floating-point-modes))) + float-sticky-bits #xffffffff)) + (orig-modes (gensym))) + `(let ((,orig-modes (floating-point-modes))) (unwind-protect (progn (setf (floating-point-modes) - (logand orig-modes ,(logand trap-mask exception-mask))) + (logand ,orig-modes ,(logand trap-mask exception-mask))) ,@body) ;; Restore the original traps and exceptions. (setf (floating-point-modes) - (logior (logand orig-modes ,(logior traps exceptions)) + (logior (logand ,orig-modes ,(logior traps exceptions)) (logand (floating-point-modes) ,(logand trap-mask exception-mask))))))))