CMUCL commit: src/compiler/x86 (float-sse2.lisp)

Raymond Toy rtoy at common-lisp.net
Wed Oct 28 18:15:45 CET 2009


    Date: Wednesday, October 28, 2009 @ 13:15:45
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/compiler/x86

Modified: float-sse2.lisp

o Fix critical issue where the conversion of integers to floats left
  junk in the high part of the xmm register.  This causes some tests
  in maxima to fail.
o Same fix for adding/subtracting a complex and a float.

The vops need to be examined carefully to make sure we keep the
invariant that the high part is zero for double-float values in XMM
registers. 


-----------------+
 float-sse2.lisp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


Index: src/compiler/x86/float-sse2.lisp
diff -u src/compiler/x86/float-sse2.lisp:1.8 src/compiler/x86/float-sse2.lisp:1.9
--- src/compiler/x86/float-sse2.lisp:1.8	Mon Jun 15 22:53:07 2009
+++ src/compiler/x86/float-sse2.lisp	Wed Oct 28 13:15:45 2009
@@ -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.8 2009-06-16 02:53:07 rtoy Rel $")
+  "$Header: /project/cmucl/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.9 2009-10-28 17:15:45 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -942,9 +942,11 @@
                     (signed-reg
                      (inst mov temp x)
                      (note-this-location vop :internal-error)
+		     (inst xorpd y y)
                      (inst ,inst y temp))
                     (signed-stack
                      (note-this-location vop :internal-error)
+		     (inst xorpd y y)
                      (inst ,inst y x)))))))
   (frob %single-float/signed %single-float cvtsi2ss single-reg single-float)
   (frob %double-float/signed %double-float cvtsi2sd double-reg double-float))
@@ -1902,9 +1904,9 @@
 	    (:temporary (:sc ,complex-reg) tmp)
 	    (:temporary (:sc ,real-reg) rtmp)
 	    (:generator ,cost
+	      (inst xorpd rtmp rtmp)
 	      (sc-case y
 		(,real-reg
-		 (inst xorpd rtmp rtmp)
 		 (inst movaps rtmp y)
 		 (generate movaps ,fop))
 		(,r-stack



More information about the cmucl-commit mailing list