X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Farith.lisp;h=cfe4ad4e5c3167716776159567cadbfa7c96de32;hb=7deecae2d959173eda6a153d490c752c32050a9e;hp=4735ce3ea4aa241e8b0e0b2f92aae4f9ad7ef9f5;hpb=2230ea0c1765a95fd2aa0a8996b3555b93ba3745;p=sbcl.git diff --git a/src/compiler/x86-64/arith.lisp b/src/compiler/x86-64/arith.lisp index 4735ce3..cfe4ad4 100644 --- a/src/compiler/x86-64/arith.lisp +++ b/src/compiler/x86-64/arith.lisp @@ -509,8 +509,9 @@ (inst cqo) (inst idiv eax y) (if (location= quo eax) - (inst shl eax 3) - (inst lea quo (make-ea :qword :index eax :scale 8))) + (inst shl eax n-fixnum-tag-bits) + (inst lea quo (make-ea :qword :index eax + :scale (ash 1 n-fixnum-tag-bits)))) (move rem edx))) (define-vop (fast-truncate-c/fixnum=>fixnum fast-safe-arith-op) @@ -537,8 +538,9 @@ (setf y-arg (register-inline-constant :qword (fixnumize y)))) (inst idiv eax y-arg) (if (location= quo eax) - (inst shl eax 3) - (inst lea quo (make-ea :qword :index eax :scale 8))) + (inst shl eax n-fixnum-tag-bits) + (inst lea quo (make-ea :qword :index eax + :scale (ash 1 n-fixnum-tag-bits)))) (move rem edx))) (define-vop (fast-truncate/unsigned=>unsigned fast-safe-arith-op)