[Cmucl-cvs] [git] CMU Common Lisp branch master updated. snapshot-2014-11-27-g1e4040f

Raymond Toy rtoy at common-lisp.net
Sat Nov 29 08:13:08 UTC 2014


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  1e4040f32e973a1debcec908e4e69147c31a67ec (commit)
      from  1fc53cc336bf03c52a438bb237d95080f00dd203 (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 1e4040f32e973a1debcec908e4e69147c31a67ec
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Sat Nov 29 00:12:55 2014 -0800

    Add function to print a description of the value of the FPSCR
    (floating-point status and control register).

diff --git a/src/compiler/ppc/float.lisp b/src/compiler/ppc/float.lisp
index c5c944b..e928619 100644
--- a/src/compiler/ppc/float.lisp
+++ b/src/compiler/ppc/float.lisp
@@ -938,6 +938,63 @@
 (defknown ((setf floating-point-modes)) (float-modes)
   float-modes)
 
+(defun describe-floating-point-modes (&optional (modes (floating-point-modes)))
+  "Print a description of each bit of the floating point modes in MODES."
+  (format t "31 FX     = ~B FP exception summary~%"
+	  (ldb (byte 1 31) modes))
+  (format t "30 FEX    = ~B FP enabled exception summary~%"
+	  (ldb (byte 1 30) modes))
+  (format t "29 VX     = ~B FP invalid operation exception summary~%"
+	  (ldb (byte 1 29) modes))
+  (format t "28 OX     = ~B FP overflow exception (sticky)~%"
+	  (ldb (byte 1 28) modes))
+  (format t "27 UX     = ~B FP underflow exception (sticky)~%"
+	  (ldb (byte 1 27) modes))
+  (format t "26 ZX     = ~B FP zero divide exception (sticky)~%"
+	  (ldb (byte 1 26) modes))
+  (format t "25 XX     = ~B FP inexact exception (sticky)~%"
+	  (ldb (byte 1 25) modes))
+  (format t "24 VXSNAN = ~B FP invalid operation with SNaN (sticky)~%"
+	  (ldb (byte 1 24) modes))
+  (format t "23 VXISI  = ~B FP invalid operation for inf - inf (sticky)~%"
+	  (ldb (byte 1 23) modes))
+  (format t "22 VXIDI  = ~B FP invalid operation for inf + inf (sticky)~%"
+	  (ldb (byte 1 22) modes))
+  (format t "21 VXZDZ  = ~B FP invalid operation for 0/0 (sticky)~%"
+	  (ldb (byte 1 21) modes))
+  (format t "20 VXIMZ  = ~B FP invalid operation for inf * 0 (sticky)~%"
+	  (ldb (byte 1 20) modes))
+  (format t "19 VXVC   = ~B FP invalid  operation for invalid compare (sticky)~%"
+	  (ldb (byte 1 19) modes))
+  (format t "18 FR     = ~B FP fraction rounded~%"
+	  (ldb (byte 1 18) modes))
+  (format t "17 FI     = ~B FP fraction inexact~%"
+	  (ldb (byte 1 17) modes))
+  (format t "12 FPRF   = ~5,'0B FP result flags~%"
+	  (ldb (byte 5 12) modes))
+  (format t "11 Reserved~%")
+  (format t "10 VXSOFT = ~B FP invalid operation for software request (sticky)~%"
+	  (ldb (byte 1 10) modes))
+  (format t " 9 VXSQRT = ~B FP invalid operation for sqrt (sticky)~%"
+	  (ldb (byte 1  9) modes))
+  (format t " 8 VXCVI  = ~B FP invalid operation for integer convert (sticky)~%"
+	  (ldb (byte 1  8) modes))
+  (format t " 7 VE     = ~B FP invalid operation exception enable~%"
+	  (ldb (byte 1  7) modes))
+  (format t " 6 OE     = ~B FP overflow exception enable~%"
+	  (ldb (byte 1  6) modes))
+  (format t " 5 UE     = ~B FP underflow exception enable~%"
+	  (ldb (byte 1  5) modes))
+  (format t " 4 ZE     = ~B FP zero divide exception enable~%"
+	  (ldb (byte 1  4) modes))
+  (format t " 3 XE     = ~B FP inexact operation enable~%"
+	  (ldb (byte 1  3) modes))
+  (format t " 2 NI     = ~B FP non-IEEE mode enable~%"
+	  (ldb (byte 1  2) modes))
+  (format t " 0 RN     = ~2,'0B FP rounding control
+              (00 = nearest, 01 = zero, 10 = +inf, 11 = -inf~%"
+	  (ldb (byte 2 0) modes)))
+
 (define-vop (floating-point-modes)
   (:results (res :scs (unsigned-reg)))
   (:result-types unsigned-num)

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

Summary of changes:
 src/compiler/ppc/float.lisp | 57 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)


hooks/post-receive
-- 
CMU Common Lisp




More information about the cmucl-cvs mailing list