X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat-trap.lisp;h=4bf0429e50f2a7a71ead1d57c7c4c7b75c4d3951;hb=cee8ef591040db9a79cdd19297867672a9529051;hp=86f402edf708ae3c22aec61807100511eacd40db;hpb=f60e9933a652a3b6ff5d3176f85a41833c1bc338;p=sbcl.git diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index 86f402e..4bf0429 100644 --- a/src/code/float-trap.lisp +++ b/src/code/float-trap.lisp @@ -118,7 +118,7 @@ in effect." (or (cdr (assoc precision *precision-mode-alist*)) (error "unknown precision mode: ~S" precision)))) ;; FIXME: This apparently doesn't work on Darwin - #!-(and darwin (or ppc x86)) + #!-(and darwin ppc) (setf (floating-point-modes) modes)) (values)) @@ -195,8 +195,12 @@ sets the floating point modes to their current values (and thus is a no-op)." (declare (type system-area-pointer info)) (let ((code (sb!unix::siginfo-code info))) (with-interrupts - (error (or (cdr (assoc code *sigfpe-code-error-alist*)) - 'floating-point-exception))))) + ;; Reset the accumulated exceptions, may be needed on other + ;; platforms too, at least Linux doesn't seem to require it. + #!+sunos + (setf (ldb sb!vm::float-sticky-bits (floating-point-modes)) 0) + (error (or (cdr (assoc code *sigfpe-code-error-alist*)) + 'floating-point-exception))))) ;;; Execute BODY with the floating point exceptions listed in TRAPS ;;; masked (disabled). TRAPS should be a list of possible exceptions