0.pre8.59:
authorAlexey Dejneka <adejneka@comail.ru>
Tue, 15 Apr 2003 08:29:03 +0000 (08:29 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Tue, 15 Apr 2003 08:29:03 +0000 (08:29 +0000)
        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.

BUGS
src/compiler/x86/arith.lisp
src/compiler/x86/insts.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index 23d87a5..3f95ef7 100644 (file)
--- 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.
index 949d73b..865fade 100644 (file)
   (: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)
     (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)
index c2ca16c..135e0e3 100644 (file)
 ;;;; 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)
      (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)
index 432773c..8cb6cee 100644 (file)
@@ -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"