X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Falloc.lisp;h=b30039671438b4b0b70181a3ddea7c7827fcbcb6;hb=2e498cbcb062ff8b6e21703838e214c6427bffe8;hp=d3da6078b9730cd66c1522bee47f6c02754f5db6;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/assembly/x86/alloc.lisp b/src/assembly/x86/alloc.lisp index d3da607..b300396 100644 --- a/src/assembly/x86/alloc.lisp +++ b/src/assembly/x86/alloc.lisp @@ -10,9 +10,6 @@ ;;;; files for more information. (in-package "SB!VM") - -(file-comment - "$Header$") ;;;; from signed/unsigned @@ -31,8 +28,8 @@ (inst ret) BIGNUM - (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1)) - (storew eax ebx bignum-digits-offset other-pointer-type)) + (with-fixed-allocation (ebx bignum-widetag (+ bignum-digits-offset 1)) + (storew eax ebx bignum-digits-offset other-pointer-lowtag)) (inst ret)) @@ -60,11 +57,31 @@ (inst mov ebx eax) ;; Two word bignum - (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 2)) - (storew eax ebx bignum-digits-offset other-pointer-type)) + (with-fixed-allocation (ebx bignum-widetag (+ bignum-digits-offset 2)) + (storew eax ebx bignum-digits-offset other-pointer-lowtag)) (inst ret) ONE-WORD-BIGNUM - (with-fixed-allocation (ebx bignum-type (+ bignum-digits-offset 1)) - (storew eax ebx bignum-digits-offset other-pointer-type)) + (with-fixed-allocation (ebx bignum-widetag (+ bignum-digits-offset 1)) + (storew eax ebx bignum-digits-offset other-pointer-lowtag)) (inst ret)) + +#+sb-assembling +(defun frob-allocation-assembly-routine (obj lowtag arg-tn) + `(define-assembly-routine (,(intern (format nil "ALLOCATE-~A-TO-~A" obj arg-tn))) + ((:temp ,arg-tn descriptor-reg ,(intern (format nil "~A-OFFSET" arg-tn)))) + (pseudo-atomic + (allocation ,arg-tn (pad-data-block ,(intern (format nil "~A-SIZE" obj)))) + (inst lea ,arg-tn (make-ea :byte :base ,arg-tn :disp ,lowtag))) + (inst ret))) + +#+sb-assembling +(macrolet ((frob-cons-routines () + (let ((routines nil)) + (dolist (tn-offset *dword-regs* + `(progn ,@routines)) + (push (frob-allocation-assembly-routine 'cons + list-pointer-lowtag + (intern (aref *dword-register-names* tn-offset))) + routines))))) + (frob-cons-routines))