Mercurial > hg > CbC > old > device
diff mc-code-powerpc.c @ 438:626d705471d5 lazy-branch
Unexecuted code in conditional. Lazy jmp code generation.
author | kono |
---|---|
date | Mon, 15 Nov 2004 20:33:30 +0900 |
parents | d92786033042 |
children | a531bbf572e3 |
line wrap: on
line diff
--- a/mc-code-powerpc.c Sun Nov 14 23:50:11 2004 +0900 +++ b/mc-code-powerpc.c Mon Nov 15 20:33:30 2004 +0900 @@ -2653,7 +2653,7 @@ return 1; } -void +int rexpr(int e1, int l1, int cond,int t) { char *s; @@ -2682,6 +2682,7 @@ } g_expr(list3((t==INT?CMP:UCMP),cadr(e1),caddr(e1))); printf("\tb%s cr%d,L_%d\n",s,cmpflag,l1); + return l1; } static void @@ -2698,7 +2699,6 @@ void jmp(int l) { - control=0; if (chk) return; printf("\tb\tL_%d\n",l); } @@ -3784,23 +3784,23 @@ return 1; } -void +int drexpr(int e1, int e2,int l1, int op,int cond) { if (!cond) { switch(op) { case FOP+GT: - drexpr(e2,e1,l1,FOP+GE,1); return; + return drexpr(e2,e1,l1,FOP+GE,1); case FOP+GE: - drexpr(e2,e1,l1,FOP+GT,1); return; + return drexpr(e2,e1,l1,FOP+GT,1); case FOP+EQ: op=FOP+NEQ; break; case FOP+NEQ: op=FOP+EQ; break; case DOP+GT: - drexpr(e2,e1,l1,DOP+GE,1); return; + return drexpr(e2,e1,l1,DOP+GE,1); case DOP+GE: - drexpr(e2,e1,l1,DOP+GT,1); return; + return drexpr(e2,e1,l1,DOP+GT,1); case DOP+EQ: op=DOP+NEQ; break; case DOP+NEQ: @@ -3822,6 +3822,7 @@ printf("\tbne\tcr%d,L_%d\n",cmpflag,l1); break; } + return l1; } int emit_dpop(int d) @@ -3897,7 +3898,7 @@ } } -void +int lrexpr(int e1, int e2,int l1, int op,int cond) { int reg; @@ -3971,6 +3972,7 @@ } fwddef(l2); emit_lpop_free(e3); + return l1; } int