[Git][cmucl/cmucl][rtoy-15-handle-fpu-exceptions] In WITH-FLOAT-TRAPS-*, remove the unused junk modifying the state.
Raymond Toy
rtoy at common-lisp.net
Sun Jan 10 23:42:52 UTC 2016
Raymond Toy pushed to branch rtoy-15-handle-fpu-exceptions at cmucl / cmucl
Commits:
d9763e90 by Raymond Toy at 2016-01-10T15:42:41Z
In WITH-FLOAT-TRAPS-*, remove the unused junk modifying the state.
We just want to return the original modes, so remove all the old
commented out stuff that was modifying the original modes to some
strange state. This makes a lot more sense to me if
WITH-FLOAT-TRAPS-* actually restored the modes exactly as they were
before running the body.
- - - - -
1 changed file:
- src/code/float-trap.lisp
Changes:
=====================================
src/code/float-trap.lisp
=====================================
--- a/src/code/float-trap.lisp
+++ b/src/code/float-trap.lisp
@@ -451,6 +451,10 @@
;; representing the invalid operation. Otherwise, if we
;; enable the invalid trap later, these sticky bits will cause
;; an exception.
+ ;;
+ ;; FIXME: Consider removing these for ppc. Since
+ ;; we now restore the original modes exactly, I
+ ;; don't think these are needed anymore.
#+ppc
(invalid-mask (if (member :invalid traps)
(dpb 0
@@ -467,21 +471,8 @@
(logand (,',merge-traps ,orig-modes ,trap-mask)
,exception-mask)))
, at body)
- ;; Restore the original traps and exceptions.
- (format *debug-io* "Saved fpu mode: #x~4,'0x: ~S~%"
- ,orig-modes (decode-floating-point-modes ,orig-modes))
- (format *debug-io* "Current fpu mode: #x~4,'0x: ~S~%"
- (floating-point-modes) (get-floating-point-modes))
- #+nil
- (setf (floating-point-modes)
- (logior (logand ,orig-modes ,(logior traps exceptions))
- (logand ,orig-modes
- ,(logand trap-mask exception-mask)
- #+ppc
- ,invalid-mask
- #+mips ,(dpb 0 float-exceptions-byte #xffffffff))))
- (setf (floating-point-modes) ,orig-modes)
- ))))))))
+ ;; Restore the modes exactly as they were.
+ (setf (floating-point-modes) ,orig-modes)))))))))
;; WITH-FLOAT-TRAPS-MASKED -- Public
(with-float-traps masked logand
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/d9763e9075310cfbbae3f43f0cc7d638a95872ae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20160110/eaa23805/attachment.html>
More information about the cmucl-cvs
mailing list