changeset 657:bb3a11f3f31d

assop indirect bug
author kono
date Wed, 24 Jan 2007 13:47:15 +0900
parents 8320ae3ac186
children cb3809f4ec97
files Makefile mc-codegen.c test/hoge.code-out test/simp.code-out
diffstat 4 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Jan 15 13:30:31 2007 +0900
+++ b/Makefile	Wed Jan 24 13:47:15 2007 +0900
@@ -135,6 +135,7 @@
 	make check-code$(MK) TARGET=test/scope
 	make check-code$(MK) TARGET=test/throw
 	make check-code$(MK) TARGET=test/test2
+	make check-code$(MK) TARGET=test/hoge
 	make check-code$(MK) TARGET=test/too-long-argument
 
 check-nkf:
--- a/mc-codegen.c	Mon Jan 15 13:30:31 2007 +0900
+++ b/mc-codegen.c	Wed Jan 24 13:47:15 2007 +0900
@@ -2475,7 +2475,6 @@
     default:       byte = 0; sign = 1; size = size_of_int;
     }
     e2 = cadr(e1);
-    if (car(e2)==INDIRECT) e2=cadr(e2);
     e3 = caddr(e1);
     op = cadddr(e1);
 
@@ -2525,7 +2524,7 @@
     /*   e2 op= e3 */
     d = (car(e1) == DASSOP);
     e2 = cadr(e1);
-    if (car(e2)==INDIRECT) e2=cadr(e2);
+    // if (car(e2)==INDIRECT) e2=cadr(e2);
     e3 = caddr(e1);
     op = cadddr(e1);
 
@@ -2561,7 +2560,7 @@
 
     /*   e2 op= e3 */
     e2 = cadr(e1);
-    if (car(e2)==INDIRECT) e2=cadr(e2);
+    // if (car(e2)==INDIRECT) e2=cadr(e2);
     e3 = caddr(e1);
     op = cadddr(e1);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hoge.code-out	Wed Jan 24 13:47:15 2007 +0900
@@ -0,0 +1,6 @@
+inc: 1
+mod: 1
+inc: 2
+mod: 2
+inc: 3
+mod: 3
--- a/test/simp.code-out	Mon Jan 15 13:30:31 2007 +0900
+++ b/test/simp.code-out	Wed Jan 24 13:47:15 2007 +0900
@@ -1,5 +1,8 @@
-#0013:1
-#0015:.out
-#0027:1 E
-#0029:.out
-#0031:1==1
+#0031:1
+#0033:.out
+#0059:0
+#0062:555
+#0037:6
+#0048:1 E
+#0050:.out
+#0052:1==1