[armedbear-cvs] r11600 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Thu Jan 29 20:00:27 UTC 2009


Author: ehuelsmann
Date: Thu Jan 29 20:00:24 2009
New Revision: 11600

Log:
Add more opcodes to the list; update stack effect information.

Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
   trunk/abcl/src/org/armedbear/lisp/opcodes.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Thu Jan 29 20:00:24 2009
@@ -1040,12 +1040,18 @@
                  95 ; swap
                  96 ; iadd
                  97 ; ladd
+                 98 ; fadd
+                 99 ; dadd
                  100 ; isub
                  101 ; lsub
+                 102 ; fsub
+                 103 ; dsub
                  104 ; imul
                  105 ; lmul
                  116 ; ineg
                  117 ; lneg
+                 118 ; fneg
+                 119 ; dneg
                  120 ; ishl
                  121 ; lshl
                  122 ; ishr
@@ -1057,6 +1063,7 @@
                  130 ; ixor
                  131 ; lxor
                  133 ; i2l
+                 134 ; i2f
                  136 ; l2i
                  148 ; lcmp
                  153 ; ifeq
@@ -6804,14 +6811,16 @@
             (arg2 (%cadr args))
             (type1 (derive-compiler-type arg1))
             (type2 (derive-compiler-type arg2))
-            (result-type (derive-compiler-type form)))
-;;        (let ((*print-structure* nil))
-;;          (format t "~&p2-plus arg1 = ~S~%" arg1)
-;;          (format t "p2-plus arg2 = ~S~%" arg2))
-;;        (format t "~&p2-plus type1 = ~S~%" type1)
-;;        (format t "p2-plus type2 = ~S~%" type2)
-;;        (format t "p2-plus result-type = ~S~%" result-type)
-;;        (format t "p2-plus representation = ~S~%" representation)
+            (result-type (derive-compiler-type form))
+            (result-rep (type-representation result-type)))
+;;         (let ((*print-structure* nil))
+;;           (format t "~&p2-plus arg1 = ~S~%" arg1)
+;;           (format t "p2-plus arg2 = ~S~%" arg2))
+;;         (format t "~&p2-plus type1 = ~S~%" type1)
+;;         (format t "p2-plus type2 = ~S~%" type2)
+;;         (format t "p2-plus result-type = ~S~%" result-type)
+;;         (format t "p2-plus result-rep = ~S~%" result-rep)
+;;         (format t "p2-plus representation = ~S~%" representation)
        (cond ((and (numberp arg1) (numberp arg2))
               (compile-constant (+ arg1 arg2) target representation))
              ((and (numberp arg1) (eql arg1 0))
@@ -6831,7 +6840,7 @@
               (cond ((fixnum-type-p type1)
                      (compile-form arg1 'stack :int)
                      (emit 'i2l))
-                    (t
+                      (t
                      (compile-form arg1 'stack :long)))
               (cond ((fixnum-type-p type2)
                      (compile-form arg2 'stack :int)
@@ -6898,7 +6907,7 @@
                 (:int
                  (emit 'l2i))
                 (:long)
-                (t
+                      (t
                  (convert-representation :long nil)))
               (emit-move-from-stack target representation))
              (t

Modified: trunk/abcl/src/org/armedbear/lisp/opcodes.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/opcodes.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/opcodes.lisp	Thu Jan 29 20:00:24 2009
@@ -154,8 +154,8 @@
 (define-opcode dadd 99 1 -2)
 (define-opcode isub 100 1 -1)
 (define-opcode lsub 101 1 -2)
-(define-opcode fsub 102 1 nil)
-(define-opcode dsub 103 1 nil)
+(define-opcode fsub 102 1 -1)
+(define-opcode dsub 103 1 -2)
 (define-opcode imul 104 1 -1)
 (define-opcode lmul 105 1 -2)
 (define-opcode fmul 106 1 -1)
@@ -170,8 +170,8 @@
 (define-opcode drem 115 1 nil)
 (define-opcode ineg 116 1 0)
 (define-opcode lneg 117 1 0)
-(define-opcode fneg 118 1 nil)
-(define-opcode dneg 119 1 nil)
+(define-opcode fneg 118 1 0)
+(define-opcode dneg 119 1 0)
 (define-opcode ishl 120 1 -1)
 (define-opcode lshl 121 1 -1)
 (define-opcode ishr 122 1 -1)




More information about the armedbear-cvs mailing list