From: Nathan Froyd Date: Sat, 15 Jul 2006 16:08:48 +0000 (+0000) Subject: 0.9.14.14: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0a4c7932412f1824ee42e0f5ea56e804798178bd;p=sbcl.git 0.9.14.14: Micro-optimize %ASHR with a constant shift amount on x86oids. --- diff --git a/src/compiler/x86-64/arith.lisp b/src/compiler/x86-64/arith.lisp index d509aac..1b8e684 100644 --- a/src/compiler/x86-64/arith.lisp +++ b/src/compiler/x86-64/arith.lisp @@ -1593,6 +1593,20 @@ (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 diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index ce684ee..6837f63 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -1660,6 +1660,20 @@ (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 diff --git a/version.lisp-expr b/version.lisp-expr index 04f334c..848de7d 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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"