X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Farith.lisp;h=e1e3a29e5a3fc385f247d50cb55828c466b7c851;hb=cb254941e176badff31a16a11509e1ac288ae249;hp=89f14b57eea04fef93b4f6dd1a67b9742fec5ac6;hpb=481348f2f96f364374f669786f9fc61348decabc;p=sbcl.git diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 89f14b5..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)