From 891f4de22b8a291d76d2e74e2a775e4bb659921f Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Thu, 18 Aug 2005 16:23:08 +0000 Subject: [PATCH] 0.9.3.62: Fix x86-64 MOVE-ARG-DOUBLE-FLOAT VOP for non-rsp fps (code inherited from x86 assumed doubles use two words of stack space, which is no longer true for x86-64). --- src/compiler/x86-64/float.lisp | 5 +---- tests/float.impure.lisp | 19 +++++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/compiler/x86-64/float.lisp b/src/compiler/x86-64/float.lisp index 310d92a..728079d 100644 --- a/src/compiler/x86-64/float.lisp +++ b/src/compiler/x86-64/float.lisp @@ -324,10 +324,7 @@ (:double '((inst movsd ea x))))) (let ((ea (make-ea :dword :base fp - :disp (- (* (+ (tn-offset y) - ,(case format - (:single 1) - (:double 2) )) + :disp (- (* (1+ (tn-offset y)) n-word-bytes))))) ,@(ecase format (:single '((inst movss ea x))) diff --git a/tests/float.impure.lisp b/tests/float.impure.lisp index 2af31bf..e32a6d9 100644 --- a/tests/float.impure.lisp +++ b/tests/float.impure.lisp @@ -95,5 +95,24 @@ (test atanh) (test exp)) +;;; Broken move-arg-double-float for non-rsp frame pointers on x86-64 +(defun test (y) + (declare (optimize speed)) + (multiple-value-bind (x) + (labels ((aux (x) + (declare (double-float x)) + (etypecase y + (double-float + nil) + (fixnum + (aux x)) + (complex + (format t "y=~s~%" y))) + (values x))) + (aux 2.0d0)) + x)) + +(assert (= (test 1.0d0) 2.0d0)) + ;;; success (quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index 90d4a22..b54f278 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.3.61" +"0.9.3.62" -- 1.7.10.4