X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Farray.lisp;h=c79c5debc791734f5e68344098d0018b4551b6fb;hb=440baf2d4f88579609615c6cbf598c336fb07445;hp=7662427adc69fa0b769e216aacc75beba37d6944;hpb=50305b602c3953440af716137a56f50cd204375d;p=sbcl.git diff --git a/src/assembly/x86/array.lisp b/src/assembly/x86/array.lisp index 7662427..c79c5de 100644 --- a/src/assembly/x86/array.lisp +++ b/src/assembly/x86/array.lisp @@ -12,28 +12,8 @@ (in-package "SB!VM") -;;;; 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 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.