# HG changeset patch # User Shinji KONO # Date 1396764730 -32400 # Node ID 1408a5f1676f8805759159464ca2dbcbc074da77 # Parent 3542a0e38a5454bc0edf89be6f8b08d875904196 fix diff -r 3542a0e38a54 -r 1408a5f1676f Changes --- a/Changes Sun Apr 06 14:43:50 2014 +0900 +++ b/Changes Sun Apr 06 15:12:10 2014 +0900 @@ -10035,3 +10035,11 @@ inmode と parse_mode の両方をdebugするのが辛い。parse_mode=0 は、もはや使わないのだが。 +Sun Apr 6 15:11:13 JST 2014 + +local_struct_static がだめだめ。non parse_mode での構造体への直接代入が変。 + +zfill の最適化が足りない。 + + + diff -r 3542a0e38a54 -r 1408a5f1676f mc-parse.c --- a/mc-parse.c Sun Apr 06 14:43:50 2014 +0900 +++ b/mc-parse.c Sun Apr 06 15:12:10 2014 +0900 @@ -1668,7 +1668,7 @@ local_struct_static(int v) { NMTBL *nptr0,*n = ncaddr(v); - int sz = size(type),offset=0; + int offset=0; int smode = mode; int v0; // uninitialized part should be 0. @@ -1689,16 +1689,17 @@ v0 = list3n(GVAR,0,nptr0); decl_data_field(type,v0,offset); // do struct assignment before flushed assignment expression - init_vars = list2( - list4(STASS, - inmode?( - offset?( - lp64?list3(LADD,list3n(IVAR,n->dsp,0),llist2(LCONST,offset)): - list3(ADD,list3n(IVAR,n->dsp,0),list2(CONST,offset))): - list3n(IVAR,n->dsp,0)): - list3n(LVAR,n->dsp+offset,0), - list3(RSTRUCT,v0,sz),sz), - init_vars); + // int sz = size(n->ty); + //init_vars = list2( + // list4(STASS, + // inmode?( + // offset?( + // lp64?list3(LADD,list3n(IVAR,n->dsp,0),llist2(LCONST,offset)): + // list3(ADD,list3n(IVAR,n->dsp,0),list2(CONST,offset))): + // list3n(IVAR,n->dsp,0)): + // list3n(LVAR,n->dsp+offset,0), + // list3(RSTRUCT,v0,sz),sz), + // init_vars); mode=STADECL; gen_delayed_decl_data(v,0); mode = smode;