0.9.14.28:
authorNathan Froyd <froydnj@cs.rice.edu>
Thu, 20 Jul 2006 03:26:13 +0000 (03:26 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Thu, 20 Jul 2006 03:26:13 +0000 (03:26 +0000)
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.

src/compiler/x86-64/arith.lisp
src/compiler/x86-64/move.lisp
src/compiler/x86/arith.lisp
src/compiler/x86/move.lisp
version.lisp-expr

index 1b8e684..aa9a1d4 100644 (file)
                     :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 cc24df4..53b16bf 100644 (file)
@@ -1,4 +1,4 @@
-;;;; the x86 VM definition of operand loading/saving and the MOVE vop
+;;;; the x86-64 VM definition of operand loading/saving and the MOVE vop
 
 ;;;; This software is part of the SBCL system. See the README file for
 ;;;; more information.
 
 (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))
index 6837f63..1078a27 100644 (file)
                     :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 70342ed..31903d5 100644 (file)
 
 (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))
index 3cbdf95..dcae6c5 100644 (file)
@@ -17,4 +17,4 @@
 ;;; 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.14.27"
+"0.9.14.28"