From: Juho S. <js...@us...> - 2005-10-15 19:40:42
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv964/tests Modified Files: float.pure.lisp Log Message: 0.9.5.70: Fix AVER on x86-64 when both the first argument and result of a MAKE-COMPLEX-FOO-FLOAT VOP occupy the same stack slot. Patch by Lutz Euler (sbcl-devel "Bug with complex float temporaries on x86-64 and fix" on 2005-10-15). Index: float.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/float.pure.lisp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- float.pure.lisp 6 Oct 2005 15:31:37 -0000 1.24 +++ float.pure.lisp 15 Oct 2005 19:40:32 -0000 1.25 @@ -127,3 +127,26 @@ (loop repeat 2 summing most-positive-double-float) (sleep 2)))) 'floating-point-overflow))) + +;;; On x86-64 generating complex floats on the stack failed an aver in +;;; the compiler if the stack slot was the same as the one containing +;;; the real part of the complex. The following expression was able to +;;; trigger this in 0.9.5.62. +(with-test (:name :complex-float-stack) + (dolist (type '((complex double-float) + (complex single-float))) + (compile nil + `(lambda (x0 x1 x2 x3 x4 x5 x6 x7) + (declare (type ,type x0 x1 x2 x3 x4 x5 x6 x7)) + (let ((x0 (+ x0 x0)) + (x1 (+ x1 x1)) + (x2 (+ x2 x2)) + (x3 (+ x3 x3)) + (x4 (+ x4 x4)) + (x5 (+ x5 x5)) + (x6 (+ x6 x6)) + (x7 (+ x7 x7))) + (* (+ x0 x1 x2 x3) (+ x4 x5 x6 x7) + (+ x0 x2 x4 x6) (+ x1 x3 x5 x7) + (+ x0 x3 x4 x7) (+ x1 x2 x5 x6) + (+ x0 x1 x6 x7) (+ x2 x3 x4 x5))))))) |