CMUCL commit: src/compiler/x86 (float-sse2.lisp)
Raymond Toy
rtoy at common-lisp.net
Wed Jul 21 18:52:29 CEST 2010
Date: Wednesday, July 21, 2010 @ 12:52:29
Author: rtoy
Path: /project/cmucl/cvsroot/src/compiler/x86
Modified: float-sse2.lisp
Fix bug in imagpart/complex-single-float. The vop was totally wrong.
Bug and fix provided by Alexander Donkov.
Here is a routine that illustrate the problem:
;; (zot #c(1.0 2.0)) -> 2.0. It should be 4.0!
(defun zot (z)
(declare (type (complex single-float) z))
(imagpart (+ #c(1.0 2.0) z)))
-----------------+
float-sse2.lisp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: src/compiler/x86/float-sse2.lisp
diff -u src/compiler/x86/float-sse2.lisp:1.14 src/compiler/x86/float-sse2.lisp:1.15
--- src/compiler/x86/float-sse2.lisp:1.14 Wed Jun 30 23:03:27 2010
+++ src/compiler/x86/float-sse2.lisp Wed Jul 21 12:52:28 2010
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group at cs.cmu.edu.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.14 2010-07-01 03:03:27 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.15 2010-07-21 16:52:28 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -1437,6 +1437,7 @@
;; x = a+b*i = b|a
;; Get the imag part to the low part of temp. We don't care about
;; the other parts of r.
+ (inst movaps temp x) ; temp = u|u|b|a
(inst shufps temp x #b01) ; temp = a|a|a|b
(inst xorps r r) ; r = 0|0|0|0
(inst movss r temp) ; r = 0|0|0|b
More information about the cmucl-commit
mailing list