(define-move-fun (load-number 1) (vop x y)
((immediate zero)
(signed-reg unsigned-reg))
(inst li y (tn-value x)))
(define-move-fun (load-number 1) (vop x y)
((immediate zero)
(signed-reg unsigned-reg))
(inst li y (tn-value x)))
(inst sra temp x n-positive-fixnum-bits)
(inst cmp temp)
(inst b :eq fixnum)
(inst orncc temp zero-tn temp)
(inst b :eq done)
(inst sll y x n-fixnum-tag-bits)
(inst sra temp x n-positive-fixnum-bits)
(inst cmp temp)
(inst b :eq fixnum)
(inst orncc temp zero-tn temp)
(inst b :eq done)
(inst sll y x n-fixnum-tag-bits)
- (y temp bignum-widetag (1+ bignum-digits-offset))
- (storew x y bignum-digits-offset other-pointer-lowtag))
+ (y temp bignum-widetag (1+ bignum-digits-offset))
+ (storew x y bignum-digits-offset other-pointer-lowtag))
;; We always allocate 2 words even if we don't need it. (The
;; copying GC will take care of freeing the unused extra word.)
(with-fixed-allocation
;; We always allocate 2 words even if we don't need it. (The
;; copying GC will take care of freeing the unused extra word.)
(with-fixed-allocation
- (y temp bignum-widetag (+ 2 bignum-digits-offset))
- (inst cmp x)
- (inst b :ge one-word)
- (inst li temp (logior (ash 1 n-widetag-bits) bignum-widetag))
- (inst li temp (logior (ash 2 n-widetag-bits) bignum-widetag))
- (emit-label one-word)
- ;; Set the header word, then the actual digit. The extra
- ;; digit, if any, is automatically set to zero, so we don't
- ;; have to.
- (storew temp y 0 other-pointer-lowtag)
- (storew x y bignum-digits-offset other-pointer-lowtag))
+ (y temp bignum-widetag (+ 2 bignum-digits-offset))
+ (inst cmp x)
+ (inst b :ge one-word)
+ (inst li temp (logior (ash 1 n-widetag-bits) bignum-widetag))
+ (inst li temp (logior (ash 2 n-widetag-bits) bignum-widetag))
+ (emit-label one-word)
+ ;; Set the header word, then the actual digit. The extra
+ ;; digit, if any, is automatically set to zero, so we don't
+ ;; have to.
+ (storew temp y 0 other-pointer-lowtag)
+ (storew x y bignum-digits-offset other-pointer-lowtag))