Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.161
 
1.162
 
MAIN:ragge:20051222095728
 
reader.c
_>551551                         p->n_op = OREG;
 552552                         if ((rv = findleaf(p, cookie)) < 0)
 553553                                 comperr("bad findleaf"); /* XXX */
<> 554+                        p->n_su |= LOREG;
554555                         p->n_op = UMUL;
 555556                         break;
 556557                 }
     
 !
634635         p->n_name = "";
 635636 
 636637         if (cookie != FOREFF) {
<> 638+        if (p->n_su == DORIGHT)
  639+                comperr("p->n_su == DORIGHT");
  640+        p->n_rval = DECRD(p->n_reg);
  641+#if 0
637642         if (rewrite & RLEFT) {
 638643 #ifdef PCC_DEBUG
 639644                 if (l->n_op != REG)
 640645                         comperr("rewrite left");
 641646 #endif
<>642 -                p->n_rval = p->n_reg;
  647+                p->n_rval = DECRD(p->n_reg);
643648         } else if (rewrite & RRIGHT) {
 644649 #ifdef PCC_DEBUG
 645650                 if (r->n_op != REG)
 646651                         comperr("rewrite right");
 647652 #endif
<>648 -                p->n_rval = p->n_reg;
  653+                p->n_rval = DECRD(p->n_reg);
649654         } else if (rewrite & RESC1) {
 650655                 p->n_rval = p->n_reg;
 651656         } else if (rewrite & RESC2)
     
 !
654659                 p->n_rval = 0; /* XXX */
 655660         else if (p->n_su == DORIGHT)
 656661                 p->n_reg = p->n_rval = l->n_rval; /* XXX special */
<> 662+#endif
657663         }
 658664         if (optype(o) != LTYPE)
 659665                 tfree(l);
     
 !
669675         if (p->n_su == -1) /* For OREGs and similar */
 670676                 return gencode(p->n_left, cookie);
 671677 
<>672 -        if (p->n_op == REG && p->n_reg == p->n_rval)
  678+        if (p->n_op == REG && DECRD(p->n_reg) == p->n_rval)
673679                 return; /* meaningless move to itself */
 674680 
<>675 -#if 0
 676 -        if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
 677 -            p->n_left->n_rval == p->n_reg &&
 678 -            (p->n_su & RMASK) &&
 679 -            p->n_right->n_reg == p->n_reg) {
 680 -                gencode(p->n_right, INREGS);
 681 -                r = p->n_right;
 682 -                nfree(p->n_left);
 683 -                *p = *r;
 684 -                nfree(r);
 685 -                return; /* meaningless assign */
 686 -        }
 687 -#endif
 688 -
689681         if (p->n_su & DORIGHT) {
 690682                 gencode(p->n_right, INREGS);
 691683                 if ((p->n_su & RMASK) == ROREG)
     
 !
702694                         canon(p);
 703695         }
 704696 
<>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 -
728697         if ((p->n_su & RMASK) == RREG) {
 729698                 if (q->needs & NSPECIAL) {
 730699                         int rr = rspecial(q, NRIGHT);
     
 !
736705                                 p->n_right->n_rval = rr;
 737706                         }
 738707                 } else if ((q->rewrite & RRIGHT) &&
<>739 -                    p->n_right->n_reg != p->n_reg) {
  708+                    DECRD(p->n_right->n_reg) != DECRD(p->n_reg)) {
740709 #ifdef notyet
 741710                         if (p->n_op == ASSIGN)
 742711                                 comperr("ASSIGN error");
     
 !
751720                         int rr = rspecial(q, NLEFT);
 752721 
 753722                         if (rr >= 0 && rr != p->n_left->n_reg) {
<>754 -                                rmove(p->n_left->n_reg, rr,
  723+                                rmove(DECRD(p->n_left->n_reg), rr,
755724                                     TCLASS(p->n_left->n_su));
 756725                                 p->n_left->n_reg = rr;
 757726                                 p->n_left->n_rval = rr;
 758727                         }
 759728                 } else if ((q->rewrite & RLEFT) &&
<>760 -                    p->n_left->n_reg != p->n_reg) {
  729+                    DECRD(p->n_left->n_reg) != DECRD(p->n_reg)) {
761730 #ifdef notyet
 762731                         if (p->n_op == ASSIGN)
 763732                                 comperr("ASSIGN error");
     
 !
767736                         p->n_left->n_rval = p->n_reg;
 768737                 }
 769738         }
<>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){
  739+
  740+        if (p->n_op == ASSIGN &&
  741+            p->n_left->n_op == REG && p->n_right->n_op == REG &&
  742+            p->n_left->n_rval == p->n_right->n_rval){
773743                 /* do not emit anything */
 774744                 rewrite(p, q->rewrite, cookie);
 775745                 return;
 776746         }
<>777 -#endif
778747 
 779748         expand(p, cookie, q->cstring);
 780749         if (callop(p->n_op) && p->n_reg != RETREG(TCLASS(p->n_su))) {
<>781 -                rmove(RETREG(TCLASS(p->n_su)), p->n_reg, TCLASS(p->n_su));
  750+                rmove(RETREG(TCLASS(p->n_su)), DECRD(p->n_reg), TCLASS(p->n_su));
782751         } else if (q->needs & NSPECIAL) {
 783752                 int rr = rspecial(q, NRES);
 784753 
 785754                 if (rr >= 0 && p->n_reg != rr)
<>786 -                        rmove(rr, p->n_reg, TCLASS(p->n_su));
  755+                        rmove(rr, DECRD(p->n_reg), TCLASS(p->n_su));
  756+        } else if ((q->rewrite & RESC1) &&
  757+            (DECRA1(p->n_reg) != DECRD(p->n_reg))) {
  758+                rmove(DECRA1(p->n_reg), DECRD(p->n_reg), TCLASS(p->n_su));
<_787759         }
 788760         rewrite(p, q->rewrite, cookie);
 789761 }
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-01 14:16 +0200