From 3a47903ad407d1c82f053912ff67c150d0d89afe Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Sun, 8 Jan 2006 02:01:42 +0000 Subject: [PATCH 1/1] 0.9.8.22: 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 | 8 +++++++- tests/compiler.pure.lisp | 9 +++++++++ version.lisp-expr | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp index 8e9f735..eeb35c1 100644 --- a/src/compiler/x86-64/macros.lisp +++ b/src/compiler/x86-64/macros.lisp @@ -19,7 +19,13 @@ (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))) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index a8ce73d..9376ba1 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1905,4 +1905,13 @@ (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))))) diff --git a/version.lisp-expr b/version.lisp-expr index a63a80f..84a0ff4 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4