Date: Friday, August 6, 2010 @ 15:01:42 Author: rtoy Path: /project/cmucl/cvsroot/src/compiler/x86
Modified: insts.lisp
The packed shift instructions must have an xmm register as the destination and either an xmm register or integer for the source. Add declarations to enforce this, so we don't do silently accept stupid things like psllq <eax>, 32 as was done in */complex-double-float.
(Should probably add more checks of this type.)
------------+ insts.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Index: src/compiler/x86/insts.lisp diff -u src/compiler/x86/insts.lisp:1.35 src/compiler/x86/insts.lisp:1.36 --- src/compiler/x86/insts.lisp:1.35 Fri Mar 19 11:19:01 2010 +++ src/compiler/x86/insts.lisp Fri Aug 6 15:01:42 2010 @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /project/cmucl/cvsroot/src/compiler/x86/insts.lisp,v 1.35 2010-03-19 15:19:01 rtoy Exp $") + "$Header: /project/cmucl/cvsroot/src/compiler/x86/insts.lisp,v 1.36 2010-08-06 19:01:42 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -3495,6 +3495,8 @@ ((packed-shift (name imm-op reg-op reg) ;; We don't support the MMX version. `(define-instruction ,name (segment dst src) + (:declare (type (satisfies xmm-register-p) dst) + (type (or fixnum (satisfies xmm-register-p)) src)) (:printer ext-xmm-mem ((prefix #x66) (op ,reg-op))) (:printer ext-xmm-mem ((prefix #x66) (op ,imm-op) (reg ,reg) @@ -3508,7 +3510,6 @@ (emit-mod-reg-r/m-byte segment #b11 ,reg (reg-tn-encoding dst)) (emit-byte segment src)) (t - (assert (xmm-register-p src)) (emit-regular-sse-inst segment dst src #x66 ,reg-op))))))) (packed-shift psrlq #x73 #xd3 2) (packed-shift psrld #x72 #xd2 2)