1.0.45.2: A slightly better error message for malformed reader conditional
[sbcl.git] / src / compiler / x86-64 / arith.lisp
index cfe4ad4..cc41f3d 100644 (file)
                                        (location= number result)))))
   (:result-types tagged-num)
   (:note "inline ASH")
+  (:variant nil)
+  (:variant-vars modularp)
   (:generator 2
     (cond ((and (= amount 1) (not (location= number result)))
            (inst lea result (make-ea :qword :base number :index number)))
                         (inst sar result (- amount))
                         (inst and result (lognot fixnum-tag-mask)))))
                  ((plusp amount)
+                  (unless modularp
+                    (aver (not "Impossible: fixnum ASH should not be called with
+constant shift greater than word length")))
                   (if (sc-is result any-reg)
-                      (inst xor result result)
+                      (zeroize result)
                       (inst mov result 0)))
                  (t (inst sar result 63)
                     (inst and result (lognot fixnum-tag-mask))))))))
 
 (define-vop (fast-ash-left-smod61-c/fixnum=>fixnum
              fast-ash-c/fixnum=>fixnum)
+  (:variant :modular)
   (:translate ash-left-smod61))
 (define-vop (fast-ash-left-smod61/fixnum=>fixnum
              fast-ash-left/fixnum=>fixnum))