Skip to content
Snippets Groups Projects
Commit b3538815 authored by pw's avatar pw
Browse files

From Ray Toy:

Make orig-modes a gensym in with-float-traps-masked.
parent d129810e
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/float-trap.lisp,v 1.15 1999/12/05 16:22:17 dtc Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/float-trap.lisp,v 1.16 2001/04/12 19:42:36 pw Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -211,15 +211,16 @@ ...@@ -211,15 +211,16 @@
(trap-mask (dpb (lognot (float-trap-mask traps)) (trap-mask (dpb (lognot (float-trap-mask traps))
float-traps-byte #xffffffff)) float-traps-byte #xffffffff))
(exception-mask (dpb (lognot (vm::float-trap-mask traps)) (exception-mask (dpb (lognot (vm::float-trap-mask traps))
float-sticky-bits #xffffffff))) float-sticky-bits #xffffffff))
`(let ((orig-modes (floating-point-modes))) (orig-modes (gensym)))
`(let ((,orig-modes (floating-point-modes)))
(unwind-protect (unwind-protect
(progn (progn
(setf (floating-point-modes) (setf (floating-point-modes)
(logand orig-modes ,(logand trap-mask exception-mask))) (logand ,orig-modes ,(logand trap-mask exception-mask)))
,@body) ,@body)
;; Restore the original traps and exceptions. ;; Restore the original traps and exceptions.
(setf (floating-point-modes) (setf (floating-point-modes)
(logior (logand orig-modes ,(logior traps exceptions)) (logior (logand ,orig-modes ,(logior traps exceptions))
(logand (floating-point-modes) (logand (floating-point-modes)
,(logand trap-mask exception-mask)))))))) ,(logand trap-mask exception-mask))))))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment