X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Farith.lisp;h=4c97c40ed0aca68a32a0b4e38296e3d8cd82b4db;hb=beddcfe1ea23d2cfdddde2fa7cde6436799715a2;hp=4abd9c63b014d516649531ccfa13645730913224;hpb=7deecae2d959173eda6a153d490c752c32050a9e;p=sbcl.git diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 4abd9c6..4c97c40 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -597,6 +597,8 @@ (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 :dword :base number :index number))) @@ -615,6 +617,9 @@ (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) (inst mov result 0))) @@ -1325,6 +1330,7 @@ (define-vop (fast-ash-left-smod30-c/fixnum=>fixnum fast-ash-c/fixnum=>fixnum) + (:variant :modular) (:translate ash-left-smod30)) (define-vop (fast-ash-left-smod30/fixnum=>fixnum