Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.158
 
1.159
 
MAIN:ragge:20051204114900
 
reader.c
_>358358                                 gencode(p, FORCC);
 359359                         break;
 360360                 case FORCE:
<>361 -#ifdef MULTICLASS
362361                         gencode(p->n_left, INREGS);
<>363 -#else
 364 -                        gencode(p->n_left, INTAREG|INTBREG);
 365 -#endif
366362                         break;
 367363                 default:
 368364                         if (p->n_op != REG || p->n_type != VOID) /* XXX */
     
 !
450446 
 451447 int odebug = 0;
 452448 
<>453 -#ifdef MULTICLASS
454449 int
<>455 -#else
 456 -void
 457 -#endif
458450 geninsn(NODE *p, int cookie)
 459451 {
 460452         NODE *p1, *p2;
     
 !
478470         case ULT:
 479471         case UGE:
 480472         case UGT:
<>481 -                if ((rv = relops(p)) < 0) {
 482 -                        if (setbin(p))
 483 -                                goto again;
 484 -                        goto failed;
 485 -                }
 486 -                goto sw;
  473+                rv = relops(p);
  474+                break;
487475 
 488476         case PLUS:
 489477         case MINUS:
     
 !
495483         case ER:
 496484         case LS:
 497485         case RS:
<>498 -#ifdef MULTICLASS
499486                 rv = findops(p, cookie);
 500487                 break;
<>501 -#else
 502 -                if ((rv = findops(p, cookie)) < 0) {
 503 -                        if (setbin(p))
 504 -                                goto again;
 505 -                        goto failed;
 506 -                }
 507 -                goto sw;
 508 -#endif
509488 
 510489         case INCR:
 511490         case DECR:
     
 !
545524                 goto again;
 546525 
 547526         case ASSIGN:
<>548 -#ifdef MULTICLASS
549527                 rv = findasg(p, cookie);
 550528                 break;
<>551 -#else
 552 -                if ((rv = findasg(p, cookie)) < 0) {
 553 -                        if (setasg(p, cookie))
 554 -                                goto again;
 555 -                        goto failed;
 556 -                }
 557 -#endif
  529+
558530                 /*
 559531                  * Do subnodes conversions (if needed).
 560532                  */
 561533 sw:             switch (rv & LMASK) {
 562534                 case LREG:
<>563 -#ifdef MULTICLASS
564535                         geninsn(p->n_left, INREGS);
<>565 -#else
 566 -                        geninsn(p->n_left, INTAREG|INTBREG);
 567 -#endif
568536                         break;
 569537                 case LOREG:
 570538                         if (p->n_left->n_op == FLD) {
<>571 -#ifdef MULTICLASS
572539                                 offstar(p->n_left->n_left->n_left, 0); /* XXX */
<>573 -#else
 574 -                                offstar(p->n_left->n_left->n_left);
 575 -#endif
576540                                 p->n_left->n_left->n_su = -1;
 577541                         } else
<>578 -#ifdef MULTICLASS
579542                                 offstar(p->n_left->n_left, 0);
<>580 -#else
 581 -                                offstar(p->n_left->n_left);
 582 -#endif
583543                         p->n_left->n_su = -1;
 584544                         break;
 585545                 case LTEMP:
     
 !
589549 
 590550                 switch (rv & RMASK) {
 591551                 case RREG:
<>592 -#ifdef MULTICLASS
593552                         geninsn(p->n_right, INREGS);
<>594 -#else
 595 -                        geninsn(p->n_right, INTAREG|INTBREG);
 596 -#endif
597553                         break;
 598554                 case ROREG:
<>599 -#ifdef MULTICLASS
600555                         offstar(p->n_right->n_left, 0);
<>601 -#else
 602 -                        offstar(p->n_right->n_left);
 603 -#endif
604556                         p->n_right->n_su = -1;
 605557                         break;
 606558                 case RTEMP:
     
 !
619571                 if ((cookie & (INTAREG|INTBREG)) == 0)
 620572                         comperr("geninsn OREG, node %p", p);
 621573 #endif
<>622 -#ifdef MULTICLASS
623574                 rv = findleaf(p, cookie);
 624575                 break;
<>625 -#else
 626 -                if ((rv = findleaf(p, cookie)) < 0) {
 627 -                        if (setasg(p, cookie))
 628 -                                goto again;
 629 -                        goto failed;
 630 -                }
 631 -                p->n_su = rv;
 632 -                break;
 633 -#endif
634576 
 635577         case UMUL:
 636578                 /*
     
 !
647589                 if ((cookie & INTAREG) == 0)
 648590                         comperr("bad umul!");
 649591 #endif
<>650 -#ifdef MULTICLASS
651592                 if (offstar(p->n_left, 0)) {
<>652 -#else
 653 -                if (offstar(p->n_left)) {
 654 -#endif
655593                         p->n_op = OREG;
 656594                         if ((rv = findleaf(p, cookie)) < 0)
 657595                                 comperr("bad findleaf"); /* XXX */
     
 !
670608         case FUNARG:
 671609         case UCALL:
 672610         case USTCALL:
<>673 -#ifdef MULTICLASS
674611                 rv = finduni(p, cookie);
 675612                 break;
<>676 -#else
 677 -                if ((rv = finduni(p, cookie)) < 0) {
 678 -                        if (setuni(p, cookie))
 679 -                                goto again;
 680 -                        goto failed;
 681 -                }
 682 -                switch (rv & LMASK) {
 683 -                case LREG:
 684 -                        cookie = INTAREG|INTBREG;
 685 -                        if (rv & LBREG) /* XXX - make prettier */
 686 -                                cookie = INTBREG;
 687 -                        geninsn(p->n_left, cookie);
 688 -                        break;
 689 -                case LOREG:
 690 -                        offstar(p->n_left->n_left);
 691 -                        p->n_left->n_su = -1;
 692 -                        break;
 693 -                case LTEMP:
 694 -                        geninsn(p->n_left, INTEMP);
 695 -                        break;
 696 -                }
 697 -                p->n_su = rv;
 698 -                break;
 699 -#endif
700613 
 701614         case CBRANCH:
 702615                 p1 = p->n_left;
     
 !
708621                 break;
 709622 
 710623         case FORCE:
<>711 -#ifdef MULTICLASS
712624                 geninsn(p->n_left, INREGS);
<>713 -#else
 714 -                geninsn(p->n_left, INTAREG|INTBREG);
 715 -#endif
716625                 p->n_su = -1; /* su calculations traverse left */
 717626                 break;
 718627 
 719628         default:
 720629                 comperr("geninsn: bad op %d, node %p", o, p);
 721630         }
<>722 -#ifdef MULTICLASS
723631         switch (o) {
 724632         case REG:
 725633         case TEMP:
     
 !
754662                 }
 755663         }
 756664         return rv;
<>757 -#else
 758 -        return;
 759 -#endif
760665 
 761666 failed:
 762667         comperr("Cannot generate code, node %p op %s", p, opst[p->n_op]);
<>763 -#ifdef MULTICLASS
764668         return 0; /* XXX gcc */
<>765 -#endif
<_766669 }
 767670 
 768671 /*
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-30 15:53 +0200