Mercurial > hg > CbC > old > device
diff mc-parse.c @ 219:6190d24e178c use_xxx_fix_before
long long code generation level 4
author | kono |
---|---|
date | Sun, 25 Apr 2004 18:32:30 +0900 |
parents | 8581c314e31a |
children | ceae585186d9 |
line wrap: on
line diff
--- a/mc-parse.c Sat Apr 24 21:56:53 2004 +0900 +++ b/mc-parse.c Sun Apr 25 18:32:30 2004 +0900 @@ -809,6 +809,7 @@ if(t==REGISTER) return size_of_int; if(t==DREGISTER) return size_of_double; if(t==FREGISTER) return size_of_float; + if(t==LREGISTER) return size_of_longlong; if(scalar(t)) return size_of_int; if(t==FLOAT) return size_of_float; if(t==DOUBLE) return size_of_double; @@ -2237,7 +2238,7 @@ return(list4(LASSOP,e1,e2,op+LOP)); } else if (t==ULONGLONG) { e2=ulonglong_value(e2,type); type=t; - return(list4(LASSOP,e1,e2,op+LOP+US)); + return(list4(LASSOP,e1,e2,op+LOP+((op==MUL+AS||op==DIV+AS)?US:0))); } #endif if(!integral(type)) error(TYERR); @@ -2744,6 +2745,7 @@ type=nptr->ty; getsym(0); break; + case LREGISTER: case DREGISTER: case FREGISTER: case REGISTER: @@ -3257,6 +3259,7 @@ } if((op==MUL||op==DIV)&&car(e2)==LCONST&&lcadr(e2)==1) return e1; if(op==BOR||op==EOR||op==BAND) return(list3(op+LOP,e1,e2)); + /* there is no UADD, USUB (should be? */ if(op==LSHIFT||op==RSHIFT) return(list3(op+(t1==ULONGLONG?US:0)+LOP,e1,e2)); return(list3(type==ULONGLONG?op+US+LOP:op,e1,e2)); } @@ -3272,16 +3275,14 @@ if(t1>0&&car(t1)==POINTER) { e2= int_value(e2,t2); t2=INT; } else if(t2>0&&car(t2)==POINTER) { e1= int_value(e1,t1); t1=INT; } #if FLOAT_CODE - if(t1==DOUBLE||t2==DOUBLE) + else if(t1==DOUBLE||t2==DOUBLE) return dbinop(op,e1,e2,t1,t2); - if(t1==FLOAT||t2==FLOAT) + else if(t1==FLOAT||t2==FLOAT) return fbinop(op,e1,e2,t1,t2); #endif #if LONGLONG_CODE - if(t1==LONGLONG||t2==LONGLONG) + else if((t1==LONGLONG||t2==LONGLONG)||(t1==ULONGLONG||t2==ULONGLONG)) return lbinop(op,e1,e2,t1,t2); - if(t1==ULONGLONG||t2==ULONGLONG) - return lbinop(op+((op==BOR||op==EOR||op==BAND||op==EQ||op==NEQ)?0:US),e1,e2,t1,t2); #endif if(car(e1)==CONST&&car(e2)==CONST) { e1=cadr(e1);