From: Alexey Dejneka Date: Tue, 15 Apr 2003 08:29:03 +0000 (+0000) Subject: 0.pre8.59: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=2b13511b2498024662c35e166943770012627e77;p=sbcl.git 0.pre8.59: Changes in x86 assembly, inspired by discussion on cll: * added disassembling of BSR/BSF; * added VOP for INTEGER-LENGTH of (UNSIGNED-BYTE 32); * VOP for INTEGER-LENGTH of (SIGNED-BYTE 32) returns unboxed number. --- diff --git a/BUGS b/BUGS index 23d87a5..3f95ef7 100644 --- a/BUGS +++ b/BUGS @@ -1296,6 +1296,10 @@ WORKAROUND: for :EXTERNAL-FORMAT in DEFKNOWN OPEN (and LOAD) is a workaround for the problem (and should be removed when the problem is fixed). +245: + On X86 IMUL instruction with an immediate operand is printed + incorrectly. + DEFUNCT CATEGORIES OF BUGS IR1-#: These labels were used for bugs related to the old IR1 interpreter. diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 949d73b..865fade 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -731,9 +731,9 @@ (:policy :fast-safe) (:args (arg :scs (signed-reg) :target res)) (:arg-types signed-num) - (:results (res :scs (any-reg))) - (:result-types positive-fixnum) - (:generator 30 + (:results (res :scs (unsigned-reg))) + (:result-types unsigned-num) + (:generator 28 (move res arg) (inst cmp res 0) (inst jmp :ge POS) @@ -742,7 +742,23 @@ (inst bsr res res) (inst jmp :z zero) (inst inc res) - (inst shl res 2) + (inst jmp done) + ZERO + (inst xor res res) + DONE)) + +(define-vop (unsigned-byte-32-len) + (:translate integer-length) + (:note "inline (unsigned-byte 32) integer-length") + (:policy :fast-safe) + (:args (arg :scs (unsigned-reg))) + (:arg-types unsigned-num) + (:results (res :scs (unsigned-reg))) + (:result-types unsigned-num) + (:generator 26 + (inst bsr res arg) + (inst jmp :z zero) + (inst inc res) (inst jmp done) ZERO (inst xor res res) diff --git a/src/compiler/x86/insts.lisp b/src/compiler/x86/insts.lisp index c2ca16c..135e0e3 100644 --- a/src/compiler/x86/insts.lisp +++ b/src/compiler/x86/insts.lisp @@ -1578,6 +1578,7 @@ ;;;; bit manipulation (define-instruction bsf (segment dst src) + (:printer ext-reg-reg/mem ((op #b1011110) (width 0))) (:emitter (let ((size (matching-operand-size dst src))) (when (eq size :byte) @@ -1588,6 +1589,7 @@ (emit-ea segment src (reg-tn-encoding dst))))) (define-instruction bsr (segment dst src) + (:printer ext-reg-reg/mem ((op #b1011110) (width 1))) (:emitter (let ((size (matching-operand-size dst src))) (when (eq size :byte) diff --git a/version.lisp-expr b/version.lisp-expr index 432773c..8cb6cee 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.pre8.58" +"0.pre8.59"