[cmucl-commit] [git] CMU Common Lisp branch master updated. begin-x87-removal-20-g5abd66f
Raymond Toy
rtoy at common-lisp.net
Tue Apr 29 04:33:53 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 5abd66f6073fabd08af8e0155f74cd338a28d280 (commit)
from 87aed560fb118c488a3ea2824ed3fbddf9930cd2 (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 5abd66f6073fabd08af8e0155f74cd338a28d280
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Mon Apr 28 21:33:38 2014 -0700
Don't merge the x87 FP modes with the SSE2 modes when getting and
setting the floating-point mode bits.
diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp
index d97d04e..7f27ffd 100644
--- a/src/code/float-trap.lisp
+++ b/src/code/float-trap.lisp
@@ -64,62 +64,17 @@
(defun (setf floating-point-modes) (new) (setf (floating-point-modes) new))
)
-#+(and x86 (not sse2))
-(progn
- (defun floating-point-modes ()
- (let ((x87-modes (vm::x87-floating-point-modes)))
- ;; Massage the bits from x87-floating-point-modes into the order
- ;; that the rest of the system wants them to be. (Must match
- ;; format in the SSE2 mxcsr register.)
- (logior (ash (logand #x3f x87-modes) 7) ; control
- (logand #x3f (ash x87-modes -16)))))
- (defun (setf floating-point-modes) (new)
- (let* ((rc (ldb float-rounding-mode new))
- (x87-modes
- (logior (ash (logand #x3f new) 16)
- (ash rc 10)
- (logand #x3f (ash new -7))
- ;; Set precision control to be 53-bit, always.
- ;; (The compiler takes care of handling
- ;; single-float precision, and we don't support
- ;; long-floats.)
- (ash 2 8))))
- (setf (x87-floating-point-modes) x87-modes)))
- )
-
#+sse2
(progn
(defun floating-point-modes ()
- ;; Combine the modes from the FPU and SSE2 units. Since the sse
- ;; mode contains all of the common information we want, we massage
- ;; the x87-modes to match, and then OR the x87 and sse2 modes
- ;; together. Note: We ignore the rounding control bits from the
- ;; FPU and only use the SSE2 rounding control bits.
- (let* ((x87-modes (vm::x87-floating-point-modes))
- (sse-modes (vm::sse2-floating-point-modes))
- (final-mode (logior sse-modes
- (ash (logand #x3f x87-modes) 7) ; control
- (logand #x3f (ash x87-modes -16)))))
-
- final-mode))
+ ;; Get just the SSE2 mode bits.
+ (vm::sse2-floating-point-modes))
(defun (setf floating-point-modes) (new-mode)
(declare (type (unsigned-byte 24) new-mode))
- ;; Set the floating point modes for both X87 and SSE2. This
- ;; include the rounding control bits.
- (let* ((rc (ldb float-rounding-mode new-mode))
- (x87-modes
- (logior (ash (logand #x3f new-mode) 16)
- (ash rc 10)
- (logand #x3f (ash new-mode -7))
- ;; Set precision control to be 64-bit, always. We
- ;; don't use the x87 registers with sse2, so this
- ;; is ok and would be the correct setting if we
- ;; ever support long-floats.
- (ash 3 8))))
- (setf (vm::sse2-floating-point-modes) new-mode)
- (setf (vm::x87-floating-point-modes) x87-modes))
+ ;; Set the floating point modes for SSE2.
+ (setf (vm::sse2-floating-point-modes) new-mode)
new-mode)
-)
+ )
;;; SET-FLOATING-POINT-MODES -- Public
;;;
-----------------------------------------------------------------------
Summary of changes:
src/code/float-trap.lisp | 55 +++++-----------------------------------------
1 file changed, 5 insertions(+), 50 deletions(-)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-commit
mailing list