X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Fcell.lisp;h=bb18e4ce22f1f4eee0da02044a922e0136d38dbf;hb=3d544b84f2b7ecd617d220145a775079df6c7919;hp=4bab30f2718695f445b6449d3b216c187da77eec;hpb=c823a0c4ad5be108455745c7b451228182d5d164;p=sbcl.git diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 4bab30f..bb18e4c 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -31,6 +31,7 @@ (:generator 1 (storew value object offset lowtag))) +(define-vop (init-slot set-slot)) ;;;; Symbol hacking VOPs: @@ -91,19 +92,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. @@ -165,6 +171,7 @@ ;;; BIND -- Establish VAL as a binding for SYMBOL. Save the old value and ;;; the symbol on the binding stack and stuff the new value into the ;;; symbol. +;;; See the "Chapter 9: Specials" of the SBCL Internals Manual. (define-vop (bind) (:args (val :scs (any-reg descriptor-reg)) @@ -237,6 +244,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 +307,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 +328,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 +349,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 +370,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 +392,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 +421,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 +451,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 +480,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 +516,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 +579,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)