Skip to content
Snippets Groups Projects
Commit beff9cea authored by dtc's avatar dtc
Browse files

Add a documentation string for the new with-float-traps-masked macro;

from Raymond Toy.
parent ee2f0cbd
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.10 1997/08/30 18:21:32 dtc Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/float-trap.lisp,v 1.11 1997/09/02 04:26:59 dtc Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -198,6 +198,10 @@ ...@@ -198,6 +198,10 @@
;;; WITH-FLOAT-TRAPS-MASKED -- Public ;;; WITH-FLOAT-TRAPS-MASKED -- Public
;;; ;;;
(defmacro with-float-traps-masked (traps &body body) (defmacro with-float-traps-masked (traps &body body)
"Execute BODY with the floating point exceptions listed in TRAPS
masked (disabled). TRAPS should be a list of possible exceptions
which includes :UNDERFLOW, :OVERFLOW, :INEXACT, :INVALID and
:DIVIDE-BY-ZERO."
(let ((trap-mask (dpb (lognot (float-trap-mask traps)) (let ((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))
......
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