changeset 671:85e0509832f1 ia32-no-push-call

*** empty log message ***
author kono
date Thu, 03 May 2007 09:08:24 +0900
parents bce312f3c0cb
children 3f559c67bc86
files mc-code-ia32.c mc-codegen.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mc-code-ia32.c	Wed May 02 16:41:15 2007 +0900
+++ b/mc-code-ia32.c	Thu May 03 09:08:24 2007 +0900
@@ -409,7 +409,6 @@
 #define round4(i)   ((i+0x3)&~0x3)
 
 
-int disp_offset = -12;
 #define func_disp_offset (8)
 #define code_disp_offset (8)
 
@@ -418,6 +417,8 @@
 #define ARG_LVAR_OFFSET 0x10000000
 
 #define code_disp_offset0 (-8)
+// disp_offset
+int disp_offset = code_disp_offset0;
 
 #define CODE_LVAR(l) ((l)+code_disp_offset0)
 #define CODE_CALLER_ARG(l) ((l)+arg_offset1)
@@ -442,7 +443,8 @@
 code segment stack frame
 
                  * gotoを呼び出した関数のr1 ! r1(goto前のr1)
-   #             *                           esp <---r1_offset---------> r1
+                                                disp_offset
+   #             *                           ebp <---r1_offset---------> esp
 r+ +----------+--+----------+----------------+-----------+----------+----+
     cousin arg xx  reg save !callee arg      !code local  caller arg  xx
                    r20-r29     lvar>0         lvar<0      lvar>0x1000 000
--- a/mc-codegen.c	Wed May 02 16:41:15 2007 +0900
+++ b/mc-codegen.c	Thu May 03 09:08:24 2007 +0900
@@ -292,7 +292,7 @@
     case ARRAY:
 	if (chk==2) {
 	    g_expr0(e2);
-	    g_expr0(caddr(e1));
+	    t = g_expr0(caddr(e1));
 	    code_gexpr(e1);
 	    return t;
 	}
@@ -4069,7 +4069,7 @@
 {
     int dsp = 0;
     int type0;
-    int e1;
+    int e1 = 0;
 
     if (inmode || chk) {
 	e1 = list4(ind?ARROW:PERIOD,e,(int)nptr,type);