1.0.33.20: MORE CONSTANTIFICATION
[sbcl.git] / src / compiler / ppc / arith.lisp
index 9f8c2f3..f8cb9aa 100644 (file)
   (:temporary (:scs (non-descriptor-reg)) temp)
   (:translate *)
   (:generator 2
-    (inst srawi temp y 2)
+    (inst srawi temp y n-fixnum-tag-bits)
     (inst mullw r x temp)))
 
 (define-vop (fast-*-c/fixnum=>fixnum fast-fixnum-binop-c)
 \f
 ;;;; 32-bit logical operations
 
-(define-vop (merge-bits)
-  (:translate merge-bits)
-  (:args (shift :scs (signed-reg unsigned-reg))
-         (prev :scs (unsigned-reg))
-         (next :scs (unsigned-reg)))
-  (:arg-types tagged-num unsigned-num unsigned-num)
-  (:temporary (:scs (unsigned-reg) :to (:result 0)) temp)
-  (:temporary (:scs (unsigned-reg) :to (:result 0) :target result) res)
-  (:results (result :scs (unsigned-reg)))
-  (:result-types unsigned-num)
-  (:policy :fast-safe)
-  (:generator 4
-    (let ((done (gen-label)))
-      (inst cmpwi shift 0)
-      (inst beq done)
-      (inst srw res next shift)
-      (inst sub temp zero-tn shift)
-      (inst slw temp prev temp)
-      (inst or res res temp)
-      (emit-label done)
-      (move result res))))
-
 (define-vop (shift-towards-someplace)
   (:policy :fast-safe)
   (:args (num :scs (unsigned-reg))
   (:results (digit :scs (unsigned-reg)))
   (:result-types unsigned-num)
   (:generator 1
-    (inst srawi digit fixnum 2)))
+    (inst srawi digit fixnum n-fixnum-tag-bits)))
 
 
 (define-vop (bignum-floor)
   (:generator 1
     (sc-case res
       (any-reg
-       (inst slwi res digit 2))
+       (inst slwi res digit n-fixnum-tag-bits))
       (signed-reg
        (move res digit)))))