X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Fcell.lisp;h=24edd3dd3b2a1ce9c9bcff5a9219f98da7d40eb1;hb=2e5263a05f55e2b56a3194ad7853e9ae18ad69af;hp=75756ec12af1f26e5d27a4966463aecd4a070774;hpb=3e1d39f2e44bb42f54e017b8b3a80a79f00935c8;p=sbcl.git diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 75756ec..24edd3d 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -60,7 +60,7 @@ (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. @@ -78,8 +78,8 @@ (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) @@ -91,19 +91,24 @@ (: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)) ;;;; Fdefinition (fdefn) objects. @@ -136,7 +141,7 @@ (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)) @@ -203,7 +208,7 @@ (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)) @@ -237,6 +242,12 @@ (define-vop (closure-init slot-set) (:variant closure-info-offset fun-pointer-lowtag)) + +(define-vop (closure-init-from-fp) + (:args (object :scs (descriptor-reg))) + (:info offset) + (:generator 4 + (storew cfp-tn object (+ closure-info-offset offset) fun-pointer-lowtag))) ;;;; Value Cell hackery. @@ -294,7 +305,7 @@ (: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) @@ -315,7 +326,7 @@ (: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) @@ -336,7 +347,7 @@ (: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) @@ -357,7 +368,7 @@ (: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) @@ -379,7 +390,7 @@ (: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) @@ -408,7 +419,7 @@ (: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) @@ -438,7 +449,7 @@ (: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) @@ -467,7 +478,7 @@ (: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) @@ -503,7 +514,7 @@ (: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) @@ -566,7 +577,7 @@ (: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)