X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Fcell.lisp;h=0d32080c3ad4a9572773d1335dfb81be9c59d624;hb=95591ed483dbb8c0846c129953acac1554f28809;hp=21427d3ec4f708e20b98d10ff975a95272809acb;hpb=040d97b2a9f9c822d3bbe3b0ac7989c7fe085874;p=sbcl.git diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 21427d3..0d32080 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -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.