0.8.3.68:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Sep 2003 15:09:01 +0000 (15:09 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Sep 2003 15:09:01 +0000 (15:09 +0000)
Kludge around an apparent problem in hardware/kernel/somewhere
to do with denormalized float traps...
... explicitly clear that bit in os_restore_fp_control();
... document in BUGS;
... handle ARITHMETIC-ERROR, not just DIVISION-BY-ZERO, so that
ports without fp words in sigcontext pass the test

BUGS
NEWS
src/runtime/alpha-linux-os.c
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index 4158710..b9fb007 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -1245,3 +1245,13 @@ WORKAROUND:
   requires less registers than [x y z + +]. This transformation is
   currently performed with source transforms, but it would be good to
   also perform it in IR1 optimization phase.
+
+290: Alpha floating point and denormalized traps
+  In SBCL 0.8.3.6x on the alpha, we work around what appears to be a
+  hardware or kernel deficiency: the status of the enable/disable
+  denormalized-float traps bit seems to be ambiguous; by the time we
+  get to os_restore_fp_control after a trap, denormalized traps seem
+  to be enabled.  Since we don't want a trap every time someone uses a
+  denormalized float, in general, we mask out that bit when we restore
+  the control word; however, this clobbers any change the user might
+  have made.
diff --git a/NEWS b/NEWS
index 9b4cd01..863001a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2049,6 +2049,10 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
     MEMBER-types to numeric.
   * bug fix: COMPILE-FILE must bind *READTABLE*. (reported by Doug
     McNaught)
+  * bug fix: (SETF AREF) on byte-sized-element arrays with constant index
+    argument now works properly on the Alpha platform.
+  * bug fix: floating point exception treatment on the Alpha platform
+    is improved.
   * fixed some bugs revealed by Paul Dietz' test suite:
     ** the RETURN clause in LOOP is now equivalent to DO (RETURN ...).
     ** ROUND and FROUND now give the right answer when given very
index 5e25e80..9f1e586 100644 (file)
@@ -88,9 +88,17 @@ void
 os_restore_fp_control(os_context_t *context)
 {
     /* FIXME: 0x7E0000 is defined as something useful in constants.h,
-       but without the L, which would probably lead to 32/64-bit
+       but without the UL, which would probably lead to 32/64-bit
        errors if we simply used it here.  Ugh.  CSR, 2003-09-15 */
-    arch_set_fp_control(os_context_fp_control(context) & ~(0x7e0000L));
+    arch_set_fp_control(os_context_fp_control(context) & ~(0x7e0000UL) &
+                       /* KLUDGE: for some reason that I don't
+                       understand, by the time we get here the
+                       "enable denormalized traps" bit in the fp
+                       control word is set.  Since we really don't
+                       want to tra every time someone types
+                       LEAST-POSITIVE-SINGLE-FLOAT into the repl,
+                       mask that bit out.  -- CSR, 2003-09-15 */
+                       ~(0x1UL<<6));
 }
 
 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
index e540206..c1cb8f6 100644 (file)
 ;;; Alpha floating point modes weren't being reset after an exception,
 ;;; leading to an exception on the second compile, below.
 (compile nil '(lambda (x y) (declare (type (double-float 0.0d0) x y)) (/ x y)))
-(handler-bind ((division-by-zero #'abort))
+(handler-bind ((arithmetic-error #'abort))
+  ;; provoke an exception
   (/ 1.0 0.0))
 (compile nil '(lambda (x y) (declare (type (double-float 0.0d0) x y)) (/ x y)))
index 0ec0240..a001817 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.3.67"
+"0.8.3.68"