From: Nathan Froyd Date: Thu, 20 Jul 2006 03:26:13 +0000 (+0000) Subject: 0.9.14.28: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9c9020f77ca14545b36795fcc86db2103cc8621e;p=sbcl.git 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. --- diff --git a/src/compiler/x86-64/arith.lisp b/src/compiler/x86-64/arith.lisp index 1b8e684..aa9a1d4 100644 --- a/src/compiler/x86-64/arith.lisp +++ b/src/compiler/x86-64/arith.lisp @@ -1588,7 +1588,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))) diff --git a/src/compiler/x86-64/move.lisp b/src/compiler/x86-64/move.lisp index cc24df4..53b16bf 100644 --- a/src/compiler/x86-64/move.lisp +++ b/src/compiler/x86-64/move.lisp @@ -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. @@ -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)) diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 6837f63..1078a27 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -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))) diff --git a/src/compiler/x86/move.lisp b/src/compiler/x86/move.lisp index 70342ed..31903d5 100644 --- a/src/compiler/x86/move.lisp +++ b/src/compiler/x86/move.lisp @@ -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)) diff --git a/version.lisp-expr b/version.lisp-expr index 3cbdf95..dcae6c5 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.27" +"0.9.14.28"