Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.160
 
1.161
 
MAIN:ragge:20051211081032
 
reader.c
_>665665 gencode(NODE *p, int cookie)
 666666 {
 667667         struct optab *q = &table[TBLIDX(p->n_su)];
<>668 -        NODE *r;
669668 
 670669         if (p->n_su == -1) /* For OREGs and similar */
 671670                 return gencode(p->n_left, cookie);
 672671 
 673672         if (p->n_op == REG && p->n_reg == p->n_rval)
 674673                 return; /* meaningless move to itself */
<> 674+
  675+#if 0
675676         if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
 676677             p->n_left->n_rval == p->n_reg &&
 677678             (p->n_su & RMASK) &&
     
 !
683684                 nfree(r);
 684685                 return; /* meaningless assign */
 685686         }
<> 687+#endif
686688 
 687689         if (p->n_su & DORIGHT) {
 688690                 gencode(p->n_right, INREGS);
     
 !
699701                 if ((p->n_su & RMASK) == ROREG)
 700702                         canon(p);
 701703         }
<> 704+
  705+#if 0
  706+        /*
  707+         * ASSIGN nodes can be tricky:
  708+         * - If left reg == right reg, do nothing.
  709+         * - If dest reg != reclaim reg, add move.
  710+         * - Otherwise, just fall through here.
  711+         */
  712+        if (p->n_op == ASSIGN) {
  713+                if (p->n_left->n_op == REG && p->n_right->n_op == REG &&
  714+                    p->n_left->n_rval == p->n_right->n_rval) {
  715+                        ; /* do nothing */
  716+                } else {
  717+                        expand(p, cookie, q->cstring);
  718+                }
  719+                rewrite(p, q->rewrite, cookie);
  720+                
  721+        }
  722+
  723+            p->n_left->n_rval == p->n_reg &&
  724+            (p->n_su & RMASK) &&
  725+            p->n_right->n_reg == p->n_reg) {
  726+#endif
  727+
702728         if ((p->n_su & RMASK) == RREG) {
 703729                 if (q->needs & NSPECIAL) {
 704730                         int rr = rspecial(q, NRIGHT);
     
 !
711737                         }
 712738                 } else if ((q->rewrite & RRIGHT) &&
 713739                     p->n_right->n_reg != p->n_reg) {
<> 740+#ifdef notyet
  741+                        if (p->n_op == ASSIGN)
  742+                                comperr("ASSIGN error");
  743+#endif
714744                         rmove(p->n_right->n_reg, p->n_reg, TCLASS(p->n_su));
 715745                         p->n_right->n_reg = p->n_reg;
 716746                         p->n_right->n_reg = p->n_reg;
     
 !
728758                         }
 729759                 } else if ((q->rewrite & RLEFT) &&
 730760                     p->n_left->n_reg != p->n_reg) {
<> 761+#ifdef notyet
  762+                        if (p->n_op == ASSIGN)
  763+                                comperr("ASSIGN error");
  764+#endif
731765                         rmove(p->n_left->n_reg, p->n_reg, TCLASS(p->n_su));
 732766                         p->n_left->n_reg = p->n_reg;
 733767                         p->n_left->n_rval = p->n_reg;
 734768                 }
 735769         }
<> 770+#if 1
  771+        if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
  772+            p->n_right->n_op == REG && p->n_left->n_rval == p->n_right->n_rval){
  773+                /* do not emit anything */
  774+                rewrite(p, q->rewrite, cookie);
  775+                return;
  776+        }
  777+#endif
<_736778 
 737779         expand(p, cookie, q->cstring);
 738780         if (callop(p->n_op) && p->n_reg != RETREG(TCLASS(p->n_su))) {
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-30 14:48 +0100