0.9.3.3:
authorNathan Froyd <froydnj@cs.rice.edu>
Wed, 27 Jul 2005 18:59:50 +0000 (18:59 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Wed, 27 Jul 2005 18:59:50 +0000 (18:59 +0000)
Oops.  Fix signed-num INTEGER-LENGTH VOP on the PPC to not
  overwrite the argument if the arg is negative.

src/compiler/ppc/arith.lisp

index c633a13..5a20c34 100644 (file)
                (inst srawi result number amount))
              (inst slwi result number amount)))))))
 
-
-
 (define-vop (signed-byte-32-len)
   (:translate integer-length)
   (:note "inline (signed-byte 32) integer-length")
   (:policy :fast-safe)
   (:args (arg :scs (signed-reg)))
   (:arg-types signed-num)
-  (:results (res :scs (unsigned-reg)))
+  (:results (res :scs (unsigned-reg) :from :load))
   (:result-types unsigned-num)
   (:generator 6
     ; (integer-length arg) = (- 32 (cntlz (if (>= arg 0) arg (lognot arg))))