X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86-64%2Falloc.lisp;h=76bad499a0fd26341c4a79fc92e72bb0e6c3bce0;hb=2dbf6e6a5011edecc5361c208e9d5915ca783351;hp=707a4590aebbf1249196d9e3fe4f6fc51730f1f9;hpb=43b1750ede8767928788b158399d3c5d2910855a;p=sbcl.git diff --git a/src/compiler/x86-64/alloc.lisp b/src/compiler/x86-64/alloc.lisp index 707a459..76bad49 100644 --- a/src/compiler/x86-64/alloc.lisp +++ b/src/compiler/x86-64/alloc.lisp @@ -96,7 +96,7 @@ (storew length result vector-length-slot other-pointer-lowtag)))) (define-vop (allocate-vector-on-stack) - (:args (type :scs (unsigned-reg immediate)) + (:args (type :scs (unsigned-reg)) (length :scs (any-reg)) (words :scs (any-reg) :target ecx)) (:temporary (:sc any-reg :offset ecx-offset :from (:argument 2)) ecx) @@ -110,30 +110,23 @@ (:policy :fast-safe) (:node-var node) (:generator 100 - (when (sc-is type immediate) - (aver (typep (tn-value type) '(unsigned-byte 8)))) - (let ((unboxed-elements-p (and (sc-is type immediate) - (/= (tn-value type) - simple-vector-widetag)))) - (inst lea result (make-ea :byte :base words :disp - (+ (1- (ash 1 n-lowtag-bits)) - (* vector-data-offset n-word-bytes)))) - (inst and result (lognot lowtag-mask)) - ;; FIXME: It would be good to check for stack overflow here. - (move ecx words) - (inst shr ecx n-fixnum-tag-bits) - (allocation result result node t) - (unless unboxed-elements-p - (inst cld)) - (inst lea res - (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes))) - (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag)) - (storew type result 0 other-pointer-lowtag) - (storew length result vector-length-slot other-pointer-lowtag) - (unless unboxed-elements-p - (zeroize zero) - (inst rep) - (inst stos zero))))) + (inst lea result (make-ea :byte :base words :disp + (+ (1- (ash 1 n-lowtag-bits)) + (* vector-data-offset n-word-bytes)))) + (inst and result (lognot lowtag-mask)) + ;; FIXME: It would be good to check for stack overflow here. + (move ecx words) + (inst shr ecx n-fixnum-tag-bits) + (allocation result result node t) + (inst cld) + (inst lea res + (make-ea :byte :base result :disp (* vector-data-offset n-word-bytes))) + (inst lea result (make-ea :byte :base result :disp other-pointer-lowtag)) + (storew type result 0 other-pointer-lowtag) + (storew length result vector-length-slot other-pointer-lowtag) + (zeroize zero) + (inst rep) + (inst stos zero))) (in-package "SB!C")