0.9.14.14:
authorNathan Froyd <froydnj@cs.rice.edu>
Sat, 15 Jul 2006 16:08:48 +0000 (16:08 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Sat, 15 Jul 2006 16:08:48 +0000 (16:08 +0000)
Micro-optimize %ASHR with a constant shift amount on x86oids.

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

index d509aac..1b8e684 100644 (file)
     (move ecx count)
     (inst sar result :cl)))
 
+(define-vop (digit-ashr/c)
+  (:translate sb!bignum:%ashr)
+  (:policy :fast-safe)
+  (:args (digit :scs (unsigned-reg unsigned-stack) :target result))
+  (:arg-types unsigned-num (:constant (integer 0 63)))
+  (:info count)
+  (:results (result :scs (unsigned-reg) :from (:argument 0)
+                    :load-if (not (and (sc-is result unsigned-stack)
+                                       (location= digit result)))))
+  (:result-types unsigned-num)
+  (:generator 1
+    (move result digit)
+    (inst sar result count)))
+
 (define-vop (digit-lshr digit-ashr)
   (:translate sb!bignum:%digit-logical-shift-right)
   (:generator 1
index ce684ee..6837f63 100644 (file)
     (move ecx count)
     (inst sar result :cl)))
 
+(define-vop (digit-ashr/c)
+  (:translate sb!bignum:%ashr)
+  (:policy :fast-safe)
+  (:args (digit :scs (unsigned-reg unsigned-stack) :target result))
+  (:arg-types unsigned-num (:constant (integer 0 31)))
+  (:info count)
+  (:results (result :scs (unsigned-reg) :from (:argument 0)
+                    :load-if (not (and (sc-is result unsigned-stack)
+                                       (location= digit result)))))
+  (:result-types unsigned-num)
+  (:generator 1
+    (move result digit)
+    (inst sar result count)))
+
 (define-vop (digit-lshr digit-ashr)
   (:translate sb!bignum:%digit-logical-shift-right)
   (:generator 1
index 04f334c..848de7d 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.13"
+"0.9.14.14"