Mercurial > hg > CbC > old > device
changeset 202:601301152d9c
*** empty log message ***
author | kono |
---|---|
date | Sun, 11 Apr 2004 13:25:49 +0900 |
parents | 3ae7e188416f |
children | 28baf6cd9ad1 |
files | mc-code-powerpc.c mc-codegen.c mc-parse.c |
diffstat | 3 files changed, 45 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-powerpc.c Sat Apr 10 22:15:29 2004 +0900 +++ b/mc-code-powerpc.c Sun Apr 11 13:25:49 2004 +0900 @@ -170,7 +170,7 @@ f1-r8 input register f24-f31 saved register variable -function call stack frame + function call stack frame <------r1_offset------------------------------> <------------lvar_offset-------> r+ +------------+---+---------------+----------+--------------+----+ - @@ -1424,6 +1424,8 @@ g_expr_u(assign_expr0(arg,e4,t,t)); nargs ++ ; reg_arg++; continue; + } else if (t==LONGLONG||t==ULONGLONG) { + continue; } else if (t==DOUBLE||t==FLOAT) { if (reg_arg<MAX_INPUT_REGISTER_VAR) { /* sigh...
--- a/mc-codegen.c Sat Apr 10 22:15:29 2004 +0900 +++ b/mc-codegen.c Sun Apr 11 13:25:49 2004 +0900 @@ -181,6 +181,24 @@ code_drgvar(e1,1,creg); return DOUBLE; #endif +#if LONGLONG_CODE + case LRLVAR: + creg=use_longlong(creg); + code_lrlvar(e2,creg); + return LONGLONG; + case LRGVAR: + creg=use_longlong(creg); + code_lrgvar(e1,creg); + return LONGLONG; + case LURLVAR: + creg=use_longlong(creg); + code_lrlvar(e2,creg); + return ULONGLONG; + case LURGVAR: + creg=use_longlong(creg); + code_lrgvar(e1,creg); + return ULONGLONG; +#endif case FNAME: creg=use_int(creg); code_fname((NMTBL *)(e2),creg); @@ -199,6 +217,12 @@ code_dconst(e1,creg,0); return FLOAT; #endif +#if FLOAT_CODE + case LCONST: + creg=use_longlong(creg); + code_lconst(e1,creg); + return LONGLONG; +#endif case STRING: creg=use_int(creg); code_string(e1,creg);
--- a/mc-parse.c Sat Apr 10 22:15:29 2004 +0900 +++ b/mc-parse.c Sun Apr 11 13:25:49 2004 +0900 @@ -3458,7 +3458,10 @@ /* function argments */ argtypes = caddr(type); - if (!integral(t=cadr(type))&&(car(t)==STRUCT||car(t)==UNION)) { + if (!integral(t=cadr(type))&& + !(t==FLOAT||t==DOUBLE) && + !(t==LONGLONG||t==ULONGLONG) && + (car(t)==STRUCT||car(t)==UNION)) { /* skip return struct pointer */ if (argtypes==0) error(-1); argtypes = cadr(argtypes); @@ -3725,6 +3728,20 @@ symval=symval*8+ch-'0';getch(); } return sym=CONST; + } else if (ch=='L') { /* 0L or 0LL case */ + if (getch()=='L') { +#if LONGLONG_CODE + getch(); + lsymval = 0; + return sym=LCONST; +#else + symval = 0; + return sym=CONST; +#endif + } else { + symval = 0; + return sym=CONST; + } } d=1; *cheapp++ = '0'; /* 0. case */