diff --git a/compiler/x86/float-sse2.lisp b/compiler/x86/float-sse2.lisp index 318b8282bf0fc68d2585769fb331b24cd1ccbeb2..539030e7e316a62243afb185c8a2042e327ecadd 100644 --- a/compiler/x86/float-sse2.lisp +++ b/compiler/x86/float-sse2.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.1.2.8.2.4 2008/10/09 21:34:20 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/float-sse2.lisp,v 1.1.2.8.2.5 2008/10/10 03:11:33 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1994,7 +1994,7 @@ (inst movapd r x)) (inst subpd r y))) -#+nil +#+sse3 (define-vop (*/complex-double-float) (:translate *) (:args (x :scs (complex-double-reg)) @@ -2025,7 +2025,7 @@ (:result-types complex-double-float) (:policy :fast-safe) (:temporary (:scs (complex-double-reg)) t0 t1 t2) - (:temporary (:scs (complex-double-stack)) stemp) + (:temporary (:scs (unsigned-reg)) tmp) (:generator 1 ;; Basic algorithm from the paper "The Microarchitecture of the ;; Intel Pentium 4 Processor on 90nm Technololgy" @@ -2040,22 +2040,9 @@ (inst unpckhpd t2 t2) ; t2 = d|d (inst mulpd t1 t0) ; t1 = b*c|a*c (inst mulpd t2 t0) ; t2 = b*d|a*d - ;; Set t0 to flip the sign of the high part. This needs to be - ;; done better. We basically store out #x8000000000000000 in - ;; memory and load it into t0. Then move it to the high part. - ;; (Note that #x8000...0000 has the same bit pattern as -0d0.) - (inst mov (make-ea :dword :base ebp-tn - :disp (- (* (+ (tn-offset stemp) 2) - vm:word-bytes))) - 0) - (inst mov (make-ea :dword :base ebp-tn - :disp (- (* (+ (tn-offset stemp) 1) - vm:word-bytes))) - #x80000000) - (inst movq t0 (make-ea :dword :base ebp-tn - :disp (- (* (+ (tn-offset stemp) 2) - vm:word-bytes)))) - (inst shufpd t0 t0 1) + (inst mov tmp #x80000000) + (inst movd t0 tmp) ; t0 = 0|0|0|#x80000000 + (inst shufps t0 t0 #b00010101) ; t0 = #x80000000|0|0|0 (inst xorpd t2 t0) ; t2 = -b*d|a*d (inst shufpd t2 t2 1) ; t2 = a*d|-b*d (inst addpd t2 t1) ; t2 = a*d+b*c | a*c-b*d