X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Farray.lisp;h=c79c5debc791734f5e68344098d0018b4551b6fb;hb=518493eab883e50237043153c0d45b245e929c7d;hp=8ae3e8de120951dd6b0b18451daa2da0c95bcd58;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/assembly/x86/array.lisp b/src/assembly/x86/array.lisp index 8ae3e8d..c79c5de 100644 --- a/src/assembly/x86/array.lisp +++ b/src/assembly/x86/array.lisp @@ -11,32 +11,9 @@ ;;;; files for more information. (in-package "SB!VM") - -(file-comment - "$Header$") -;;;; allocation +;;;; Note: On other platforms ALLOCATE-VECTOR is an assembly routine, +;;;; but on X86 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 lowtag-bits)) - (* vector-data-offset word-bytes))) - (inst add result words) - (inst and result (lognot sb!vm:lowtag-mask)) - (pseudo-atomic - (allocation result result) - (inst lea result (make-ea :byte :base result :disp other-pointer-type)) - (storew type result 0 other-pointer-type) - (storew length result vector-length-slot other-pointer-type)) - (inst ret)) - ;;;; Note: CMU CL had assembly language primitives for hashing strings, ;;;; but SBCL doesn't.