(or (cdr (assoc precision *precision-mode-alist*))
(error "unknown precision mode: ~S" precision))))
;; FIXME: This apparently doesn't work on Darwin
- #!-darwin (setf (floating-point-modes) modes))
+ #!-(and darwin ppc)
+ (setf (floating-point-modes) modes))
(values))
(defun get-floating-point-modes ()
;;; disabled by default. Joe User can explicitly enable them if
;;; desired.
(defvar *saved-floating-point-modes*
- '(:traps (:overflow #!-netbsd :invalid :divide-by-zero)
+ '(:traps (:overflow #!-(or netbsd ppc) :invalid :divide-by-zero)
:rounding-mode :nearest :current-exceptions nil
:accrued-exceptions nil :fast-mode nil
#!+x86 :precision #!+x86 :53-bit))
(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