[movitz-cvs] CVS update: movitz/special-operators.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Sat Jul 10 13:29:18 UTC 2004


Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv13088

Modified Files:
	special-operators.lisp 
Log Message:
Re-working the compilation of addition. Now use a proper extended-code
instruction (which is like a "vop", I think).

Date: Sat Jul 10 06:29:18 2004
Author: ffjeld

Index: movitz/special-operators.lisp
diff -u movitz/special-operators.lisp:1.24 movitz/special-operators.lisp:1.25
--- movitz/special-operators.lisp:1.24	Fri Jul  9 09:12:44 2004
+++ movitz/special-operators.lisp	Sat Jul 10 06:29:18 2004
@@ -8,7 +8,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Fri Nov 24 16:22:59 2000
 ;;;;                
-;;;; $Id: special-operators.lisp,v 1.24 2004/07/09 16:12:44 ffjeld Exp $
+;;;; $Id: special-operators.lisp,v 1.25 2004/07/10 13:29:18 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -1000,6 +1000,18 @@
       :forward all
       :env local-env
       :form sub-form)))
+
+(define-special-operator muerte::++%2op (&all all &form form &env env &result-mode result-mode)
+  (destructuring-bind (term1 term2)
+      (cdr form)
+    (let ((returns (ecase (result-mode-type result-mode)
+		     ((:function :multiple-values :eax :push) :eax)
+		     ((:ebx :ecx :edx) result-mode)
+		     ((:lexical-binding) result-mode))))
+      (compiler-values ()
+	:returns returns
+	:code `((:add ,(movitz-binding term1 env) ,(movitz-binding term2 env) ,returns))))))
+    
 
 (define-special-operator muerte::+%2op (&all all &form form &env env &result-mode result-mode)
   (assert (not (eq :boolean result-mode)) ()





More information about the Movitz-cvs mailing list