(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))
(: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)))
(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)
(: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)
(: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)))))