Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.150
 
1.151
 
MAIN:ragge:20051104065632
 
reader.c
_>358358                                 gencode(p, FORCC);
 359359                         break;
 360360                 case FORCE:
<> 361+#ifdef MULTICLASS
  362+                        gencode(p->n_left, INREGS);
  363+#else
361364                         gencode(p->n_left, INTAREG|INTBREG);
<> 365+#endif
362366                         break;
 363367                 default:
 364368                         if (p->n_op != REG || p->n_type != VOID) /* XXX */
     
 !
446450 
 447451 int odebug = 0;
 448452 
<> 453+#ifdef MULTICLASS
  454+int
  455+#else
449456 void
<> 457+#endif
450458 geninsn(NODE *p, int cookie)
 451459 {
 452460         NODE *p1, *p2;
<>453 -        int o, rv;
  461+        int o, rv = 0;
454462 
 455463 #ifdef PCC_DEBUG
 456464         if (odebug) {
     
 !
487495         case ER:
 488496         case LS:
 489497         case RS:
<> 498+#ifdef MULTICLASS
  499+                rv = findops(p, cookie);
  500+                break;
  501+#else
490502                 if ((rv = findops(p, cookie)) < 0) {
 491503                         if (setbin(p))
 492504                                 goto again;
 493505                         goto failed;
 494506                 }
 495507                 goto sw;
<> 508+#endif
496509 
 497510         case INCR:
 498511         case DECR:
     
 !
532545                 goto again;
 533546 
 534547         case ASSIGN:
<> 548+#ifdef MULTICLASS
  549+                rv = findasg(p, cookie);
  550+                break;
  551+#else
535552                 if ((rv = findasg(p, cookie)) < 0) {
 536553                         if (setasg(p, cookie))
 537554                                 goto again;
 538555                         goto failed;
 539556                 }
<> 557+#endif
540558                 /*
 541559                  * Do subnodes conversions (if needed).
 542560                  */
 543561 sw:             switch (rv & LMASK) {
 544562                 case LREG:
<> 563+#ifdef MULTICLASS
  564+                        geninsn(p->n_left, INREGS);
  565+#else
545566                         geninsn(p->n_left, INTAREG|INTBREG);
<> 567+#endif
546568                         break;
 547569                 case LOREG:
 548570                         if (p->n_left->n_op == FLD) {
<> 571+#ifdef MULTICLASS
  572+                                offstar(p->n_left->n_left->n_left, 0); /* XXX */
  573+#else
549574                                 offstar(p->n_left->n_left->n_left);
<> 575+#endif
550576                                 p->n_left->n_left->n_su = -1;
 551577                         } else
<> 578+#ifdef MULTICLASS
  579+                                offstar(p->n_left->n_left, 0);
  580+#else
552581                                 offstar(p->n_left->n_left);
<> 582+#endif
553583                         p->n_left->n_su = -1;
 554584                         break;
 555585                 case LTEMP:
     
 !
559589 
 560590                 switch (rv & RMASK) {
 561591                 case RREG:
<> 592+#ifdef MULTICLASS
  593+                        geninsn(p->n_right, INREGS);
  594+#else
562595                         geninsn(p->n_right, INTAREG|INTBREG);
<> 596+#endif
563597                         break;
 564598                 case ROREG:
<> 599+#ifdef MULTICLASS
  600+                        offstar(p->n_right->n_left, 0);
  601+#else
565602                         offstar(p->n_right->n_left);
<> 603+#endif
566604                         p->n_right->n_su = -1;
 567605                         break;
 568606                 case RTEMP:
     
 !
604642                 if ((cookie & INTAREG) == 0)
 605643                         comperr("bad umul!");
 606644 #endif
<> 645+#ifdef MULTICLASS
  646+                if (offstar(p->n_left, 0)) {
  647+#else
607648                 if (offstar(p->n_left)) {
<> 649+#endif
608650                         p->n_op = OREG;
 609651                         if ((rv = findleaf(p, cookie)) < 0)
 610652                                 comperr("bad findleaf"); /* XXX */
     
 !
630672                 }
 631673                 switch (rv & LMASK) {
 632674                 case LREG:
<> 675+#ifdef MULTICLASS
  676+                        cookie = INREGS;
  677+#else
633678                         cookie = INTAREG|INTBREG;
 634679                         if (rv & LBREG) /* XXX - make prettier */
 635680                                 cookie = INTBREG;
<> 681+#endif
636682                         geninsn(p->n_left, cookie);
 637683                         break;
 638684                 case LOREG:
<> 685+#ifdef MULTICLASS
  686+                        offstar(p->n_left->n_left, 0);
  687+#else
639688                         offstar(p->n_left->n_left);
<> 689+#endif
640690                         p->n_left->n_su = -1;
 641691                         break;
 642692                 case LTEMP:
     
 !
656706                 break;
 657707 
 658708         case FORCE:
<> 709+#ifdef MULTICLASS
  710+                geninsn(p->n_left, INREGS);
  711+#else
659712                 geninsn(p->n_left, INTAREG|INTBREG);
<> 713+#endif
660714                 p->n_su = -1; /* su calculations traverse left */
 661715                 break;
 662716 
 663717         default:
 664718                 comperr("geninsn: bad op %d, node %p", o, p);
 665719         }
<> 720+#ifdef MULTICLASS
  721+        switch (o) {
  722+        case ASSIGN:
  723+        case PLUS:
  724+        case MINUS:
  725+        case MUL:
  726+        case DIV:
  727+        case MOD:
  728+        case AND:
  729+        case OR:
  730+        case ER:
  731+        case LS:
  732+        case RS:
  733+                switch (rv) {
  734+                case FRETRY:
  735+                        goto again;
  736+                case FFAIL:
  737+                        goto failed;
  738+                }
  739+        }
  740+        return 0;
  741+#else
666742         return;
<> 743+#endif
667744 
 668745 failed:
 669746         comperr("Cannot generate code, node %p op %s", p, opst[p->n_op]);
<>670 -
  747+#ifdef MULTICLASS
  748+        return 0; /* XXX gcc */
  749+#endif
671750 }
 672751 
 673752 /*
     
 !
710789         p->n_op = REG;
 711790         p->n_lval = 0;
 712791         p->n_name = "";
<> 792+#ifdef MULTICLASS
  793+#define n_rall  n_reg
  794+#endif
713795 #if 0
 714796         if (xnewreg && (q->needs & NSPECIAL)) {
 715797                 int left, right, res, mask;
     
 !
756838         if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
 757839             p->n_left->n_rval == p->n_rall &&
 758840             p->n_right->n_rall == p->n_rall) {
<> 841+#ifdef MULTICLASS
  842+                gencode(p->n_right, INREGS);
  843+#else
759844                 gencode(p->n_right, INTAREG|INTBREG);
<> 845+#endif
760846                 return; /* meaningless assign */
 761847         }
 762848 
 763849         if (p->n_su & DORIGHT) {
<> 850+#ifdef MULTICLASS
  851+                gencode(p->n_right, INREGS);
  852+#else
764853                 gencode(p->n_right, INTAREG|INTBREG);
<> 854+#endif
765855                 if ((p->n_su & RMASK) == ROREG)
 766856                         canon(p);
 767857         }
 768858         if (p->n_su & LMASK) {
<> 859+#ifdef MULTICLASS
  860+                gencode(p->n_left, INREGS);
  861+#else
769862                 gencode(p->n_left, INTAREG|INTBREG);
<> 863+#endif
770864                 if ((p->n_su & LMASK) == LOREG)
 771865                         canon(p);
 772866         }
 773867         if ((p->n_su & RMASK) && !(p->n_su & DORIGHT)) {
<> 868+#ifdef MULTICLASS
  869+                gencode(p->n_right, INREGS);
  870+#else
774871                 gencode(p->n_right, INTAREG|INTBREG);
<> 872+#endif
775873                 if ((p->n_su & RMASK) == ROREG)
 776874                         canon(p);
 777875         }
     
 !
879977                 fprintf(prfil, "(%d)", (p->n_rall&~MUSTDO));
 880978                 else fprintf(prfil, "%s", rnames[p->n_rall&~MUSTDO]);
 881979                 }
<> 980+#ifdef MULTICLASS
  981+        fprintf(prfil, ", SU= %d(%cREG,%s,%s,%s,%s)\n",
  982+#else
882983         fprintf(prfil, ", SU= %d(%s,%s,%s,%s)\n",
<> 984+#endif
883985             TBLIDX(p->n_su),
<> 986+#ifdef MULTICLASS
  987+            TCLASS(p->n_su)+'@',
  988+#endif
<_884989 #ifdef PRTABLE
 885990             TBLIDX(p->n_su) >= 0 && TBLIDX(p->n_su) <= tablesize ?
 886991             table[TBLIDX(p->n_su)].cstring : "",
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-09-02 08:50 +0200