X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86-64%2Farray.lisp;h=98bb8a5f9b9ed20453899cc1468428a960348823;hb=dfc9c3a9dde3ae21498ac1a184a6e56fd4e79eb0;hp=226dbcb1a96efffc38c00ad3c7d40f0654bd0809;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/src/assembly/x86-64/array.lisp b/src/assembly/x86-64/array.lisp index 226dbcb..98bb8a5 100644 --- a/src/assembly/x86-64/array.lisp +++ b/src/assembly/x86-64/array.lisp @@ -12,28 +12,8 @@ (in-package "SB!VM") -;;;; allocation +;;;; Note: On other platforms ALLOCATE-VECTOR is an assembly routine, +;;;; but on X86-64 it is a VOP. -(define-assembly-routine (allocate-vector - (:policy :fast-safe) - (:translate allocate-vector) - (:arg-types positive-fixnum - positive-fixnum - positive-fixnum)) - ((:arg type unsigned-reg eax-offset) - (:arg length any-reg ebx-offset) - (:arg words any-reg ecx-offset) - (:res result descriptor-reg edx-offset)) - (inst mov result (+ (1- (ash 1 n-lowtag-bits)) - (* vector-data-offset n-word-bytes))) - (inst add result words) - (inst and result (lognot lowtag-mask)) - (pseudo-atomic - (allocation result result) - (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)) - (inst ret)) - ;;;; Note: CMU CL had assembly language primitives for hashing strings, ;;;; but SBCL doesn't.