[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2011-10-21-g7b6eb21

Raymond Toy rtoy at common-lisp.net
Sat Oct 15 07:44:47 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  7b6eb2172fe582d5d1278abc041ba097fda9aa32 (commit)
      from  a34b7f0e2796651ac002cefd0811767091a3731a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7b6eb2172fe582d5d1278abc041ba097fda9aa32
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Fri Oct 14 22:44:17 2011 -0700

    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.

diff --git a/code/error.lisp b/code/error.lisp
index f2b2a19..2678d22 100644
--- a/code/error.lisp
+++ b/code/error.lisp
@@ -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.
diff --git a/code/exports.lisp b/code/exports.lisp
index 6749fb0..d34e2d3 100644
--- a/code/exports.lisp
+++ b/code/exports.lisp
@@ -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"
diff --git a/code/float-trap.lisp b/code/float-trap.lisp
index 5cb3b3f..0ac3898 100644
--- a/code/float-trap.lisp
+++ b/code/float-trap.lisp
@@ -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
diff --git a/general-info/release-20c.txt b/general-info/release-20c.txt
index 50bea98..ffe98b5 100644
--- a/general-info/release-20c.txt
+++ b/general-info/release-20c.txt
@@ -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

-----------------------------------------------------------------------

Summary of changes:
 code/error.lisp              |    5 ++++-
 code/exports.lisp            |    4 +++-
 code/float-trap.lisp         |    5 +++++
 general-info/release-20c.txt |    2 +-
 4 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp


More information about the cmucl-commit mailing list