X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Falloc.lisp;h=88d5d74e22c96323c388d95c349d91cc3a600c78;hb=7deecae2d959173eda6a153d490c752c32050a9e;hp=30c14390debc0ba41aa82fd17cefa812107fff8a;hpb=554d78debd8eab9455e5283639c2fb71fac75deb;p=sbcl.git diff --git a/src/compiler/mips/alloc.lisp b/src/compiler/mips/alloc.lisp index 30c1439..88d5d74 100644 --- a/src/compiler/mips/alloc.lisp +++ b/src/compiler/mips/alloc.lisp @@ -85,7 +85,7 @@ (:arg-types positive-fixnum positive-fixnum positive-fixnum) - (:temporary (:sc non-descriptor-reg :offset nl0-offset) bytes) + (:temporary (:sc non-descriptor-reg) bytes) (:temporary (:sc non-descriptor-reg :offset nl4-offset) pa-flag) (:results (result :scs (descriptor-reg) :from :load)) (:policy :fast-safe) @@ -107,8 +107,8 @@ (:arg-types positive-fixnum positive-fixnum positive-fixnum) - (:temporary (:sc non-descriptor-reg :offset nl0-offset) bytes) - (:temporary (:sc non-descriptor-reg :offset nl1-offset) temp) + (:temporary (:sc non-descriptor-reg) bytes) + (:temporary (:sc non-descriptor-reg) temp) (:temporary (:sc non-descriptor-reg :offset nl4-offset) pa-flag) (:results (result :scs (descriptor-reg) :from :load)) (:policy :fast-safe) @@ -239,7 +239,12 @@ (inst or result csp-tn lowtag) (inst addu csp-tn (pad-data-block words))) (t - (inst or result alloc-tn lowtag))) + ;; The pseudo-atomic bit in alloc-tn is set. If the + ;; lowtag also has a 1 bit in the same position, we're all + ;; set. Otherwise, we need to subtract the pseudo-atomic + ;; bit. + (inst or result alloc-tn (if (logbitp 0 lowtag) lowtag + (1- lowtag))))) (when type (inst li temp (logior (ash (1- words) n-widetag-bits) type)) (storew temp result 0 lowtag))))) @@ -255,7 +260,7 @@ (:temporary (:sc non-descriptor-reg :offset nl4-offset) pa-flag) (:generator 6 (inst addu bytes extra (* (1+ words) n-word-bytes)) - (inst sll header bytes (- n-widetag-bits 2)) + (inst sll header bytes (- n-widetag-bits n-fixnum-tag-bits)) (inst addu header header (+ (ash -2 n-widetag-bits) type)) (inst srl bytes bytes n-lowtag-bits) (inst sll bytes bytes n-lowtag-bits)