0.9.8.22:
authorJuho Snellman <jsnell@iki.fi>
Sun, 8 Jan 2006 02:01:42 +0000 (02:01 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sun, 8 Jan 2006 02:01:42 +0000 (02:01 +0000)
        Some x86-64 SAP-REF setter VOPs for floats were trying to use
        the MOVE macro on float registers, causing compile errors in
        rare circumstances. Extend x86-64 MOVE to also handle
        SINGLE-REG and DOUBLE-REG SCs.

src/compiler/x86-64/macros.lisp
tests/compiler.pure.lisp
version.lisp-expr

index 8e9f735..eeb35c1 100644 (file)
   (once-only ((n-dst dst)
               (n-src src))
     `(unless (location= ,n-dst ,n-src)
-       (inst mov ,n-dst ,n-src))))
+       (sc-case ,n-dst
+         (single-reg
+          (inst movss ,n-dst ,n-src))
+         (double-reg
+          (inst movsd ,n-dst ,n-src))
+         (t
+          (inst mov ,n-dst ,n-src))))))
 
 (defmacro make-ea-for-object-slot (ptr slot lowtag)
   `(make-ea :qword :base ,ptr :disp (- (* ,slot n-word-bytes) ,lowtag)))
index a8ce73d..9376ba1 100644 (file)
                    (1+ x))))
   (assert (= count1 0)))
 
+;;; Up to 0.9.8.22 x86-64 had broken return value handling in the
+;;; %SET-SAP-REF-DOUBLE/SINGLE VOPs.
+(with-test (:name :sap-ref-float)
+  (compile nil '(lambda (sap)
+                 (let ((x (setf (sb-vm::sap-ref-double sap 0) 1d0)))
+                   (1+ x))))
+  (compile nil '(lambda (sap)
+                 (let ((x (setf (sb-vm::sap-ref-single sap 0) 1d0)))
+                   (1+ x)))))
 
index a63a80f..84a0ff4 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.9.8.21"
+"0.9.8.22"