X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Farith.lisp;h=e1e3a29e5a3fc385f247d50cb55828c466b7c851;hb=a41e7cf8667de9ae078a8e318e8c5c045cdee87d;hp=2c71158c703c9210f9588d0acc7078487f907b46;hpb=52cfe54802db8736f1f4e2b67764c43bba9b78b3;p=sbcl.git diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 2c71158..e1e3a29 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -154,8 +154,8 @@ (define-binop + 1 5 addu (signed-byte 14) (signed-byte 16)) (define-binop - 1 5 subu - (integer #.(- (1- (ash 1 14))) #.(ash 1 14)) - (integer #.(- (1- (ash 1 16))) #.(ash 1 16))) + (integer #.(- 1 (ash 1 13)) #.(ash 1 13)) + (integer #.(- 1 (ash 1 15)) #.(ash 1 15))) (define-binop logior 1 3 or (unsigned-byte 14) (unsigned-byte 16)) (define-binop logand 1 3 and (unsigned-byte 14) (unsigned-byte 16)) (define-binop logxor 1 3 xor (unsigned-byte 14) (unsigned-byte 16)) @@ -396,7 +396,7 @@ (:temporary (:scs (non-descriptor-reg)) temp) (:translate *) (:generator 4 - (inst sra temp y 2) + (inst sra temp y n-fixnum-tag-bits) (inst mult x temp) (inst mflo r))) @@ -428,7 +428,7 @@ (inst nop) (inst div x y) (inst mflo temp) - (inst sll q temp 2) + (inst sll q temp n-fixnum-tag-bits) (inst mfhi r))) (define-vop (fast-truncate/unsigned fast-unsigned-binop) @@ -893,7 +893,7 @@ (:results (digit :scs (unsigned-reg))) (:result-types unsigned-num) (:generator 1 - (inst sra digit fixnum 2))) + (inst sra digit fixnum n-fixnum-tag-bits))) (define-vop (bignum-floor) (:translate sb!bignum:%floor) @@ -937,7 +937,7 @@ (:generator 1 (sc-case res (any-reg - (inst sll res digit 2)) + (inst sll res digit n-fixnum-tag-bits)) (signed-reg (move res digit)))))