Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv20042
Modified Files: basic-functions.lisp Log Message: The functions malloc-words and malloc-clumps are needed to do anything, of course..
Date: Thu Mar 25 06:27:01 2004 Author: ffjeld
Index: movitz/losp/muerte/basic-functions.lisp diff -u movitz/losp/muerte/basic-functions.lisp:1.5 movitz/losp/muerte/basic-functions.lisp:1.6 --- movitz/losp/muerte/basic-functions.lisp:1.5 Tue Mar 23 05:53:25 2004 +++ movitz/losp/muerte/basic-functions.lisp Thu Mar 25 06:27:00 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Sep 4 18:41:57 2001 ;;;; -;;;; $Id: basic-functions.lisp,v 1.5 2004/03/23 10:53:25 ffjeld Exp $ +;;;; $Id: basic-functions.lisp,v 1.6 2004/03/25 11:27:00 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -354,4 +354,18 @@ (:addl :ecx :eax))))
(defun %word-offset (word offset) - (%word-offset word offset)) \ No newline at end of file + (%word-offset word offset)) + +(defun malloc-words (words) + (malloc-clumps (1+ (truncate (1+ words) 2)))) + +(defun malloc-clumps (clumps) + (let ((x (with-inline-assembly (:returns :eax :side-effects t) + (:compile-form (:result-mode :ebx) clumps) + (:shll 1 :ebx) + (:globally (:call (:edi (:edi-offset malloc)))) + (:addl #.(movitz::tag :other) :eax)))) + (dotimes (i clumps) + (setf (memref x -6 i :lisp) nil + (memref x -2 i :lisp) nil)) + x))