Mercurial > hg > CbC > old > device
diff mc-code-powerpc.c @ 638:35014112c01d
multi dimentional array in functional arugments.
(not yet fixed)
author | kono |
---|---|
date | Tue, 31 Oct 2006 22:40:19 +0900 |
parents | 140b65f8ff03 |
children | fe23fe842b82 |
line wrap: on
line diff
--- a/mc-code-powerpc.c Tue Oct 31 20:42:42 2006 +0900 +++ b/mc-code-powerpc.c Tue Oct 31 22:40:19 2006 +0900 @@ -1970,7 +1970,7 @@ } freg_arg++; nargs += size(t)/SIZE_OF_INT; - } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION||car(t)==ARRAY)) { + } else if (t>=0&&(car(t)==STRUCT||car(t)==UNION)) { nargs += round4(size(t))/SIZE_OF_INT; } else { error(TYERR); @@ -2024,11 +2024,6 @@ return get_register_var(0); } else return list3(LVAR,caller_arg_offset_v(nargs),0); - } else if (t>=0&&(car(t)==ARRAY)) { - if (mode==AS_SAVE) { - return get_register_var(0); - } else - return list3(LVAR,caller_arg_offset_v(nargs),0); } else { error(-1); return get_register_var(0); @@ -2083,12 +2078,12 @@ pnargs=nargs;preg_arg=reg_arg;pfreg_arg=freg_arg; complex_ = e3; } - if (t>=0&&(car(t)==STRUCT||car(t)==UNION||car(t)==ARRAY)) { + if (t>=0&&(car(t)==STRUCT||car(t)==UNION)) { // The struct should be pushed after complex arguments. if (e5) { // compute address only, complex_ is me now. Clear it. complex_ = 0; e4 = car(e3); - if (car(e4)!=RSTRUCT && car(e4)!=ARRAY) error(-1); + if (car(e4)!=RSTRUCT) error(-1); if (!simple_arg(cadr(e4))) { // Calculate complex struct address here. // If simple, leave it.