# HG changeset patch # User kono # Date 1178150904 -32400 # Node ID 85e0509832f1c3295eb04ebfb98b0abb56146d19 # Parent bce312f3c0cbd0d450dc0b0c27f54c25efee99f1 *** empty log message *** diff -r bce312f3c0cb -r 85e0509832f1 mc-code-ia32.c --- 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 diff -r bce312f3c0cb -r 85e0509832f1 mc-codegen.c --- 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);