Skip to content

Commit

Permalink
0.9.8.22:
Browse files Browse the repository at this point in the history
        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.
  • Loading branch information
jsnell committed Jan 8, 2006
1 parent b75e04f commit 3a47903
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/compiler/x86-64/macros.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
9 changes: 9 additions & 0 deletions tests/compiler.pure.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))

2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 3a47903

Please sign in to comment.