;;; Test generation utilities.
(defun %test-fixnum (value target not-p &key temp)
(assemble ()
- (inst and temp value 3)
+ (inst and temp value fixnum-tag-mask)
(if not-p
(inst bne temp zero-tn target)
(inst beq temp zero-tn target))
(defun %test-fixnum-and-headers (value target not-p headers &key temp)
(let ((drop-through (gen-label)))
(assemble ()
- (inst and temp value 3)
+ (inst and temp value fixnum-tag-mask)
(inst beq temp zero-tn (if not-p drop-through target)))
(%test-headers value target not-p nil headers
:drop-through drop-through :temp temp)))
(defun %test-immediate (value target not-p immediate &key temp)
(assemble ()
- (inst and temp value 255)
+ (inst and temp value widetag-mask)
(inst xor temp immediate)
(if not-p
(inst bne temp zero-tn target)
(inst beq temp zero-tn target))
(inst nop)))
-(defun %test-lowtag (value target not-p lowtag &key skip-nop temp)
+(defun %test-lowtag (value target not-p lowtag &key temp)
(assemble ()
(inst and temp value lowtag-mask)
(inst xor temp lowtag)
(if not-p
(inst bne temp zero-tn target)
(inst beq temp zero-tn target))
- (unless skip-nop
- (inst nop))))
+ (inst nop)))
(defun %test-headers (value target not-p function-p headers
&key (drop-through (gen-label)) temp)
(values not-target target)
(values target not-target))
(assemble ()
- (inst and temp value 3)
+ (inst and temp value fixnum-tag-mask)
(inst beq temp zero-tn yep)
(inst and temp value lowtag-mask)
(inst xor temp other-pointer-lowtag)
(values target not-target))
(assemble ()
;; Is it a fixnum?
- (inst and temp value 3)
+ (inst and temp value fixnum-tag-mask)
(inst beq temp zero-tn fixnum)
(move temp value t)