Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.186
 
1.187
 
MAIN:ragge:20060603114243
 
reader.c
_>544544                 p1->n_label = p2->n_lval;
 545545                 o = p1->n_op;
 546546                 geninsn(p1, FORCC);
<>547 -                p->n_su = DOWNL; /* su calculations traverse left */
  547+                p->n_su = 0;
548548                 break;
 549549 
<>550 -        case FORCE:
  550+        case FORCE: /* XXX needed? */
551551                 geninsn(p->n_left, INREGS);
<>552 -                p->n_su = DOWNL; /* su calculations traverse left */
  552+                p->n_su = 0; /* su calculations traverse left */
553553                 break;
 554554 
 555555         default:
     
 !
595595 static void
 596596 rewrite(NODE *p, int rewrite, int cookie)
 597597 {
<>598 -//      struct optab *q = &table[TBLIDX(p->n_su)];
599598         NODE *l, *r;
 600599         int o;
 601600 
<>602 -        if (p->n_su == DOWNL)
 603 -                comperr("rewrite");
 604 -
605601         l = getlr(p, 'L');
 606602         r = getlr(p, 'R');
 607603         o = p->n_op;
 608604         p->n_op = REG;
 609605         p->n_lval = 0;
 610606         p->n_name = "";
 611607 
<>612 -        if (cookie != FOREFF) {
 613 -        if (p->n_su == DORIGHT)
 614 -                comperr("p->n_su == DORIGHT");
 615 -        p->n_rval = DECRA(p->n_reg, 0);
 616 -#if 0
 617 -        if (rewrite & RLEFT) {
 618 -#ifdef PCC_DEBUG
 619 -                if (l->n_op != REG)
 620 -                        comperr("rewrite left");
 621 -#endif
 622 -                p->n_rval = DECRA(p->n_reg, 0);
 623 -        } else if (rewrite & RRIGHT) {
 624 -#ifdef PCC_DEBUG
 625 -                if (r->n_op != REG)
 626 -                        comperr("rewrite right");
 627 -#endif
 628 -                p->n_rval = DECRA(p->n_reg, 0);
 629 -        } else if (rewrite & RESC1) {
 630 -                p->n_rval = p->n_reg;
 631 -        } else if (rewrite & RESC2)
 632 -                p->n_reg = p->n_rval = p->n_reg;
 633 -        else if (rewrite & RESC3)
 634 -                p->n_rval = 0; /* XXX */
 635 -        else if (p->n_su == DORIGHT)
 636 -                p->n_reg = p->n_rval = l->n_rval; /* XXX special */
 637 -#endif
 638 -        }
639608         if (optype(o) != LTYPE)
 640609                 tfree(l);
 641610         if (optype(o) == BITYPE)
 642611                 tfree(r);
<> 612+        p->n_rval = DECRA(p->n_reg, 0);
643613 }
 644614 
 645615 void
     
 !
648618         struct optab *q = &table[TBLIDX(p->n_su)];
 649619         NODE *p1;
 650620 
<>651 -#ifdef ragge
652621         if (TBLIDX(p->n_su) == 0) {
 653622                 int o = optype(p->n_op);
 654623 
     
 !
660629                         gencode(p->n_right, 0);
 661630                 return;
 662631         }
<>663 -#else
 664 -        if (p->n_su == DOWNL) /* For OREGs and similar */
 665 -                return gencode(p->n_left, cookie);
 666 -#endif
667632 
 668633         CDEBUG(("gencode: node %p\n", p));
 669634 
     
 !
679644                 gencode(p1, FOREFF);
 680645         }
 681646 
<>682 -#ifdef ragge
683647         if (optype(p->n_op) == BITYPE && (p->n_su & DORIGHT))
 684648                 gencode(p->n_right, INREGS);
<>685 -#else
 686 -        if (p->n_su & DORIGHT) {
 687 -                gencode(p->n_right, INREGS);
 688 -                if ((p->n_su & RMASK) == ROREG)
 689 -                        canon(p);
 690 -        }
 691 -#endif
692649 
<>693 -#ifdef ragge
694650         if (optype(p->n_op) != LTYPE)
 695651                 gencode(p->n_left, INREGS);
<>696 -#else
 697 -        if (p->n_su & LMASK) {
 698 -                gencode(p->n_left, INREGS);
 699 -                if ((p->n_su & LMASK) == LOREG)
 700 -                        canon(p);
 701 -        }
 702 -#endif
703652 
<>704 -#ifdef ragge
705653         if (optype(p->n_op) == BITYPE && !(p->n_su & DORIGHT))
 706654                 gencode(p->n_right, INREGS);
<>707 -#else
 708 -        if ((p->n_su & RMASK) && !(p->n_su & DORIGHT)) {
 709 -                gencode(p->n_right, INREGS);
 710 -                if ((p->n_su & RMASK) == ROREG)
 711 -                        canon(p);
 712 -        }
  655+
  656+#ifdef ragge
  657+        canon(p);
  658+        if (q->needs & NSPECIAL) {
  659+                int rs;
713660 #endif
<> 661+FIXA utskriftsordningen av instruktioner.
714662 
 715663         if ((p->n_su & RMASK) == RREG) {
 716664                 if (q->needs & NSPECIAL) {
     
 !
774722         if (p->n_su == 0)
 775723                 return;
 776724 
<>777 -canon(p); /* XXX */
  725+        canon(p);
778726 //fwalk(p, e2print, 0);
 779727         expand(p, cookie, q->cstring);
 780728         if (callop(p->n_op) && cookie != FOREFF &&
     
 !
10751023         p->n_rval = oregr;
 10761024         p->n_lval = oregtemp;
 10771025         p->n_name = oregcp;
<>1078 -        /* stop gencode traversal */
 1079 -        if (p->n_su == DOWNL)
 1080 -                p->n_su = 0;
 1081 -        else
 1082 -                p->n_su &= ~(LMASK|RMASK|DORIGHT);
<_10831026         tfree(q);
 10841027 }
 10851028 
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 04:19 +0100