X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fmips%2Fcell.lisp;h=4ba16b814235347dfd6227efb3572856e6027dfd;hb=2ff0ff83dacac9fb25a31f5783b6ea8c0442bc2c;hp=4bab30f2718695f445b6449d3b216c187da77eec;hpb=c823a0c4ad5be108455745c7b451228182d5d164;p=sbcl.git diff --git a/src/compiler/mips/cell.lisp b/src/compiler/mips/cell.lisp index 4bab30f..4ba16b8 100644 --- a/src/compiler/mips/cell.lisp +++ b/src/compiler/mips/cell.lisp @@ -91,19 +91,17 @@ (: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))) ;;;; Fdefinition (fdefn) objects. @@ -294,7 +292,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 +313,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 +334,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 +355,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 +377,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 +406,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 +436,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 +465,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 +501,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 +564,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)