(loadw value obj-temp symbol-value-slot other-pointer-lowtag)
(let ((err-lab (generate-error-code vop unbound-symbol-error obj-temp)))
(inst xor temp value unbound-marker-widetag)
- (inst beq temp zero-tn err-lab)
+ (inst beq temp err-lab)
(inst nop))))
;;; Like CHECKED-CELL-REF, only we are a predicate to see if the cell is bound.
(loadw value object symbol-value-slot other-pointer-lowtag)
(inst xor temp value unbound-marker-widetag)
(if not-p
- (inst beq temp zero-tn target)
- (inst bne temp zero-tn target))
+ (inst beq temp target)
+ (inst bne temp target))
(inst nop)))
(define-vop (fast-symbol-value cell-ref)
(:policy :fast-safe)
(:translate symbol-hash)
(:args (symbol :scs (descriptor-reg)))
+ (:temporary (:scs (non-descriptor-reg)) temp)
(:results (res :scs (any-reg)))
(:result-types positive-fixnum)
- (:temporary (:scs (any-reg)) temp)
(:generator 2
;; The symbol-hash slot of NIL holds NIL because it is also the
;; cdr slot, so we have to strip off the two low bits to make sure
;; it is a fixnum. The lowtag selection magic that is required to
;; ensure this is explained in the comment in objdef.lisp
- ;;
- ;; wow, MIPS sucks (or I do) -- CSR, 2004-05-20
- (inst li temp (fixnumize -1))
- (loadw res symbol symbol-hash-slot other-pointer-lowtag)
- (inst and res temp)))
+ (loadw temp symbol symbol-hash-slot other-pointer-lowtag)
+ (inst srl temp n-fixnum-tag-bits)
+ (inst sll res temp n-fixnum-tag-bits)))
+
+;;; On unithreaded builds these are just copies of the non-global versions.
+(define-vop (%set-symbol-global-value set))
+(define-vop (symbol-global-value symbol-value)
+ (:translate symbol-global-value))
+(define-vop (fast-symbol-global-value fast-symbol-value)
+ (:translate symbol-global-value))
\f
;;;; Fdefinition (fdefn) objects.
(load-type type function (- fun-pointer-lowtag))
(inst nop)
(inst xor type simple-fun-header-widetag)
- (inst beq type zero-tn normal-fn)
+ (inst beq type normal-fn)
(inst addu lip function
(- (ash simple-fun-code-offset word-shift)
fun-pointer-lowtag))
(emit-label loop)
(loadw symbol bsp-tn (- binding-symbol-slot binding-size))
- (inst beq symbol zero-tn skip)
+ (inst beq symbol skip)
(loadw value bsp-tn (- binding-value-slot binding-size))
(storew value symbol symbol-value-slot other-pointer-lowtag)
(storew zero-tn bsp-tn (- binding-symbol-slot binding-size))
(:policy :fast-safe)
(:translate %instance-length)
(:args (struct :scs (descriptor-reg)))
+ (:temporary (:scs (non-descriptor-reg)) temp)
(:results (res :scs (unsigned-reg)))
(:result-types positive-fixnum)
(:generator 4
- (loadw res struct 0 instance-pointer-lowtag)
- (inst srl res n-widetag-bits)))
+ (loadw temp struct 0 instance-pointer-lowtag)
+ (inst srl res temp n-widetag-bits)))
(define-full-reffer instance-index-ref * instance-slots-offset
instance-pointer-lowtag (descriptor-reg any-reg) * %instance-ref)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset n-word-bytes)
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset n-word-bytes)
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset n-word-bytes)
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset n-word-bytes)
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 2 n-word-bytes))
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 2 n-word-bytes))
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 2 n-word-bytes))
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 2 n-word-bytes))
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 4 n-word-bytes))
(inst addu lip offset object)
(:generator 5
(loadw offset object 0 instance-pointer-lowtag)
(inst srl offset n-widetag-bits)
- (inst sll offset 2)
+ (inst sll offset n-fixnum-tag-bits)
(inst subu offset index)
(inst subu offset (* 4 n-word-bytes))
(inst addu lip offset object)