Commit 7b6eb217 authored by Raymond Toy's avatar Raymond Toy

Properly handle a denormal operand exception. This should get rid of

the occasional problem about SIGFPE's with no exceptions enabled.

o Add floating-point-denormal-operand arithmetic error.

o Export the new arithmetic error type.

o Check the denormal trap bit and signal the appropriate error.

o Update.
parent a34b7f0e
......@@ -53,7 +53,8 @@
arithmetic-error arithmetic-error-operation arithmetic-error-operands
package-error package-error-package division-by-zero
floating-point-overflow floating-point-underflow
floating-point-inexact floating-point-invalid-operation))
floating-point-inexact floating-point-invalid-operation
#+x86 floating-point-denormal-operand))
(in-package "CONDITIONS")
......@@ -1129,6 +1130,8 @@
(define-condition floating-point-underflow (arithmetic-error) ())
(define-condition floating-point-inexact (arithmetic-error) ())
(define-condition floating-point-invalid-operation (arithmetic-error) ())
(define-condition floating-point-denormal-operand (arithmetic-error) ())
;;; This condition is signalled whenever we make a UNKNOWN-TYPE so that
;;; compiler warnings can be emitted as appropriate.
......@@ -720,7 +720,9 @@
......@@ -289,6 +289,11 @@
(error 'floating-point-inexact
:operation fop
:operands operands))
((not (zerop (logand float-denormal-trap-bit traps)))
(error 'floating-point-denormal-operand
:operation fop
:operands operands))
;; It looks like the sigcontext on Solaris/x86 doesn't
;; actually save the status word of the FPU. The
......@@ -145,7 +145,7 @@ New in this release:
actually prevent stack overflows from crashing lisp.
- Fix rounding of numbers larger than a fixnum. (See Trac #10 for
a related issue.)
- Properly handle the denormal operand trap on x86es.
* Trac Tickets:
- #43: unread-char doesn't change file-position
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment