Mercurial > hg > CbC > old > device
changeset 354:32cd53208b79
type of fix.
author | kono |
---|---|
date | Sat, 03 Jul 2004 14:40:30 +0900 |
parents | 41ed77cb9c67 |
children | 6188f66c0c0b |
files | mc-code-powerpc.c mc-parse.c stdio.h |
diffstat | 3 files changed, 16 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-powerpc.c Sat Jul 03 13:53:37 2004 +0900 +++ b/mc-code-powerpc.c Sat Jul 03 14:40:30 2004 +0900 @@ -2544,6 +2544,10 @@ inc_cmpflag(); printf("\tcmpwi cr%d,%s,lo16(%d)\n",cmpflag,crn,v); break; + case UCMP: + inc_cmpflag(); + printf("\tcmplwi cr%d,%s,lo16(%d)\n",cmpflag,crn,v); + break; case EOR: printf("\txori %s,%s,lo16(%d)\n",crn,crn,v); break;
--- a/mc-parse.c Sat Jul 03 13:53:37 2004 +0900 +++ b/mc-parse.c Sat Jul 03 14:40:30 2004 +0900 @@ -642,6 +642,7 @@ { int t = INT; int slfree; + int smode,stype; stypedecl = 0; while (sym==KONST) { @@ -726,9 +727,15 @@ case TYPEOF: getsym(0); checksym(LPAR); - slfree=lfree; - expr(0); type=t; - lfree=slfree; + slfree=lfree; stype=type; + smode = mode; mode = LDECL; + if((t=typespec())==0) { + mode = STAT; + expr(0); + t = type; + } + lfree=slfree; type=stype; + mode = smode; checksym(RPAR); return t; break; @@ -2811,7 +2818,7 @@ case CODE : case SHORT : case LONG : case STRUCT : case UNION : case ENUM : case LONGLONG : case FLOAT : case DOUBLE : case VOID : - case ULONGLONG : case TYPEOF : + case ULONGLONG : case TYPEOF : case KONST: return 1; case IDENT: return nptr->sc==TYPE; }