Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv21194
Modified Files: primitive-functions.lisp Log Message: Started work on having the pf's comply with the stack and register disciplines.
Date: Sat Aug 7 04:12:09 2004 Author: ffjeld
Index: movitz/losp/muerte/primitive-functions.lisp diff -u movitz/losp/muerte/primitive-functions.lisp:1.38 movitz/losp/muerte/primitive-functions.lisp:1.39 --- movitz/losp/muerte/primitive-functions.lisp:1.38 Fri Aug 6 13:54:17 2004 +++ movitz/losp/muerte/primitive-functions.lisp Sat Aug 7 04:12:09 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Oct 2 21:02:18 2001 ;;;; -;;;; $Id: primitive-functions.lisp,v 1.38 2004/08/06 20:54:17 ffjeld Exp $ +;;;; $Id: primitive-functions.lisp,v 1.39 2004/08/07 11:12:09 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -308,7 +308,7 @@ (:int 110) (:halt) (:jmp 'not-initialized))) - (:addl 7 :ebx) + (:addl 4 :ebx) (:andb #xf8 :bl) (:movl (:eax 4) :ecx) ; cons pointer to ECX (:leal (:ebx :ecx) :edx) ; new roof to EDX @@ -353,7 +353,7 @@ (check-type words (integer 2 *)) (compiler-macro-call malloc-non-pointer-words words))
-(define-primitive-function muerte::get-cons-pointer () +(define-primitive-function get-cons-pointer () "Return in EAX the next object location with space for EAX words, with tag 6. Preserve ECX." (macrolet @@ -361,9 +361,14 @@ ;; Here we just call malloc, and don't care if the allocation ;; is never comitted. `(with-inline-assembly (:returns :multiple-values) + ;; We need a stack-frame sice we're using the stack + (:pushl :ebp) + (:movl :esp :ebp) + (:pushl 4) (:locally (:movl :ecx (:edi (:edi-offset scratch0)))) (:call-local-pf malloc-pointer-words) (:locally (:movl (:edi (:edi-offset scratch0)) :ecx)) + (:leave) (:ret)))) (do-it)))