Mercurial > hg > CbC > old > device
changeset 231:f5efe15629d4
*** empty log message ***
author | kono |
---|---|
date | Wed, 28 Apr 2004 21:33:45 +0900 |
parents | d60c6c31f63a |
children | 8a23c20ac92d |
files | Changes mc-code-powerpc.c mc-codegen.c mc-parse.c test/code-gen.c |
diffstat | 5 files changed, 177 insertions(+), 184 deletions(-) [+] |
line wrap: on
line diff
--- a/Changes Wed Apr 28 15:06:01 2004 +0900 +++ b/Changes Wed Apr 28 21:33:45 2004 +0900 @@ -4071,3 +4071,13 @@ あぁ、なんか、まだ、printf が局所変数を壊しているね。 そういえば、局所変数のアライメントは合わせてないけどいいの? + +unsigned って、もしかして、もう少しルールが複雑? + / % << > + I op I I I I I + I op U I I I I + U op I I I U I + U op U U U U U +でもないか。 + +なんか、いろいろ直した割に、進んでないな。
--- a/mc-code-powerpc.c Wed Apr 28 15:06:01 2004 +0900 +++ b/mc-code-powerpc.c Wed Apr 28 21:33:45 2004 +0900 @@ -1142,7 +1142,6 @@ void code_preinc(int e1,int e2,int dir,int sign,int sz,int reg) { char *xrn,*drn; - int dreg; if (car(e2)==REGISTER) { use_int(reg); printf("\taddi %s,%s,%d\n", @@ -1155,14 +1154,14 @@ if (!is_int_reg(creg)) error(-1); xrn = register_name(creg); if (reg==USE_CREG) { - dreg=get_register(); if (!dreg) error(-1); - drn = register_name(dreg); - set_ireg(dreg,0); + reg=get_register(); if (!reg) error(-1); + drn = register_name(reg); + set_ireg(reg,0); } else { drn = register_name(reg); } printf("\t%s %s,0(%s)\n",cload(sz),drn,xrn); - if (use) cext(sign,sz,dreg); + if (use) cext(sign,sz,reg); printf("\taddi %s,%s,%d\n",drn,drn,dir); printf("\t%s %s,0(%s)\n",cstore(sz),drn,xrn); } @@ -1171,7 +1170,7 @@ void code_postinc(int e1,int e2,int dir,int sign,int sz,int reg) { char *xrn,*crn,*nrn; - int dreg,nreg; + int nreg; if (car(e2)==REGISTER) { use_int(reg); printf("\tmr %s,%s\n",register_name(reg),register_name(cadr(e2))); @@ -1185,9 +1184,9 @@ nreg=get_register(); if (!nreg) error(-1); nrn = register_name(nreg); if (reg==USE_CREG) { - dreg=get_register(); if (!dreg) error(-1); - xrn = register_name(dreg); - set_ireg(dreg,0); + reg=get_register(); if (!reg) error(-1); + xrn = register_name(reg); + set_ireg(reg,0); } else { xrn = register_name(reg); } @@ -3205,20 +3204,20 @@ void drexpr(int e1, int e2,int l1, int op,int cond) { - if (cond) { + if (!cond) { switch(op) { case FOP+GT: - drexpr(e2,e1,l1,FOP+GE,0); break; + drexpr(e2,e1,l1,FOP+GE,1); break; case FOP+GE: - drexpr(e2,e1,l1,FOP+GT,0); break; + drexpr(e2,e1,l1,FOP+GT,1); break; case FOP+EQ: op=FOP+NEQ; break; case FOP+NEQ: op=FOP+EQ; break; case DOP+GT: - drexpr(e2,e1,l1,DOP+GE,0); break; + drexpr(e2,e1,l1,DOP+GE,1); break; case DOP+GE: - drexpr(e2,e1,l1,DOP+GT,0); break; + drexpr(e2,e1,l1,DOP+GT,1); break; case DOP+EQ: op=DOP+NEQ; break; case DOP+NEQ: @@ -3240,11 +3239,11 @@ break; case DOP+EQ: case FOP+EQ: - printf("\tbne\tcr0,L_%d\n",l1); + printf("\tbeq\tcr0,L_%d\n",l1); break; case DOP+NEQ: case FOP+NEQ: - printf("\tbeq\tcr0,L_%d\n",l1); + printf("\tbne\tcr0,L_%d\n",l1); break; } } @@ -3337,9 +3336,9 @@ case LOP+LE: pcond(code_gt(!cond),l1); break; case LOP+UGT: - pcond(code_ugt(!cond),l1); break; + pcond(code_ugt(cond),l1); break; case LOP+UGE: - pcond(code_uge(!cond),l1); break; + pcond(code_uge(cond),l1); break; default: error(-1); } @@ -3358,9 +3357,9 @@ case LOP+LE: pcond(code_gt(!cond),l1); break; case LOP+UGT: - pcond(code_ugt(!cond),l1); break; + pcond(code_ugt(cond),l1); break; case LOP+UGE: - pcond(code_uge(!cond),l1); break; + pcond(code_uge(cond),l1); break; default: error(-1); } @@ -3719,7 +3718,9 @@ clear_ptr_cache(); lsrd_lib_used = 1; set_lreg(RET_LREGISTER,1); - set_lreg_operand(oreg,1); + if (regv_l(oreg)!=5) { + printf("\tmr r5,%s\n", lregister_name_low(oreg)); + } printf("\tbl lsrd__\n"); } @@ -3886,10 +3887,10 @@ } else return 0; switch(op) { - case LSHIFT: - case ULSHIFT: - case RSHIFT: - case URSHIFT: + case LLSHIFT: + case LULSHIFT: + case LRSHIFT: + case LURSHIFT: return (0<v&&v<31); case LADD: case LSUB: @@ -3923,10 +3924,10 @@ greg = get_register(); use_reg(greg); grn = register_name(greg); - printf("\tsrwi %s,%s,%d\n",grn,crn_h,32-v); + printf("\tsrwi %s,%s,%d\n",grn,crn_l,32-v); + printf("\tslwi %s,%s,%d\n",crn_h,crn_h,v); + printf("\tor %s,%s,%s\n",crn_h,grn,crn_h); printf("\tslwi %s,%s,%d\n",crn_l,crn_l,v); - printf("\tor %s,%s,%s\n",crn_l,grn,crn_l); - printf("\tslwi %s,%s,%d\n",crn_h,crn_h,v); free_register(greg); return; case LRSHIFT: @@ -3934,7 +3935,7 @@ use_reg(greg); grn = register_name(greg); printf("\tsrwi %s,%s,%d\n",grn,crn_l,v); - printf("\tinsrwi %s,%s,%d\n",grn,crn_h,v); + printf("\tinsrwi %s,%s,%d,0\n",grn,crn_h,v); printf("\tsrawi %s,%s,%d\n",crn_h,crn_h,v); printf("\tmr %s,%s\n",crn_l,grn); free_register(greg); @@ -3943,19 +3944,20 @@ greg = get_register(); use_reg(greg); grn = register_name(greg); - printf("\tslwi %s,%s,%d\n",grn,crn_l,32-v); - printf("\tsrwi %s,%s,%d\n",crn_l,crn_h,v); - printf("\tor %s,%s,%s\n",crn_h,grn,crn_h); + printf("\tslwi %s,%s,%d\n",grn,crn_h,32-v); printf("\tsrwi %s,%s,%d\n",crn_l,crn_l,v); + printf("\tor %s,%s,%s\n",crn_l,grn,crn_l); + printf("\tsrwi %s,%s,%d\n",crn_h,crn_h,v); free_register(greg); return; + case LSUB: + v = -v; case LADD: - printf("\taddic %s,%s,lo16(%d)\n",crn_l,crn_l,v); - printf("\taddze %s,%s\n",crn_h,crn_h); - break; - case LSUB: - printf("\taddic %s,%s,lo16(-%d)\n",crn_l,crn_l,v); - printf("\taddme %s,%s\n",crn_h,crn_h); + printf("\taddic %s,%s,%d\n",crn_l,crn_l,v); + if (v<0) + printf("\taddme %s,%s\n",crn_h,crn_h); + else + printf("\taddze %s,%s\n",crn_h,crn_h); break; case LBOR: printf("\tori %s,%s,lo16(%d)\n",crn_l,crn_l,v);
--- a/mc-codegen.c Wed Apr 28 15:06:01 2004 +0900 +++ b/mc-codegen.c Wed Apr 28 21:33:45 2004 +0900 @@ -531,16 +531,16 @@ drexpr(cadr(e1),caddr(e1),l1,car(e1),cond); return; case FOP+LT: - drexpr(caddr(e1),cadr(e1),l1,FOP+GT,!cond); - return; - case FOP+LE: drexpr(caddr(e1),cadr(e1),l1,FOP+GE,!cond); return; + case FOP+LE: + drexpr(caddr(e1),cadr(e1),l1,FOP+GT,!cond); + return; case DOP+LT: - drexpr(caddr(e1),cadr(e1),l1,DOP+GT,!cond); + drexpr(caddr(e1),cadr(e1),l1,DOP+GE,!cond); return; case DOP+LE: - drexpr(caddr(e1),cadr(e1),l1,DOP+GE,!cond); + drexpr(caddr(e1),cadr(e1),l1,DOP+GT,!cond); return; #endif #if LONGLONG_CODE @@ -551,20 +551,20 @@ lrexpr(cadr(e1),caddr(e1),l1,car(e1),cond); return; case LOP+LT: - lrexpr(caddr(e1),cadr(e1),l1,LOP+GT,!cond); + lrexpr(caddr(e1),cadr(e1),l1,LOP+GE,!cond); return; case LOP+LE: - lrexpr(caddr(e1),cadr(e1),l1,LOP+GE,!cond); + lrexpr(caddr(e1),cadr(e1),l1,LOP+GT,!cond); return; case LOP+UGT: case LOP+UGE: - lrexpr(cadr(e1),caddr(e1),l1,car(e1),!cond); + lrexpr(cadr(e1),caddr(e1),l1,car(e1),cond); return; case LOP+ULT: - lrexpr(caddr(e1),cadr(e1),l1,LOP+UGT,!cond); + lrexpr(caddr(e1),cadr(e1),l1,LOP+UGE,!cond); return; case LOP+ULE: - lrexpr(caddr(e1),cadr(e1),l1,LOP+UGE,!cond); + lrexpr(caddr(e1),cadr(e1),l1,LOP+UGT,!cond); return; #endif case LAND:
--- a/mc-parse.c Wed Apr 28 15:06:01 2004 +0900 +++ b/mc-parse.c Wed Apr 28 21:33:45 2004 +0900 @@ -2467,16 +2467,7 @@ t=type; getsym(0); e2=rvalue(expr10()); - if(t==DOUBLE||type==DOUBLE|| - t==FLOAT||type==FLOAT) - /* binop will handle op+DOP */ - e1=binop(op,e1,e2,t,type); - else if(t==INT&&type==INT) /* signed case */ - e1=binop(op,e1,e2,t,type); - else if(t==LONGLONG&&type==LONGLONG) /* signed case */ - e1=binop(op,e1,e2,t,type); - else /* UNSIGNED, ULONGONG */ - e1=binop(op+US,e1,e2,t,type); + e1=binop(op,e1,e2,t,type); type= INT; } return e1; @@ -2633,14 +2624,18 @@ getsym(0); e=rvalue(expr13()); #if FLOAT_CODE - if(type==FLOAT||type==DOUBLE) + if(type==FLOAT||type==DOUBLE) { + type=INT; return(car(e)==DCONST?list2(CONST,!dcadr(e)): list3((type==DOUBLE?DOP:FOP)+NEQ,dlist2(DCONST,0.0),e)); + } #endif #if LONGLONG_CODE - if(type==LONGLONG||type==ULONGLONG) + if(type==LONGLONG||type==ULONGLONG) { + type=INT; return(car(e)==LCONST?list2(LCONST,!lcadr(e)): list3(LOP+NEQ,llist2(LCONST,0LL),e)); + } #endif if(!scalar(type)) error(TYERR); @@ -3162,7 +3157,7 @@ } else if(op==LE) { type=INT; return(list3(GE+dop,e2,e1)); - } else if(op==GT||op==GE||op==LT||op==LE||op==EQ||op==NEQ) { + } else if(op==GT||op==GE||op==EQ||op==NEQ) { type=INT; return(list3(op+dop,e1,e2)); } else if(op==ADD||op==SUB||op==MUL||op==DIV) @@ -3195,15 +3190,16 @@ int e=0; long long le1, le2; long long le = 0; - - if (t1==LONGLONG||t2==LONGLONG) { + int us = (t1==ULONGLONG&&t2==ULONGLONG); + + if (us||(t1==ULONGLONG&&(op==LSHIFT||op==RSHIFT))) { + e1=ulonglong_value(e1,t1); + e2=ulonglong_value(e2,t2); + type = ULONGLONG; + } else { e1=longlong_value(e1,t1); e2=longlong_value(e2,t2); type = LONGLONG; - } else { - e1=ulonglong_value(e1,t1); - e2=ulonglong_value(e2,t2); - type = ULONGLONG; } if(car(e1)==LCONST&&car(e2)==LCONST) { le1=lcadr(e1); @@ -3222,35 +3218,37 @@ case MUL: le=le1*le2;break; case DIV: - if(!le2) error(EXERR);le=le1/le2;break; + if(!le2) error(EXERR); + if (us) le=(((unsigned long long )le1)/((unsigned long long )le2)); + else e=(le1/le2); case MOD: - if(!le2) error(EXERR);le=le1%le2;break; + if(!le2) error(EXERR); + if (us) le=(((unsigned long long )le1)%((unsigned long long )le2)); + else e=(le1%le2); case RSHIFT: - le=le1>>le2;break; + if (t1==ULONGLONG) le=(((unsigned long long)le1)<<le2); else le=le1<<le2; + break; case LSHIFT: - le=le1<<le2;break; + if (t1==ULONGLONG) le=(((unsigned long long)le1)>>le2); else le=le1>>le2; + break; default: switch(op) { case EQ: e=(le1==le2);break; case NEQ: e=(le1!=le2);break; + case LT: + le=le1;le1=le2;le2=le; case GT: - e=(le1>le2);break; - case GE: - e=(le1>=le2);break; - case LT: - e=(le1<le2);break; + if (us) e=((unsigned long long)le1>(unsigned long long)le2); + else e=(le1>le2); + break; case LE: - e=(le1<=le2);break; - case UGT: - e=((unsigned)le1>(unsigned)le2);break; - case UGE: - e=((unsigned)le1>=(unsigned)le2);break; - case ULT: - e=((unsigned)le1<(unsigned)le2);break; - case ULE: - e=((unsigned)le1<=(unsigned)le2);break; + le=le1;le1=le2;le2=le; + case GE: + if (us) e=((unsigned long long)le1>=(unsigned long long)le2); + else e=(le1>=le2); + break; default: error(-1); return list2(CONST,0); } @@ -3260,35 +3258,23 @@ return llist2(LCONST,le); } if(op==LT) { - type = INT; return(list3(GT+LOP,e2,e1)); + type = INT; return(list3(GT+LOP+us,e2,e1)); } else if(op==LE) { - type = INT; return(list3(GE+LOP,e2,e1)); - } else if(op==ULT) { - type = INT; return(list3(UGT+LOP,e2,e1)); - } else if(op==ULE) { - type = INT; return(list3(UGE+LOP,e2,e1)); - } else if(op==GT||op==GE||op==LT||op==LE|| - op==UGT||op==UGE||op==ULT||op==ULE|| - op==EQ||op==NEQ - ) - type = INT; return(list3(op+LOP,e1,e2)); - if(op==SUB&&car(e2)==LCONST) { op=ADD+LOP; lcadr(e2)=-lcadr(e2); } + type = INT; return(list3(GE+LOP+us,e2,e1)); + } else if(op==GT||op==GE||op==LT||op==LE) { + type = INT; return(list3(op+LOP+us,e1,e2)); + } + if(op==SUB&&car(e2)==LCONST) { op=ADD; lcadr(e2)=-lcadr(e2); } if((op==ADD||op==MUL||op==BOR||op==EOR||op==BAND)&& (car(e1)==LCONST||(car(e2)!=LCONST&& (car(e1)==RGVAR||car(e1)==RLVAR)))) { e=e1;e1=e2;e2=e;e=t1;t1=t2;t2=e; } - if(op==ADD) { - return(list3(ADD+LOP,e1,e2)); - } - if(op==SUB) { - return(list3(SUB+LOP,e1,e2)); - } 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)); + if(op==BOR||op==EOR||op==BAND||op==ADD||op==SUB||op==EQ||op==NEQ) + return(list3(op+LOP,e1,e2)); + if(op==LSHIFT||op==RSHIFT) return(list3(op+LOP+(t1==ULONGLONG),e1,e2)); + return(list3(op+LOP+us,e1,e2)); } #endif @@ -3298,6 +3284,7 @@ binop(int op, int e1, int e2, int t1, int t2) { int e=0; + int us = (t1==UNSIGNED&&t2==UNSIGNED); 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; } @@ -3308,7 +3295,7 @@ return fbinop(op,e1,e2,t1,t2); #endif #if LONGLONG_CODE - else if((t1==LONGLONG||t2==LONGLONG)||(t1==ULONGLONG||t2==ULONGLONG)) + else if(t1==LONGLONG||t2==LONGLONG||t1==ULONGLONG||t2==ULONGLONG) return lbinop(op,e1,e2,t1,t2); #endif if(car(e1)==CONST&&car(e2)==CONST) { @@ -3349,54 +3336,47 @@ case MUL: e=e1*e2;break; case DIV: - if(!e2) error(EXERR);e=e1/e2;break; + if(!e2) error(EXERR); + if (us) e=(((unsigned)e1)/((unsigned)e2)); else e=e1/e2; + break; case MOD: - if(!e2) error(EXERR);e=e1%e2;break; + if(!e2) error(EXERR); + if (us) e=(((unsigned)e1)%((unsigned)e2)); else e=e1%e2; + break; case RSHIFT: - e=e1>>e2;break; + if (t1==UNSIGNED) e=(((unsigned)e1)>>((unsigned)e2)); else e=e1>>e2; + break; case LSHIFT: - e=e1<<e2;break; - case URSHIFT: - e=((unsigned)e1)>>e2;break; - case ULSHIFT: - e=((unsigned)e1)<<e2;break; + if (t1==UNSIGNED) e=(((unsigned)e1)<<((unsigned)e2)); else e=e1<<e2; + break; case EQ: e=(e1==e2);break; case NEQ: e=(e1!=e2);break; + case LT: + e=e1;e1=e2;e2=e; case GT: - e=(e1>e2);break; + if (us) e=(((unsigned)e1)>((unsigned)e2)); else e=(e1>e2); + break; + case LE: + e=e1;e1=e2;e2=e; case GE: - e=(e1>=e2);break; - case LT: - e=(e1<e2);break; - case LE: + if (us) e=(((unsigned)e1)>=((unsigned)e2)); else e=(e1>=e2); + break; e=(e1<=e2);break; - case UGT: - e=((unsigned)e1>(unsigned)e2);break; - case UGE: - e=((unsigned)e1>=(unsigned)e2);break; - case ULT: - e=((unsigned)e1<(unsigned)e2);break; - case ULE: - e=((unsigned)e1<=(unsigned)e2);break; default: error(-1); return list2(CONST,0); } return list2(CONST,e); } if(op==LT) { - return(list3(GT,e2,e1)); + return(list3(GT+us,e2,e1)); } else if(op==LE) { - return(list3(GE,e2,e1)); - } else if(op==ULT) { - return(list3(UGT,e2,e1)); - } else if(op==ULE) { - return(list3(UGE,e2,e1)); - } else if(op==GT||op==GE||op==LT||op==LE|| - op==UGT||op==UGE||op==ULT||op==ULE|| - op==EQ||op==NEQ - ) + return(list3(GE+us,e2,e1)); + } else if(op==GT||op==GE||op==LT||op==LE) { + return(list3(op+us,e1,e2)); + } else if(op==EQ||op==NEQ) { return(list3(op,e1,e2)); + } if(op==SUB&&car(e2)==CONST) { op=ADD; cadr(e2)=-cadr(e2); } if((op==ADD||op==MUL||op==BOR||op==EOR||op==BAND)&& (car(e1)==CONST||(car(e2)!=CONST&& @@ -3449,7 +3429,8 @@ if((op==MUL||op==DIV)&&car(e2)==CONST&&cadr(e2)==1) return e1; if(op==BOR||op==EOR||op==BAND) return(list3(op,e1,e2)); if(op==LSHIFT||op==RSHIFT) return(list3(op+(t1==UNSIGNED?US:0),e1,e2)); - return(list3(type==UNSIGNED?op+US:op,e1,e2)); + // which ops remain? + return(list3(op+us,e1,e2)); } /* coarse for function/code segments arguments */
--- a/test/code-gen.c Wed Apr 28 15:06:01 2004 +0900 +++ b/test/code-gen.c Wed Apr 28 21:33:45 2004 +0900 @@ -308,9 +308,9 @@ void code_bool() { - printf("code_bool gvar %d %d %d %d %d %d\n", + printf("code_bool > gvar %d %d %d %d %d %d\n", i1>i2,ui1>ui2,i1>=i2,ui1>=ui2,ui1==ui2,i1!=i2); - printf("code_bool gvar %d %d %d %d %d %d\n", + printf("code_bool < gvar %d %d %d %d %d %d\n", i1<i2,ui1<ui2,i1<=i2,ui1<=ui2,ui1==ui2,i1!=i2); } @@ -892,13 +892,13 @@ f0 = 0.0; f1 = 0.2; d0 = 10; d1 = 10e10; printf("code_lvar float %f %f %g %g\n",f0,f1,d0,d1); - printf("code_bool lvar float %d %d %d %d\n", + printf("code_bool > lvar float %d %d %d %d\n", f0>f1,f0>=f1,f0==f1,f0!=f1); - printf("code_bool lvar double %d %d %d %d\n", + printf("code_bool > lvar double %d %d %d %d\n", d0>d1,d0>=d1,d0==d1,d0!=d1); - printf("code_bool lvar float %d %d %d %d\n", + printf("code_bool < lvar float %d %d %d %d\n", f0<f1,f0<=f1,f0==f1,f0!=f1); - printf("code_bool lvar double %d %d %d %d\n", + printf("code_bool < lvar double %d %d %d %d\n", d0<d1,d0<=d1,d0==d1,d0!=d1); } @@ -1077,13 +1077,13 @@ void code_dbool() { - printf("code_bool float %d %d %d %d\n", + printf("code_bool > float %d %d %d %d\n", f0>f1,f0>=f1,f0==f1,f0!=f1); - printf("code_bool double %d %d %d %d\n", + printf("code_bool > double %d %d %d %d\n", d0>d1,d0>=d1,d0==d1,d0!=d1); - printf("code_bool float %d %d %d %d\n", + printf("code_bool < float %d %d %d %d\n", f0<f1,f0<=f1,f0==f1,f0!=f1); - printf("code_bool double %d %d %d %d\n", + printf("code_bool < double %d %d %d %d\n", d0<d1,d0<=d1,d0==d1,d0!=d1); } #endif @@ -1094,9 +1094,9 @@ void code_lbool() { - printf("code_bool long long %d %d %d %d %d %d\n", + printf("code_bool > long long %d %d %d %d %d %d\n", l1>l0,ul1>ul0,l1>=l0,ul1>=ul0,ul1==ul0,l1!=l0); - printf("code_bool long long %d %d %d %d %d %d\n", + printf("code_bool < long long %d %d %d %d %d %d\n", l1<l0,ul1<ul0,l1<=l0,ul1<=ul0,ul1==ul0,l1!=l0); } @@ -1214,9 +1214,9 @@ ul0 = 123123123LL; ul1 = 123123123LL; printf("code_lvar long long %lld %lld %llu %llu\n",l0,l1,ul0,ul1); - printf("code_bool lvar long long %d %d %d %d %d %d\n", + printf("code_bool lvar > long long %d %d %d %d %d %d\n", l1>l0,ul1>ul0,l1>=l0,ul1>=ul0,ul1==ul0,l1!=l0); - printf("code_bool lvar long long %d %d %d %d %d %d\n", + printf("code_bool lvar < long long %d %d %d %d %d %d\n", l1<l0,ul1<ul0,l1<=l0,ul1<=ul0,ul1==ul0,l1!=l0); } @@ -1255,25 +1255,25 @@ printf("ltosop 10 %lld\n",i); u = u1 + u2; - printf("ltosop 1 %llu\n",u); + printf("ltosop u 1 %llu\n",u); u = u1 - u2; - printf("ltosop 2 %llu\n",u); + printf("ltosop u 2 %llu\n",u); u = u1 / u2; - printf("ltosop 3 %llu\n",u); + printf("ltosop u 3 %llu\n",u); u = u1 * u2; - printf("ltosop 4 %llu\n",u); + printf("ltosop u 4 %llu\n",u); u = u1 | u2; - printf("ltosop 5 %llu\n",u); + printf("ltosop u 5 %llu\n",u); u = u1 & u2; - printf("ltosop 6 %llu\n",u); + printf("ltosop u 6 %llu\n",u); u = u1 ^ u2; - printf("ltosop 7 %llu\n",u); + printf("ltosop u 7 %llu\n",u); u = u1 << u2; - printf("ltosop 8 %llu\n",u); + printf("ltosop u 8 %llu\n",u); u = u1 >> u2; - printf("ltosop 9 %llu\n",u); + printf("ltosop u 9 %llu\n",u); u = u1 % u2; - printf("ltosop 10 %llu\n",u); + printf("ltosop u 10 %llu\n",u); i = i1 + ii2; printf("litosop 1 %lld\n",i); @@ -1297,25 +1297,25 @@ printf("litosop 10 %lld\n",i); u = u1 + uu2; - printf("litosop 1 %llu\n",u); + printf("litosop u 1 %llu\n",u); u = u1 - uu2; - printf("litosop 2 %llu\n",u); + printf("litosop u 2 %llu\n",u); u = u1 / uu2; - printf("litosop 3 %llu\n",u); + printf("litosop u 3 %llu\n",u); u = u1 * uu2; - printf("litosop 4 %llu\n",u); + printf("litosop u 4 %llu\n",u); u = u1 | uu2; - printf("litosop 5 %llu\n",u); + printf("litosop u 5 %llu\n",u); u = u1 & uu2; - printf("litosop 6 %llu\n",u); + printf("litosop u 6 %llu\n",u); u = u1 ^ uu2; - printf("litosop 7 %llu\n",u); + printf("litosop u 7 %llu\n",u); u = u1 << uu2; - printf("litosop 8 %llu\n",u); + printf("litosop u 8 %llu\n",u); u = u1 >> uu2; - printf("litosop 9 %llu\n",u); + printf("litosop u 9 %llu\n",u); u = u1 % uu2; - printf("litosop 10 %llu\n",u); + printf("litosop u 10 %llu\n",u); } // loprtc(int op,int v) @@ -1349,25 +1349,25 @@ printf("loprtc 10 %lld\n",i); u = u1 + 3; - printf("loprtc 1 %llu\n",u); + printf("loprtc 1 u %llu\n",u); u = u1 - 3; - printf("loprtc 2 %llu\n",u); + printf("loprtc 2 u %llu\n",u); u = u1 / 32342342344234LL; - printf("loprtc 3 %llu\n",u); + printf("loprtc 3 u %llu\n",u); u = u1 * 243234234232324LL; - printf("loprtc 4 %llu\n",u); + printf("loprtc 4 u %llu\n",u); u = u1 | 234234234; - printf("loprtc 5 %llu\n",u); + printf("loprtc 5 u %llu\n",u); u = u1 & 234234234; - printf("loprtc 6 %llu\n",u); + printf("loprtc 6 u %llu\n",u); u = u1 ^ 234234234; - printf("loprtc 7 %llu\n",u); + printf("loprtc 7 u %llu\n",u); u = u1 << 5; - printf("loprtc 8 %llu\n",u); + printf("loprtc 8 u %llu\n",u); u = u1 >> 5; - printf("loprtc 9 %llu\n",u); + printf("loprtc 9 u %llu\n",u); u = u1 % 5; - printf("loprtc 10 %llu\n",u); + printf("loprtc 10 u %llu\n",u); }