[movitz-cvs] CVS update: movitz/losp/muerte/primitive-functions.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Tue Jul 20 13:00:00 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv25514
Modified Files:
primitive-functions.lisp
Log Message:
Made primitive-function ensure-heap-cons-variable no longer preserve
EDX, because it's very difficult to preserve EDX while also observing
the GC invariant that a primitive-function cannot call another
primitive-function.
Date: Tue Jul 20 06:00:00 2004
Author: ffjeld
Index: movitz/losp/muerte/primitive-functions.lisp
diff -u movitz/losp/muerte/primitive-functions.lisp:1.31 movitz/losp/muerte/primitive-functions.lisp:1.32
--- movitz/losp/muerte/primitive-functions.lisp:1.31 Tue Jul 20 01:54:38 2004
+++ movitz/losp/muerte/primitive-functions.lisp Tue Jul 20 06:00:00 2004
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Tue Oct 2 21:02:18 2001
;;;;
-;;;; $Id: primitive-functions.lisp,v 1.31 2004/07/20 08:54:38 ffjeld Exp $
+;;;; $Id: primitive-functions.lisp,v 1.32 2004/07/20 13:00:00 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -571,7 +571,7 @@
(:ret)))
(define-primitive-function ensure-heap-cons-variable ()
- "Call with lended variable (a cons) in EAX. Preserves EDX."
+ "Call with lended variable (a cons) in EAX."
(with-inline-assembly (:returns :multiple-values)
;; Be defensive: Check that EAX is LISTP.
(:leal (:eax -1) :ecx)
@@ -582,12 +582,10 @@
(:cmpl :esp :eax) ; is cons below stack-frame?
(:jl 'return-ok)
;; must migrate cell onto heap
- (:pushl :edx)
(:movl (:eax 3) :ebx) ; cdr
(:movl (:eax -1) :eax) ; car
- (:locally (:call (:edi (:edi-offset fast-cons))))
- (:popl :edx)
- return-ok
+ (:locally (:jmp (:edi (:edi-offset fast-cons))))
+ return-ok
(:ret)))
(define-primitive-function box-u32-ecx ()
@@ -614,7 +612,7 @@
(define-primitive-function unbox-u32 ()
- "Load (ldb (byte 32 0) EAX) into ECX."
+ "Load (ldb (byte 32 0) EAX) into ECX. Preserve EAX and EBX."
(macrolet
((do-it ()
`(with-inline-assembly (:returns :multiple-values)
More information about the Movitz-cvs
mailing list