From d4073df37f0540f148b1b702a32ffba8c646a0ca Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 3 Jul 2003 19:21:31 +0000 Subject: [PATCH] 0.8.1.23: Fix (from rtoy via CMUCL) for a problem initially reported by Gareth McCaughan cmucl-imp 2003-05-08 regarding x86 atan2 ... cater for the fact that both arguments may be in fr0 ... distilled test case from rtoy --- src/compiler/x86/float.lisp | 4 ++++ tests/compiler.pure.lisp | 5 +++++ version.lisp-expr | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compiler/x86/float.lisp b/src/compiler/x86/float.lisp index 3cf0cf0..e5b1942 100644 --- a/src/compiler/x86/float.lisp +++ b/src/compiler/x86/float.lisp @@ -3126,6 +3126,10 @@ (descriptor-reg (inst fstp fr0) (inst fldd (ea-for-df-desc y))))) + ((and (sc-is x double-reg) (zerop (tn-offset x)) + (sc-is y double-reg) (zerop (tn-offset x))) + ;; copy x to fr1 + (inst fst fr1)) ;; y in fr0; x not in fr1 ((and (sc-is y double-reg) (zerop (tn-offset y))) (inst fxch fr1) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 35fec3e..928780c 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -466,3 +466,8 @@ ;; compiler failure (let ((f (compile nil '(lambda (x) (typep x '(not (member 0d0))))))) (assert (funcall f 1d0))) + +(compile nil '(lambda (x) + (declare (double-float x)) + (let ((y (* x pi))) + (atan y y)))) diff --git a/version.lisp-expr b/version.lisp-expr index 22d1b9e..06de37e 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.8.1.22" +"0.8.1.23" -- 1.7.10.4