(unless (location= imag r-imag)
(inst movss r-imag imag))))
(complex-single-stack
- (inst movss (ea-for-csf-real-stack r) real)
+ (unless (location= real r)
+ (inst movss (ea-for-csf-real-stack r) real))
(inst movss (ea-for-csf-imag-stack r) imag)))))
(define-vop (make-complex-double-float)
(unless (location= imag r-imag)
(inst movsd r-imag imag))))
(complex-double-stack
- (inst movsd (ea-for-cdf-real-stack r) real)
+ (unless (location= real r)
+ (inst movsd (ea-for-cdf-real-stack r) real))
(inst movsd (ea-for-cdf-imag-stack r) imag)))))
(define-vop (complex-float-value)
(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)))))))
;;; 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.5.69"
+"0.9.5.70"