From: Nathan F. <nf...@us...> - 2006-07-20 03:26:21
|
Update of /cvsroot/sbcl/sbcl/src/compiler/x86 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23107/src/compiler/x86 Modified Files: arith.lisp move.lisp Log Message: 0.9.14.28: Tweak the x86oid backends to produce idiomatic code for unsigned and signed moves and adjust the cost of the DIGIT-ASHR VOP to force selection of its constant variant when appropriate. Index: arith.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/arith.lisp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- arith.lisp 15 Jul 2006 16:08:48 -0000 1.45 +++ arith.lisp 20 Jul 2006 03:26:13 -0000 1.46 @@ -1655,7 +1655,7 @@ :load-if (not (and (sc-is result unsigned-stack) (location= digit result))))) (:result-types unsigned-num) - (:generator 1 + (:generator 2 (move result digit) (move ecx count) (inst sar result :cl))) Index: move.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/move.lisp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- move.lisp 14 Jul 2005 19:13:48 -0000 1.12 +++ move.lisp 20 Jul 2006 03:26:13 -0000 1.13 @@ -28,7 +28,10 @@ (define-move-fun (load-number 1) (vop x y) ((immediate) (signed-reg unsigned-reg)) - (inst mov y (tn-value x))) + (let ((val (tn-value x))) + (if (zerop val) + (inst xor y y) + (inst mov y val)))) (define-move-fun (load-character 1) (vop x y) ((immediate) (character-reg)) |