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.

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

exports.lisp:
o Export the new arithmetic error type.

float-trap.lisp:
o Check the denormal trap bit and signal the appropriate error.

release-20c.txt:
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) ())
#+x86
(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 @@
"FIND-IF" "FIND-IF-NOT" "FIND-PACKAGE"
"FIND-RESTART" "FIND-SYMBOL" "FINISH-OUTPUT" "FIRST" "FIXNUM"
"FLET" "FLOAT" "FLOAT-DIGITS" "FLOAT-PRECISION" "FLOAT-RADIX"
"FLOAT-SIGN" "FLOATING-POINT-INEXACT"
"FLOAT-SIGN"
"FLOATING-POINT-DENORMAL-OPERAND"
"FLOATING-POINT-INEXACT"
"FLOATING-POINT-INVALID-OPERATION"
"FLOATING-POINT-OVERFLOW" "FLOATING-POINT-UNDERFLOW"
"FLOATP" "FLOOR" "FMAKUNBOUND" "FORCE-OUTPUT" "FORMAT" "FORMATTER"
......
......@@ -289,6 +289,11 @@
(error 'floating-point-inexact
:operation fop
:operands operands))
#+x86
((not (zerop (logand float-denormal-trap-bit traps)))
(error 'floating-point-denormal-operand
:operation fop
:operands operands))
(t
;; 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